Hi,
it seems that versions 7.1 and 8.0 of ffmpeg introduce a regression in the
select filter.
Indeed, in order to extract images from a video at specific times, I use
the following command:
ffmpeg -y -nostdin -ss 1 -i video.mov -vf
"select='eq(pict_type\,I)+eq(pict_type\,P)'" -pix_fmt yuvj420p -an
-frames:v 1 -q:v 3 -update 1 thumbs_0001.jpg
This works well for MP4/H264 videos, but for MOV/ProRes videos (when the
file is larger than 50GB) the command only works in version 7.0 and runs
forever on version 7.1 or 8.0
Using ffprobe, I confirm that all the frames are of type pict_type=I ? So I
could suppress the filter for MOV videos but then I will have multiple
commands depending on the kind of videos.
Below a run and log for version 7.0 and a run with version 8.0.
Thanks in advance for any insight
Thomas
======================================================================================
Run with ffmpeg7.0 :
time $FFMPEG -y -nostdin -ss 1 -i xxx.mov -vf
"select='eq(pict_type\,I)+eq(pict_type\,P)'" -pix_fmt yuvj420p -an
-frames:v 1 -q:v 3 -update 1 thumbs_0001.jpg
ffmpeg version n7.0.1-3-g1800213575-20240528 Copyright (c) 2000-2024 the
FFmpeg developers
built with gcc 13.2.0 (crosstool-NG 1.26.0.65_ecc5e41)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static
--pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64
--target-os=mingw32 --enable-gpl --enable-version3 --disable-debug
--disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2
--enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp
--enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl
--disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib
--enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth
--enable-chromaprint --enable-libdav1d --enable-libdavs2
--enable-libdvdread --enable-libdvdnav --disable-libfdk-aac
--enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme
--enable-libkvazaar --enable-libaribcaption --enable-libass
--enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus
--enable-librist --enable-libssh --enable-libtheora --enable-libvpx
--enable-libwebp --enable-lv2 --enable-libvpl --enable-openal
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopenmpt --enable-librav1e
--enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr
--enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d
--disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan
--enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265
--enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi
--extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp
--extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc
--cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar
--ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm
--extra-version=20240528
libavutil 59. 8.100 / 59. 8.100
libavcodec 61. 3.100 / 61. 3.100
libavformat 61. 1.100 / 61. 1.100
libavdevice 61. 1.100 / 61. 1.100
libavfilter 10. 1.100 / 10. 1.100
libswscale 8. 1.100 / 8. 1.100
libswresample 5. 1.100 / 5. 1.100
libpostproc 58. 1.100 / 58. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'xxx.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2025-07-16T14:52:52.000000Z
encoder : Blackmagic Design DaVinci Resolve Studio
Duration: 01:29:00.92, start: 0.000000, bitrate: 185054 kb/s
Stream #0:0[0x1]: Video: prores (HQ) (apch / 0x68637061),
yuv422p10le(bt709, progressive), 1920x1080, 178139 kb/s, SAR 1:1 DAR 16:9,
25 fps, 25 tbr, 12800 tbn (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : VideoHandler
vendor_id : appl
encoder : Apple ProRes 422 HQ
timecode : 00:59:19:08
Stream #0:1[0x2]: Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz,
5.1(side), s32 (24 bit), 6912 kb/s (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : TimeCodeHandler
timecode : 00:59:19:08
Stream mapping:
Stream #0:0 -> #0:0 (prores (native) -> mjpeg (native))
[swscaler @ 000001995f5aee00] deprecated pixel format used, make sure you
did set range correctly
Output #0, image2, to 'thumbs_0001.jpg':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf61.1.100
Stream #0:0: Video: mjpeg, yuvj420p(pc, unknown/bt709/bt709,
progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25
tbn (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : VideoHandler
vendor_id : appl
timecode : 00:59:19:08
encoder : Lavc61.3.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[out#0/image2 @ 000001995f4edb80] video:37KiB audio:0KiB subtitle:0KiB
other streams:0KiB global headers:0KiB muxing overhead: unknown
frame= 1 fps=0.0 q=3.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
speed=0.366x
real 0m0,375s
user 0m0,000s
sys 0m0,015s
======================================================================================
Run with ffmpeg8.0 (I kill the process after waiting for 8 minutes)
time $FFMPEG -y -nostdin -ss 1 -i xxx.mov -vf
"select='eq(pict_type\,I)+eq(pict_type\,P)'" -pix_fmt yuvj420p -an
-frames:v 1 -q:v 3 -update 1 thumbs_0001.jpg
ffmpeg version n8.0-3-g08a81b090b-20250911 Copyright (c) 2000-2025 the
FFmpeg developers
built with gcc 15.1.0 (crosstool-NG 1.27.0.79_8f49ec5)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static
--pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64
--target-os=mingw32 --enable-gpl --enable-version3 --disable-debug
--disable-w32threads --enable-pthreads --enable-iconv --enable-zlib
--enable-libxml2 --enable-libvmaf --enable-fontconfig --enable-libharfbuzz
--enable-libfreetype --enable-libfribidi --enable-vulkan
--enable-libshaderc --enable-libvorbis --disable-libxcb --disable-xlib
--disable-libpulse --enable-opencl --enable-gmp --enable-lzma --enable-amf
--enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint
--enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav
--disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r
--enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass
--enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus
--enable-libplacebo --enable-librist --enable-libssh --enable-libtheora
--enable-libvpx --enable-libwebp --enable-libzmq --enable-lv2
--enable-libvpl --enable-openal --enable-liboapv --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopenmpt --enable-librav1e --enable-librubberband
--enable-schannel --enable-sdl2 --enable-libsnappy --enable-libsoxr
--enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d
--disable-libdrm --enable-vaapi --enable-libvidstab --enable-libvvenc
--enable-whisper --enable-libx264 --enable-libx265 --enable-libxavs2
--enable-libxvid --enable-libzimg --enable-libzvbi
--extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp
--extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc
--cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar
--ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm
--extra-version=20250911
libavutil 60. 8.100 / 60. 8.100
libavcodec 62. 11.100 / 62. 11.100
libavformat 62. 3.100 / 62. 3.100
libavdevice 62. 1.100 / 62. 1.100
libavfilter 11. 4.100 / 11. 4.100
libswscale 9. 1.100 / 9. 1.100
libswresample 6. 1.100 / 6. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'xxx.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2025-07-16T14:52:52.000000Z
encoder : Blackmagic Design DaVinci Resolve Studio
Duration: 01:29:00.92, start: 0.000000, bitrate: 185054 kb/s
Stream #0:0[0x1]: Video: prores (HQ) (apch / 0x68637061),
yuv422p10le(bt709, progressive), 1920x1080, 178139 kb/s, SAR 1:1 DAR 16:9,
25 fps, 25 tbr, 12800 tbn (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : VideoHandler
vendor_id : appl
encoder : Apple ProRes 422 HQ
timecode : 00:59:19:08
Stream #0:1[0x2]: Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz,
5.1(side), s32 (24 bit), 6912 kb/s (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2025-07-16T14:52:52.000000Z
handler_name : TimeCodeHandler
timecode : 00:59:19:08
Stream mapping:
Stream #0:0 -> #0:0 (prores (native) -> mjpeg (native))
Interrupt with Ctrl+C
real 8m6,151s
user 0m0,000s
sys 0m0,047s
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]