I've been reading this forum for many years and have found it to be a fantastic resource, but I have not been able to find any information about my current encoding issue.
I encode my Blu-ray rips using RipBot264 and 99% of them end up with CFR at 23.976fps but every now and then I get an encode that is reported in Media Info as VFR despite the fact that the source is CFR.
I have tried encoding the same file in Handbrake and selecting the "Contant Frame Rate" option but I get the same result - a VFR file.
I have tried ripping with MakeMKV and DVDFab but I get the same result.
I have had issues in the past with audio sync when using VFR so I want to stick with CFR for all my encoding but I cannot seem to get these "problem" rips to encode at 23.976 CFR.
I assume there is a issue with the source file as I get the same result in both RipBot264 and Handbrake. Can anyone explain what is happening and how I can avoid this problem?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
-
-
Here is the Media Info data, any idea what is going on here?
157226957171845452186403690984145537264 (0x7648CF7C27D7C4D410062815032DC8F0)
C:\Users\*\Documents\*\Video.mkv
Matroska
Version 2
18.8 GiB
1h 57mn
Variable
23.0 Mbps
Video
UTC 2015-01-14 08:01:53
MakeMKV v1.9.0 win(x64-release)
libmakemkv v1.9.0 (1.3.0/1.4.1) win(x64-release)
1
AVC
Advanced Video Codec
High@L4.1
Yes
4 frames
M=1, N=12
V_MPEG4/ISO/AVC
1h 57mn
Variable
21.0 Mbps
36.2 Mbps
1 920 pixels
1 080 pixels
16:9
Constant
23.976 fps
YUV
4:2:0
8 bits
Progressive
0.422
17.2 GiB (91%)
English
No
No
BT.709
BT.709
BT.709
2
DTS
Digital Theater Systems
A_DTS
1h 57mn
Constant
1 510 Kbps
6 channels
Front: L C R, Side: L R, LFE
48.0 KHz
24 bits
Lossy
1.24 GiB (7%)
Surround 5.1
English
Yes
No
3
PGS
S_HDMV/PGS
The same subtitle format used on BDs/HD-DVDs
English
No
No
en:Chapter 01
en:Chapter 02
en:Chapter 03
en:Chapter 04
en:Chapter 05
en:Chapter 06
en:Chapter 07
en:Chapter 08
en:Chapter 09
en:Chapter 10
en:Chapter 11
en:Chapter 12
en:Chapter 13
en:Chapter 14
en:Chapter 15
en:Chapter 16
en:Chapter 17
en:Chapter 18
en:Chapter 19
en:Chapter 20
en:Chapter 21
en:Chapter 22
en:Chapter 23
en:Chapter 24
en:Chapter 25
en:Chapter 26
en:Chapter 27
en:Chapter 28 -
Is the output MP4? If so, I believe it's the way MediaInfo interprets things and it's not always correct. You'll probably find if you open the MP4 with MKVMergeGUI and resave it as an MKV without specifying a frame rate, MediaInfo will report the MKV as constant frame rate.
If that's the reason (MP4) then it's not uncommon for HandBrake, but Ripbot....... I thought it was an AVISynth based GUI, so inherently constant frame rate? Does it leave behind a log file after an encode?
The HandBrake story. -
There's an option to tell x264 to be constant frame rate.
http://mewiki.project357.com/wiki/X264_Settings#force-cfr
I don't know how you add stuff to the command line for either of those programs
One method for working with VFR video with programs such as AVISynth is to just encode it as though it's constant frame rate, then use the original timecodes to make it variable again. You could probably do the same in reverse. Extract the video time-codes from the original MKV with MKVCkeaver, then use them for the encoded video when muxing. Although that seems like a lot of work you shouldn't need to be doing. And thinking about it......
Most muxing programs will set the frame rate to something constant if you specify one. MKVMergeGUI is no different. When you add a video stream for muxing specify the frame rate and after muxing I don't think it can help but be constant. As long as the source and the encode have the same number of frames, I don't know how that could go wrong (audio sync-wise).
Does Ripbot let you edit the Avisynth scripts it creates? If so, try adding something like this to the end of a script:
AssumeFPS(24000/1001)
Or, tell the decoder to output a constant frame rate. Not that it shouldn't but if RipBot indexes MKVs with ffms2, you could try something like this:
FFVideoSource("E:\video.mkv", fpsnum=24000, fpsden=1001, threads=1)
It's odd. I really can't think of a reason why it would be happening. -
I don't know to be honest.
I'd try checking to see if MediaInfo is misleading you.
Can you open a video via AVIsynth without too much trouble?
If so, when you open it, add some frame rate conversion to the script, specifying the frame rate it should be. If the video is VFR, it'll have a different number of frames than if it was CFR. I guess it's possible a VFR and CFR version of the same video could have the same number of frames and the VFR video happens to average out to the same frame rate as the CFR version, but I'm, not sure that'd be too likely.
So if you open a supposedly VFR video, check the frame count, add some frame rate conversion to the script and check the frame count again, if it hasn't changed then I'm pretty sure they'd both have to be CFR. If the frame count changes, then MediaInfo is correct. As long as it's not due to something silly like the very last frame being dropped, so the second last frame has twice the duration and MediaInfo sees the whole thing as VFR as a result.
FFMS2 can convert to CFR using the method I posted previously. If the video is VFR, it'll drop/duplicate frames as required to output CFR, hence the frame count changing
FFVideoSource("E:\video.mkv", fpsnum=24000, fpsden=1001, threads=1)
Remove the frame rate stuff in blue and check the frame count again. If it didn't change the source is very, very, very likely to be CFR.
I'm pretty sure the DrectShowSource frame rate conversion works the same way.
DirectShowSource("E:\video.mkv", fps=23.976, convertfps=true)
I've used the above method via MeGUI's Script Creator preview countless times. Or you can load a script into MeGUI's video section and use the "re-open video" button to open the preview. The current frame and total frame count should be displayed at the top.
Or ASVPMod I'm pretty sure it displays frame number, frame count and duration.
Or open the script with VurtualkDub. It does too.
Or open a "VFR" MKV with MKVMergeGUI and remux while specifying the frame rate. The result will be the opposite of the above methods. If the MKV is VFR the duration should change. If it's really CFR, it won't.
Lots of ways to confirm that MediaInfo is telling the truth.Last edited by hello_hello; 22nd Jan 2015 at 15:40.
-
yes, this is very handy feature in RipBot together with just 100% customizing x264 cmd line, so as for that script, it is in properties, and clicking on "show script",it loads clip something like this, using video variable:
Code:video=DirectShowSource("C:\Untitled.avi",audio=false).ConvertToYV12()
Code:video=DirectShowSource("C:\Untitled.avi",audio=false).ConvertToYV12().AssumeFPS(24000/1001)
Code:video=DirectShowSource("C:\Untitled.avi",audio=false).ConvertToYV12() video=video.AssumeFPS(24000/1001)