[FFmpeg-user] Framerate automatically increased while cropping
Hi, why is the framerate automatically changed here from 29.98 fps to 120 fps, and how can I prevent from this ? $ ffmpeg -i Demo\ 31.10.2020\ Köln\ Vorspiel+Zugriff.mp4 -vf crop=640:320:640:176 Demo\ 31.10.2020\ Köln\ Vorspiel+Zugriff\ Ausschnitt.mp4 ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Demo 31.10.2020 Köln Vorspiel+Zugriff.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Duration: 00:07:30.03, start: 0.00, bitrate: 2580 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 63 kb/s (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 0x65debc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64 [libx264 @ 0x65debc0] profile High, level 3.1, 4:2:0, 8-bit [libx264 @ 0x65debc0] 264 - core 161 r3048 b86ae3c - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'Demo 31.10.2020 Köln Vorspiel+Zugriff Ausschnitt.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 640x320, q=2-31, 120 fps, 15360 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc58.134.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc58.134.100 aac frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate= 920.9kbits/sframe= 61 fps=0.0 q=33.0 size= 0kB time=00:00:00.51 bitrate= 0.7kbits/frame= 81 fps= 54 q=33.0 size= 0kB time=00:00:00.68 bitrate= 0.6kbits/frame= 125 fps= 62 q=33.0 size= 0kB time=00:00:01.04 bitrate= 0.4kbits/frame= 165 fps= 65 q=33.0 size= 0kB time=00:00:01.38 bitrate= 0.3kbits/frame= 193 fps= 62 q=33.0 size= 0kB time=00:00:01.62 bitrate= 0.2kbits/frame= 229 fps= 62 q=33.0 size= 0kB time=00:00:01.92 bitrate= 0.2kbits/frame= 265 fps= 63 q=33.0 size= 256kB time=00:00:02.21 bitrate= 945.1kbits/frame= 301 fps= 61 q=33.0 size= 256kB time=00:00:02.51 bitrate= 832.9kbits/frame= 329 fps= 61 q=33.0 size= 256kB time=00:00:02.73 bitrate= 768.0kbits/frame= 361 fps= 60 q=33.0 size= 256kB time=00:00:03.03 bitrate= 692.3kbits/frame= 389 fps= 59 q=33.0 size= 256kB time=00:00:03.26 bitrate= 642.5kbits/ -Ulf ___ ffmpe
Re: [FFmpeg-user] Framerate automatically increased while cropping
> why is the framerate automatically changed here from 29.98 fps to 120 > fps, and how can I prevent from this ? > > Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, > 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) From what I can find, "tbr" is the target framerate the media is indicating it wants. So ffmpeg is just respecting that value. I guess you could use the -r option to override this and force a specific framerate if you want something different? Or you could fix the metadata in the source file to have the correct target framerate to begin with. Cheers, Adam. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Framerate automatically increased while cropping
On 2021-08-23 10:45 am, Adam Nielsen via ffmpeg-user wrote: why is the framerate automatically changed here from 29.98 fps to 120 fps, and how can I prevent from this ? Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) From what I can find, "tbr" is the target framerate the media is indicating it wants. So ffmpeg is just respecting that value. I guess you could use the -r option to override this and force a specific framerate if you want something different? Or you could fix the metadata in the source file to have the correct target framerate to begin with. `-tbr` is the framerate required to retain the smallest interval between frames in the jnput. You can add `-fpsmax 30` with v4.4 or newer. This will limit output rate to 30 if the input is higher else keep the original rate. Regards, Gyan ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Framerate automatically increased while cropping
Am 23.08.21 um 07:15 schrieb Adam Nielsen via ffmpeg-user: why is the framerate automatically changed here from 29.98 fps to 120 fps, and how can I prevent from this ? Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) From what I can find, "tbr" is the target framerate the media is indicating it wants. This is interesting. Thanks for the info. I would interpret this as meant for the playback of the video, e.g. for the ffplay. And why isn't it abreviated with "tfr" ? So ffmpeg is just respecting that value. With that contract I do hard, because in result I get a video with 15 % more bitrate and with lower quality, q=33.0 instead q=29.0. So I think, ffmpeg should retain the original bitrate and just propagate the tbr to be interpreted by the player. I guess you could use the -r option to override this and force a specific framerate if you want something different? Yes, this works fine. But I would appreciate, if I could use something like -r=inputrate or --keep_framerate Or you could fix the metadata in the source file to have the correct target framerate to begin with. Hm, this is not really convenient. -Ulf ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Framerate automatically increased while cropping
Am 23.08.21 um 07:44 schrieb Gyan Doshi: You can add `-fpsmax 30` with v4.4 or newer. This will limit output rate to 30 if the input is higher else keep the original rate. With that I get a rate of 30 instead of the original 29.98, so each 50th frame gets duplicated, which I value as nonsense. -Ulf ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Framerate automatically increased while cropping
Am 24.08.21 um 13:51 schrieb Ulf Zibis: Am 23.08.21 um 07:15 schrieb Adam Nielsen via ffmpeg-user: why is the framerate automatically changed here from 29.98 fps to 120 fps, and how can I prevent from this ? Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) From what I can find, "tbr" is the target framerate the media is indicating it wants. This is interesting. Thanks for the info. I would interpret this as meant for the playback of the video, e.g. for the ffplay. And why isn't it abreviated with "tfr" ? So ffmpeg is just respecting that value. With that contract I do hard, because in result I get a video with 15 % more bitrate and with lower quality, q=33.0 instead q=29.0. So I think, ffmpeg should retain the original bitrate and just propagate the tbr to be interpreted by the player. I guess you could use the -r option to override this and force a specific framerate if you want something different? Yes, this works fine. But I would appreciate, if I could use something like -r=inputrate or --keep_framerate But with "-r 29.98" I get "tbr=29.98" instead the original 120, which I think would be correct. -Ulf ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Framerate automatically increased while cropping
Am 23.08.21 um 07:15 schrieb Adam Nielsen via ffmpeg-user: why is the framerate automatically changed here from 29.98 fps to 120 fps, and how can I prevent from this ? Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) From what I can find, "tbr" is the target framerate the media is indicating it wants. Maybe "target buffer rate" is meant. Anyone knows? So ffmpeg is just respecting that value. This is not always the case. With ffmpeg -ss 17:45 -t 0:30 -i "Original.mp4" -c copy -movflags faststart "output 0_30.mp4" I get a tbr of 59.94. But with ffmpeg -t 7:30 -i "Original.mp4" -c copy -movflags faststart "output 7_30.mp4" I get a tbr of 120. $ ffmpeg -ss 17:45 -t 0:30 -i "Original.mp4" -c copy -movflags faststart "output 0_30.mp4" ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Original.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 Duration: 02:20:49.17, start: 0.00, bitrate: 2322 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 11377 kb/s, 31.54 fps, 120 tbr, 90k tbn, 2k tbc (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 63 kb/s (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Output #0, mp4, to 'output 0_30.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 11377 kb/s, 31.54 fps, 120 tbr, 90k tbn, 90k tbc (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 63 kb/s (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mp4 @ 0x70eb080] Starting second pass: moving the moov atom to the beginning of the file frame= 909 fps=0.0 q=-1.0 Lsize= 9573kB time=00:00:29.99 bitrate=2614.2kbits/s speed=65.6x video:9303kB audio:238kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.335273% $ ffprobe "output 0_30.mp4" ffprobe version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2021 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mov,mp4,
Re: [FFmpeg-user] Framerate automatically increased while cropping
Am 24.08.21 um 13:51 schrieb Ulf Zibis I guess you could use the -r option to override this and force a specific framerate if you want something different? Yes, this works fine. But I would appreciate, if I could use something like -r=inputrate or --keep_framerate I've found out, that using "vsync 0" is a method to retain all frames, framerate and tbr. -Ulf ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".