Yes, that time has come. Sigh. I wanted to poll you experts on the best way to convert VFR to CFR e.g. a smartphone mp4. After some fiddling around, this is the workflow I have come up with:
1. Download the following plug-ins for Avisynth:
- FFMS22. Create the following Avisynth script:
- VFRtoCFR here
3. Run the avs script through ffmpeg, e.g.:Code:v=ffvideosource(clip,timecodes=tc) VFRtoCFR(v, times=tc, numfps=30000, denfps=1001, dropped=false) ConvertToYV16(v,interlaced=false,matrix="PC.701",chromaresample="spline36") #For final output as 4:2:2, leave out otherwise
This seems to work pretty well. I am sure many will have other preferred methods for Step 3.Code:ffmpeg -i VFRtoCFR.avs -pix_fmt uyvy422 -c:v rawvideo -vtag "UYVY" -a:n CFR.avi
I am curious what other workflows/filters everyone else uses for Steps 1 and 2. Thanks.
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 7 of 7
Thread
-
-
Thanks for the reply. I read about that on the doom9 forum. Seems there are some differences in how FFMS2 and VFRtoCFR handle the conversion. I have only just started playing around with this. Any thoughts or experience on the differences between the two?
-
Never used VFRtoCFR. LWLibAvVideoSource supports fpsnum and fpsden too. Even DirectShowSource, though I don't trust it, supports VFR to CFR with fps and convertfps.
-
The differences are subtle but real which motivated the creator of VFRtoCFR. FFMS2 chooses the frame that is closest to the requested timecode. This means FFMS2 will grab frames forward in time if the requested timecode is greater than half the distance between the most recent and next frames. This may or may not be acceptable. VFRtoCFR takes a different approach that basically involves picking the frame that occupies the greatest window in the elapsed time should more than one exist, iow, not the necessarily most recent frame and apparently never a future frame.
I find it interesting that different strategies exist and contemplating which is best has made wonder: with the prevalence of VFR video, I am surprised nobody has tried to tackle this problem using the interpolation algorithms found in de-interlacing tools. -
For vfr video files i open them with tsmuxer and set the change fps to 24000/1000 for video and demux and then remux the created files,needs no re-encoding,this will work as long as the source has no real frames that switch to a different frame rate.Use different fps for pal and other rates.
I think,therefore i am a hamster. -
johns0, thanks. Never messed with tsmuxer before, but that was surprisingly easy. It even worked on my 4K video.
Similar Threads
-
MKV container - Get frame count without extracting (CFR source)?
By Interpolator in forum Video ConversionReplies: 4Last Post: 16th Aug 2015, 22:00 -
RipBot264 and Handbrake producing VFR when CFR is selected
By duffbeer in forum Blu-ray RippingReplies: 9Last Post: 22nd Jan 2015, 08:50 -
Syncing VFR Video with Audio from CFR Video
By Chri5 in forum Newbie / General discussionsReplies: 11Last Post: 25th Jan 2014, 03:17 -
What mobile phones uses VFR (or CFR) for recorded video clips?
By Gew in forum Portable VideoReplies: 0Last Post: 27th Jan 2012, 11:49 -
VFR -> CFR in VirtualDub
By KeyMs92 in forum EditingReplies: 19Last Post: 7th Oct 2011, 18:41