
0
Under review
Video thumbnail generation - Error initializing output stream
Hello,
I'm having an issue with video thumbnail generation.
The same error happens with every video.
What is the minimum required version of the ffmpeg package?
Thank you!
Thumbnail generation debug:
Debugging is on (1664803768) Request options: Array ( [skipNotification] => 1 [caching] => [keepCache] => 1 [debug] => 1 ) In use options: Array ( [skipNotification] => 1 [caching] => [keepCache] => 1 [debug] => 1 [width] => 400 [height] => 400 [geometry] => contain [pageNo] => 0 [forceExt] => mp4 ) Processing: /home/user/filerundata/test/VID-20211211-WA0002.mp4 As: mp4 File size: 16874554 bytes (16.1 MB) Removing expired lock: /home/user/filerundata/test/.filerun.thumbnails/VID-20211211-WA0002.mp4/16874554/400_400_contain[1].png.lock Creating lock: /home/user/filerundata/test/.filerun.thumbnails/VID-20211211-WA0002.mp4/16874554/400_400_contain[1].png.lock Extractor: \FileRun\Thumbs\Extractors\ffmpeg Extracting frame from video file. Running: "/usr/bin/ffmpeg" -loglevel debug -y -noaccurate_seek -ss 1 -i "/home/user/filerundata/test/VID-20211211-WA0002.mp4" -frames:v 1 -filter:v scale=w=400:h=400:force_original_aspect_ratio=decrease "/home/user/filerundata/test/.filerun.thumbnails/VID-20211211-WA0002.mp4/extracted.png" 2>&1 Returned code: 1 -------------------- ffmpeg version 4.2.7 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 8 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-noaccurate_seek' ... matched as option 'accurate_seek' (enable/disable accurate seeking with -ss) with argument 0. Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '1'. Reading option '-i' ... matched as input url with argument '/home/user/filerundata/test/VID-20211211-WA0002.mp4'. Reading option '-frames:v' ... matched as option 'frames' (set the number of frames to output) with argument '1'. Reading option '-filter:v' ... matched as option 'filter' (set stream filtergraph) with argument 'scale=w=400:h=400:force_original_aspect_ratio=decrease'. Reading option '/home/user/filerundata/test/.filerun.thumbnails/VID-20211211-WA0002.mp4/extracted.png' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url /home/user/filerundata/test/VID-20211211-WA0002.mp4. Applying option noaccurate_seek (enable/disable accurate seeking with -ss) with argument 0. Applying option ss (set the start time offset) with argument 1. Successfully parsed a group of options. Opening an input file: /home/user/filerundata/test/VID-20211211-WA0002.mp4. [NULL @ 0x55f161581340] Opening '/home/user/filerundata/test/VID-20211211-WA0002.mp4' for reading [file @ 0x55f161581e00] Setting default whitelist 'file,crypto' [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] ISO: File Type Major Brand: mp42 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] Setting codecpar->delay to 1 for stream st: 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] Before avformat_find_stream_info() pos: 86558 bytes read:98304 seeks:0 nb_streams:2 [h264 @ 0x55f161583080] nal_unit_type: 7(SPS), nal_ref_idc: 1 [h264 @ 0x55f161583080] nal_unit_type: 8(PPS), nal_ref_idc: 1 [h264 @ 0x55f161583080] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0x55f161583080] nal_unit_type: 5(IDR), nal_ref_idc: 1 [h264 @ 0x55f161583080] Format yuv420p chosen by get_format(). [h264 @ 0x55f161583080] Reinit context to 480x480, pix_fmt: yuv420p [h264 @ 0x55f161583080] no picture [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 0x55f161583080] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f161581340] After avformat_find_stream_info() pos: 145568 bytes read:163840 seeks:0 frames:17 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/user/filerundata/test/VID-20211211-WA0002.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isom Duration: 00:02:59.91, start: 0.000000, bitrate: 750 kb/s Stream #0:0(und), 16, 1/90000: Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, left), 480x480, 0/1, 698 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default) Stream #0:1(und), 1, 1/22050: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 48 kb/s (default) Successfully opened the file. Parsing a group of options: output url /home/user/filerundata/test/.filerun.thumbnails/VID-20211211-WA0002.mp4/extracted.png. Applying option frames:v (set the number of frames to output) with argument 1. Applying option filter:v (set stream filtergraph) with argument scale=w=400:h=400:force_original_aspect_ratio=decrease. Successfully parsed a group of options. Opening an output file: /home/user/filerundata/test/.filerun.thumbnails/VID-20211211-WA0002.mp4/extracted.png. Successfully opened the file. detected 32 logical cores [h264 @ 0x55f161742ec0] nal_unit_type: 7(SPS), nal_ref_idc: 1 [h264 @ 0x55f161742ec0] nal_unit_type: 8(PPS), nal_ref_idc: 1 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> png (native)) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) Last message repeated 1 times [h264 @ 0x55f161742ec0] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0x55f161742ec0] nal_unit_type: 5(IDR), nal_ref_idc: 1 [h264 @ 0x55f161742ec0] Format yuv420p chosen by get_format(). [h264 @ 0x55f161742ec0] Reinit context to 480x480, pix_fmt: yuv420p [h264 @ 0x55f161742ec0] no picture cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16161d8c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16159ba00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16167f940] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16161b300] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f1615ff540] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16169abc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f161660a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f161717500] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16171d400] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16173dc00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f1616dbc00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f16163a280] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f161783cc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f1617a0180] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x55f1617bc880] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [h264 @ 0x55f161742ec0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [Parsed_scale_0 @ 0x55f161955940] Setting 'w' to value '400' [Parsed_scale_0 @ 0x55f161955940] Setting 'h' to value '400' [Parsed_scale_0 @ 0x55f161955940] Setting 'force_original_aspect_ratio' to value 'decrease' [Parsed_scale_0 @ 0x55f161955940] Setting 'flags' to value 'bicubic' [Parsed_scale_0 @ 0x55f161955940] w:400 h:400 flags:'bicubic' interl:0 [graph 0 input from stream 0:0 @ 0x55f161955fc0] Setting 'video_size' to value '480x480' [graph 0 input from stream 0:0 @ 0x55f161955fc0] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0x55f161955fc0] Setting 'time_base' to value '1/90000' [graph 0 input from stream 0:0 @ 0x55f161955fc0] Setting 'pixel_aspect' to value '0/1' [graph 0 input from stream 0:0 @ 0x55f161955fc0] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0x55f161955fc0] Setting 'frame_rate' to value '30/1' [graph 0 input from stream 0:0 @ 0x55f161955fc0] w:480 h:480 pixfmt:yuv420p tb:1/90000 fr:30/1 sar:0/1 sws_param:flags=2 [format @ 0x55f1617d91c0] Setting 'pix_fmts' to value 'rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16be|monob' [AVFilterGraph @ 0x55f1617d9080] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed [Parsed_scale_0 @ 0x55f161955940] picking rgb24 out of 10 ref:yuv420p alpha:0 [Parsed_scale_0 @ 0x55f161955940] w:480 h:480 fmt:yuv420p sar:0/1 -> w:400 h:400 fmt:rgb24 sar:0/1 flags:0x4 [png @ 0x55f1615eda40] ff_frame_thread_encoder_init failed Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [AVIOContext @ 0x55f16158a2c0] Statistics: 229376 bytes read, 1 seeks Conversion failed! -------------------- Extraction failed Processing time: 0.0504 seconds. Sending no content headers.
FileRun version:
20220519
FFmpeg version:
4.2.7
Customer support service by UserEcho
It looks like the ffmpeg version 4.2.7 is sufficient.
I tried running the ffmpeg command manually from the terminal and it completed successfully and the file "extracted.png" was created.
Any ideas about the cause of the conversion failure when ffmpeg is called by FileRun?
Thanks!
Terminal command:
Output:
It can be that while FFmpeg runs via FileRun, it inherits the permissions of PHP, which might inherit the permissions of the HTTP server, and maybe there is a temporary file/folder that needs writing that fails. I can't see any details in the output.
You might get more help on this, with the output text, from the FFmpeg developers.