Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th January 2020, 22:28   #1  |  Link
Richard1485
Guest
 
Posts: n/a
x264: Ensuring cfr with lavf/ffms input

I'd like to double-check that I've correctly interpreted how to ensure that x264 uses cfr when using lavf or ffms as the demuxer, because they make x264 vfr aware, resulting in vfr encoding by default (at least with the inputs that I'm feeding it). Specifying the frame-rate results in cfr encoding:

Code:
x264 --demuxer lavf/ffms --output /dev/null --fps 24000/1001 ~/input.mkv
According to this wiki, --fps implies --force-cfr, so I shouldn't need to set that explicitly. What I want to establish is that the above ensures that vfr never kicks in at all -- in other words, that my video has not gone cfr->vfr->cfr internally, which might conceivably cause problems. So far, my encodings have completed without discernible frame-rate issues, but I'd like to be absolutely sure that I've not overlooked/misinterpreted something.

I'm on Ubuntu 19.10.

Last edited by Richard1485; 27th January 2020 at 22:30.
  Reply With Quote
Old 27th January 2020, 22:55   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by Richard1485 View Post
--fps implies --force-cfr
This is true.

Quote:
Originally Posted by Richard1485 View Post
so I shouldn't need to set that explicitly. What I want to establish is that the above ensures that vfr never kicks in at all -- in other words, that my video has not gone cfr->vfr->cfr internally, which might conceivably cause problems. So far, my encodings have completed without discernible frame-rate issues, but I'd like to be absolutely sure that I've not overlooked/misinterpreted something.
I'm not quite sure what you mean. Note that --fps/--force-fps only change the timings and set the cfr flag in the bitstream. They do not actually duplicate/drop frames (or similar mechanism) to convert VFR to CFR. If your source is "true" VFR then you will run into sync problems. If your source is CFR then using --fps is fine.
sneaker_ger is offline   Reply With Quote
Old 27th January 2020, 23:09   #3  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by sneaker_ger View Post
Note that --fps/--force-fps only change the timings and set the cfr flag in the bitstream. They do not actually duplicate/drop frames (or similar mechanism) to convert VFR to CFR.
That's good to know. I was indeed envisaging such a mechanism, which is what had me concerned.

Quote:
Originally Posted by sneaker_ger View Post
If your source is "true" VFR then you will run into sync problems. If your source is CFR then using --fps is fine.
My sources are CFR, so thanks for the confirmation.
  Reply With Quote
Reply

Tags
cfr, linux, vfr, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.