I use setpts to speed up some video that I'm concatenating from my car's dashcam. The process is consistent and hasn't changed recently. Here's an example command line: C:\Windows\ffmpeg.exe -hide_banner -i D:\ROAV\MOVIE\2024_0803_173613_229.MP4 -i D:\ROAV\MOVIE\2024_0803_173713_230.MP4 -i D:\ROAV\MOVIE\2024_0803_173813_231.MP4 -i D:\ROAV\MOVIE\2024_0803_173913_232.MP4 -i D:\ROAV\MOVIE\2024_0803_174013_233.MP4 -i D:\ROAV\MOVIE\2024_0803_174113_234.MP4 -i D:\ROAV\MOVIE\2024_0803_174213_235.MP4 -i D:\ROAV\MOVIE\2024_0803_174313_236.MP4 -i D:\ROAV\MOVIE\2024_0803_174413_237.MP4 -i D:\ROAV\MOVIE\2024_0803_174513_238.MP4 -i D:\ROAV\MOVIE\2024_0803_174613_239.MP4 -i D:\ROAV\MOVIE\2024_0803_174713_240.MP4 -i D:\ROAV\MOVIE\2024_0803_174813_241.MP4 -i D:\ROAV\MOVIE\2024_0803_174913_242.MP4 -i D:\ROAV\MOVIE\2024_0803_175013_243.MP4 -i D:\ROAV\MOVIE\2024_0803_175113_244.MP4 -i D:\ROAV\MOVIE\2024_0803_175213_245.MP4 -i D:\ROAV\MOVIE\2024_0803_175313_246.MP4 -i D:\ROAV\MOVIE\2024_0803_175413_247.MP4 -i D:\ROAV\MOVIE\2024_0803_175513_248.MP4 -i D:\ROAV\MOVIE\2024_0803_175613_249.MP4 -i D:\ROAV\MOVIE\2024_0803_175713_250.MP4 -i D:\ROAV\MOVIE\2024_0803_175813_251.MP4 -i D:\ROAV\MOVIE\2024_0803_175913_252.MP4 -i D:\ROAV\MOVIE\2024_0803_180013_253.MP4 -i D:\ROAV\MOVIE\2024_0803_180113_254.MP4 -i D:\ROAV\MOVIE\2024_0803_180213_255.MP4 -filter_complex [0:v][1:v][2:v][3:v][4:v][5:v][6:v][7:v][8:v][9:v][10:v][11:v][12:v][13:v][14:v][15:v][16:v][17:v][18:v][19:v][20:v][21:v][22:v][23:v][24:v][25:v][26:v]concat=n=27:v=1[v];[v]setpts=(1/60)*PTS,drawtext=fontfile=C\\:/Windows/Fonts/consola.ttf:fontcolor=white:fontsize=80:y=main_h-text_h-50:x=50:text=WimsWorld[o] -map [o] -map_metadata -1 -c:v libx265 -crf 23 -preset veryfast -movflags +faststart -bf 2 -g 15 -pix_fmt yuv420p -n D:\ROAV\20240803-BMW.mp4 The important part is setpts=(1/60)*PTS which should convert 1 minute of the source video to 1 second in the destination I noticed that watching recent videos strangely seemed much smoother, then realized that they were also significantly larger. https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20v... still says that using this method will drop frames, but when I ran ffprobe on the current file I got: C:\Users\Wim>ffprobe d:\ROAV\20240803-BMW.mp4 ffprobe version 2024-07-18-git-fa5a605542-full_build-www.gyan.dev Copyright (c) 2007-2024 the FFmpeg developers built with gcc 13.2.0 (Rev5, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 59. 28.100 / 59. 28.100 libavcodec 61. 10.100 / 61. 10.100 libavformat 61. 5.101 / 61. 5.101 libavdevice 61. 2.100 / 61. 2.100 libavfilter 10. 2.102 / 10. 2.102 libswscale 8. 2.100 / 8. 2.100 libswresample 5. 2.100 / 5. 2.100 libpostproc 58. 2.100 / 58. 2.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\ROAV\20240803-BMW.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf61.5.101 Duration: 00:00:27.07, start: 0.000000, bitrate: 889896 kb/s Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 2560x1440, 889591 kb/s, 1800.04 fps, 1000k tbr, 1000k tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc61.10.100 libx265 Running it on an older file produced: C:\Users\Wim>ffprobe d:\ROAV\20240523-BMW.mp4 ffprobe version 2024-07-18-git-fa5a605542-full_build-www.gyan.dev Copyright (c) 2007-2024 the FFmpeg developers built with gcc 13.2.0 (Rev5, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 59. 28.100 / 59. 28.100 libavcodec 61. 10.100 / 61. 10.100 libavformat 61. 5.101 / 61. 5.101 libavdevice 61. 2.100 / 61. 2.100 libavfilter 10. 2.102 / 10. 2.102 libswscale 8. 2.100 / 8. 2.100 libswresample 5. 2.100 / 5. 2.100 libpostproc 58. 2.100 / 58. 2.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\ROAV\20240523-BMW.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf61.3.103 Duration: 00:09:40.88, start: 0.000000, bitrate: 26675 kb/s Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 2560x1440, 26672 kb/s, 25 fps, 25 tbr, 12800 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc61.5.104 libx265 The important difference is that the older file reports 2560x1440, 26672 kb/s, 25 fps, 25 tbr, 12800 tbn and the newer file reports 2560x1440, 889591 kb/s, 1800.04 fps, 1000k tbr, 1000k tbn. This seems that the new code speed up the reported fps without dropping any frames.
This seems that the new code speed up the reported fps without dropping any frames.
Looks like this was changed here https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f121d954ac89060cb7b07da23047...
On Thu, Aug 8, 2024 at 6:27 PM <rectalogic@rectalogic.com> wrote:
This seems that the new code speed up the reported fps without dropping any frames.
Looks like this was changed here https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f121d954ac89060cb7b07da23047...
If that's what changed, it obviously took a while for it to propagate to my running machine. That commit was dated Wed, 27 Mar 2024. As the method I'm using has changed its behavior to a new behavior, the old behavior still is documented on FFMPEG's pages, and the new behavior is something I am not crazy about, Is there a way of getting the equivalent of the old behavior with the new code?
On 2024-08-10 11:04 am, William C Bonner wrote:
On Thu, Aug 8, 2024 at 6:27 PM <rectalogic@rectalogic.com> wrote:
This seems that the new code speed up the reported fps without dropping any frames. Looks like this was changed here https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f121d954ac89060cb7b07da23047...
If that's what changed, it obviously took a while for it to propagate to my running machine. That commit was dated Wed, 27 Mar 2024.
As the method I'm using has changed its behavior to a new behavior, the old behavior still is documented on FFMPEG's pages, and the new behavior is something I am not crazy about, Is there a way of getting the equivalent of the old behavior with the new code?
Add `-fps_mode passthrough` Regards, Gyan
On Sat, Aug 10, 2024 at 1:22 AM Gyan Doshi <ffmpeg@gyani.pro> wrote:
On Thu, Aug 8, 2024 at 6:27 PM <rectalogic@rectalogic.com> wrote:
This seems that the new code speed up the reported fps without dropping any frames. Looks like this was changed here
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f121d954ac89060cb7b07da23047...
If that's what changed, it obviously took a while for it to propagate to my running machine. That commit was dated Wed, 27 Mar 2024.
As the method I'm using has changed its behavior to a new behavior, the
On 2024-08-10 11:04 am, William C Bonner wrote: old
behavior still is documented on FFMPEG's pages, and the new behavior is something I am not crazy about, Is there a way of getting the equivalent of the old behavior with the new code?
Add `-fps_mode passthrough`
Regards, Gyan
I just updated my local executable and it seems to have reverted to the old process, which runs significantly faster and produces much smaller output. Here's an example of the command line I'm using: C:\WINDOWS\ffmpeg.exe -hide_banner -f concat -safe 0 -i C:\Users\Wim\AppData\Local\Temp\WimB59.tmp -vf setpts=(1/60)*PTS,drawtext=fontfile=C\\:/WINDOWS/Fonts/consola.ttf:fontcolor=white:fontsize=80:y=main_h-text_h-50:x=50:text=WimsWorld -an -map_metadata -1 -c:v libx265 -crf 23 -preset veryfast -movflags +faststart -bf 2 -g 15 -pix_fmt yuv420p -n D:\ROAV\20250319-BMW.mp4 and the information on the executable I'm running: ffmpeg version 2025-03-20-git-76f09ab647-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers built with gcc 14.2.0 (Rev1, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 59. 60.100 / 59. 60.100 libavcodec 61. 33.102 / 61. 33.102 libavformat 61. 9.107 / 61. 9.107 libavdevice 61. 4.100 / 61. 4.100 libavfilter 10. 9.100 / 10. 9.100 libswscale 8. 13.103 / 8. 13.103 libswresample 5. 4.100 / 5. 4.100 libpostproc 58. 4.100 / 58. 4.100 Universal media converter usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
participants (3)
-
Gyan Doshi -
rectalogic@rectalogic.com -
William C Bonner