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. |
|
22nd October 2010, 09:58 | #1 | Link |
Learning fast
Join Date: May 2008
Location: Bucharest
Posts: 33
|
Broken VFR decode
(I'm not sure this is the right forum for this post)
1. How do I decode VFR correctly? 2. How do I get the frame number accurately? I ripped a DVD and encoded with x264 in Matroska container. The rip has variable frame rate (60fps -> 30fps) in some small segments. The trouble is decoding the thing. The 30fps portions look choppy (like 3fps). EDIT:30fps actually looks like 60fps-pause-60fps-pause. Frame-by-frame looks OK. I've tried decoding with ffdshow and the internal MPC decoders. Also decoding the MKV file is strange. In AviSynth, if I use DirectShowSource I get 305781 frames, with DSS2 I get 306086 frames. So I'm not sure the ranges in the timecodes file are set correctly. Last edited by aand; 22nd October 2010 at 10:06. |
22nd October 2010, 12:17 | #2 | Link |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
The easiest thing would be to rerip the DVD again and to use CFR. There's no gain in using VFR on CFR sources, VFR is mainly used for PC screen capturing (for presentations, demos, tutorials).
Last edited by Ghitulescu; 22nd October 2010 at 12:51. |
22nd October 2010, 12:39 | #4 | Link | |
User of free A/V tools
Join Date: Jul 2006
Location: SK
Posts: 826
|
Quote:
aand has problems with decoding VFR=Variable Frame Rate stream properly. It has nothing to do with CBR (ConstantBitRate) or VBR (VariableBitRate) modes of encoding being actually used. aand, try to feed your source material directly to x264 (no Avisynth involved) or use FFMS2 as a source filter in your AVS script. These should help x264 to keep & obey timecodes of input VFR material properly. |
|
22nd October 2010, 12:44 | #5 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
AFAIK DSS2 does a VFR -> CFR conversion, that's why the number of frames changes. DirectShowSource does it only when "convertfps=true" is set.
1.) Try different renderers in MPC and a player without DirectShow like VLC. 2.) Are you sure that the timecodes have been created correctly? Extract them using mkvtoolnix and look at the 30 fps sections. |
22nd October 2010, 13:06 | #6 | Link | |||
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
Quote:
Quote:
Apparently, 4 guys here "hunt" me for every little thing I do: Two of them are here, I'm expecting the third one. I still think that the easiest and least uncomplicated way is to rerip the DVD, there's no use of a VFR for sources that are CFR. I'm not saying that VLC or MPC-HC cannot cope with VFR, they do, but this might unduly restrict the usage of the MKV. Quote:
The material was already encoded, aand needs to decode it, not to reencode it again. |
|||
22nd October 2010, 13:35 | #7 | Link |
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
you should follow sneaker_ger's #2: extracting out the timecodes from your resulting mkv and then convert the v2 format to v1 for easier readability.
from the v1 timecodes you can see what the vfr sections are and see if they're correct/incorrect. also how did you pass the vfr video to x264 as an input to begin with? the number of frames can also be found by the number of lines with numbers on them (exclude the header and possibly a blank line at the end) in the v2 timecodes file that you extract out |
22nd October 2010, 17:30 | #10 | Link |
Learning fast
Join Date: May 2008
Location: Bucharest
Posts: 33
|
Wow so many replies!
SOLUTION (?!): it's a bug in MPC decoding (internal FFmpeg, intenal DXVA, external ffdshow all are displayed wrong). WMP works. VLC works. Damn I thought MPC is bulletproof I don't wanna use WMP or VLC! Replies: GHITULESCU Re-rip not necessary. I had to drop some frames because of little segments of NTSC film (24fps -> 30fps) mixed in with the 30fps interlaced material. Some film parts got deinterlaced ugly ( approximate frame order: 1 2 2 2 3 3 4 2 4 5 5 6 6 6 7 7 8 6 8 9 ...). So I just used selectodd() on those segments - "bad" frames were only even numbers. kemuri-_9 I used v1 timecodes like this: Assume 59.940180 8108,8137,29.97009 13814,13856,29.97009 14122,14215,29.97009 ... Input for x264 was an AviSynth script. |
22nd October 2010, 14:35 | #11 | Link |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
I'm not posting nonsense. It was a typo.
The guy has a DVD and an MKV that is VFR, and has problems playing the second. Solutions: 1. find a player (apparently there are some problems here) 2. find an MKV verifier, pin point the problem, act accordingly - steps: find the tool (is there any?), check the stream (how deep?), find the problem (needs further research on various parameters and values), correct the stream (which tool?), check the result again (maybe restart from step 1 again) 3. find an alternative way (avisynth script, VFR codecs etc.) - this way must be saved somehow, to be reused next time. 4. rerip the DVD once more, paying attention to configuration. The last option seems to be the quickest and the least resource demanding. It also seems to be future proof (less than a 1:1 copy, but still), since all software players can cope with CFR. That's the purpose of a backup, right, to allow future uses, while keeping the original safely in the safe? |
23rd October 2010, 20:49 | #14 | Link |
Learning fast
Join Date: May 2008
Location: Bucharest
Posts: 33
|
HAHA! I used EVR custom. EVR sync, Haali renderer work ok. -.-"
Thanks! Didn't even think of that! EDIT: this option caused the trouble: View-> Renderer-> Presentation-> Enable Frame Time Correction Enable only when you experience stuttering video because of a buggy decoder or splitter. For example VC-1 content in m2ts container currently needs this. I disabled it and now there's no stuttering. Last edited by aand; 23rd October 2010 at 21:04. |
Tags |
mkv, variable frame rate, vfr, x264 |
|
|