0
Not a bug

mp4 thumbnail generation ffmpeg failed

johnny u 1 year ago updated by Vlad R 1 year ago 3

Hi,

After Importing some videos, there are no thumbnails for it.

I Tested it on your demo-installation, and there is no problem. is my version of ffmpeg (2.7.7) too old for the given params?

The debug-Output from the Control-Panel is:

Processing: <path_to_file>/20210602_134221_02.mp4
As: mp4
File size: 9900801 bytes (9.4 MB)
Removing expired lock: <path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/9900801/400_400_contain[1].png.lock
Creating lock: <path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/9900801/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 "<path_to_file>/20210602_134221_02.mp4" -frames:v 1 -filter:v scale=w=400:h=400:force_original_aspect_ratio=decrease "<path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/extracted.png" 2>&1
Returned code: 1
--------------------
ffmpeg version 2.7.7 Copyright (c) 2000-2015 the FFmpeg developers
   built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
   configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=arm --target-os=linux --cross-prefix=/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-doc --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --disable-decoder=hevc --disable-muxer=hevc --disable-demuxer=hevc --disable-parser=hevc --cc=/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc
   libavutil      54. 27.100 / 54. 27.100
   libavcodec     56. 41.100 / 56. 41.100
   libavformat    56. 36.100 / 56. 36.100
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 16.101 /  5. 16.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.100 /  1.  2.100
   libpostproc    53.  3.100 / 53.  3.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 file with argument '<path_to_file>/20210602_134221_02.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 '<path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/extracted.png' ... matched as output file.
 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 file <path_to_file>/20210602_134221_02.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: <path_to_file>/20210602_134221_02.mp4.
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] ISO: File Type Major Brand: mp42
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 29.916667 0.006467
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 30.000000 0.000004
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 60.000000 0.000014
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 120.000000 0.000057
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 240.000000 0.000230
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 29.970030 0.000906
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] rfps: 59.940060 0.003625
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Before avformat_find_stream_info() pos: 9900801 bytes read:37946 seeks:1
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 2 with DTS 1024, packet 3 with DTS 1024
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 3 with DTS 1024, packet 4 with DTS 1024
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 5 with DTS 4840, packet 6 with DTS 4840
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 6 with DTS 4840, packet 7 with DTS 4840
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 7 with DTS 4840, packet 8 with DTS 4840
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 9 with DTS 8721, packet 10 with DTS 8721
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 10 with DTS 8721, packet 11 with DTS 8721
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 11 with DTS 8721, packet 12 with DTS 8721
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 13 with DTS 13555, packet 14 with DTS 13555
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 14 with DTS 13555, packet 15 with DTS 13555
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 15 with DTS 13555, packet 16 with DTS 13555
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 17 with DTS 17346, packet 18 with DTS 17346
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 18 with DTS 17346, packet 19 with DTS 17346
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 19 with DTS 17346, packet 20 with DTS 17346
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 21 with DTS 21135, packet 22 with DTS 21135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 22 with DTS 21135, packet 23 with DTS 21135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 23 with DTS 21135, packet 24 with DTS 21135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 25 with DTS 24986, packet 26 with DTS 24986
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 26 with DTS 24986, packet 27 with DTS 24986
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 27 with DTS 24986, packet 28 with DTS 24986
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 29 with DTS 29763, packet 30 with DTS 29763
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 30 with DTS 29763, packet 31 with DTS 29763
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 31 with DTS 29763, packet 32 with DTS 29763
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 33 with DTS 33619, packet 34 with DTS 33619
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 34 with DTS 33619, packet 35 with DTS 33619
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 35 with DTS 33619, packet 36 with DTS 33619
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 37 with DTS 37477, packet 38 with DTS 37477
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 38 with DTS 37477, packet 39 with DTS 37477
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 39 with DTS 37477, packet 40 with DTS 37477
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 41 with DTS 42272, packet 42 with DTS 42272
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 42 with DTS 42272, packet 43 with DTS 42272
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 43 with DTS 42272, packet 44 with DTS 42272
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 45 with DTS 46102, packet 46 with DTS 46102
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 46 with DTS 46102, packet 47 with DTS 46102
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] Non-increasing DTS in stream 1: packet 47 with DTS 46102, packet 48 with DTS 46102
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xd18610] After avformat_find_stream_info() pos: 411358 bytes read:449264 seeks:2 frames:50
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '<path_to_file>/20210602_134221_02.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2021-06-02 11:42:27
   Duration: 00:00:05.14, start: 0.000000, bitrate: 15403 kb/s
     Stream #0:0(eng), 1, 1/90000: Video: h264 (Baseline), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, left), 1440x1080 (1440x1088), 1/180000, 16928 kb/s, SAR 1:1 DAR 4:3, 29.80 fps, 30 tbr, 90k tbn, 180k tbc (default)
     Metadata:
       rotate          : 180
       creation_time   : 2021-06-02 11:42:27
       handler_name    : VideoHandle
     Side data:
       displaymatrix: rotation of -180.00 degrees
     Stream #0:1(eng), 49, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 259 kb/s (default)
     Metadata:
       creation_time   : 2021-06-02 11:42:27
       handler_name    : SoundHandle
 Successfully opened the file.
 Parsing a group of options: output file <path_to_file>/.filerun.thumbnails/20210602_134221_02.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: <path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/extracted.png.
 [NULL @ 0xd1ce90] Unable to find a suitable output format for '<path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/extracted.png'
 <path_to_file>/.filerun.thumbnails/20210602_134221_02.mp4/extracted.png: Invalid argument
 [AVIOContext @ 0xd0eb60] Statistics: 449264 bytes read, 2 seeks</path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file></path_to_file>
Under review

Very high chance is because of the older FFMpeg version. Looks like it's not detecting the output format PNG right.

runs perfect with ffmpeg version 4.3.3

thank you very much