I'm trying to compare a CFR and VFR encode side by side, but I can't get them to sync properly. Directshow doesn't work, it screws up during seeking.
Is there a way to get Avisynth to read internal timecodes and open it up frame-accurately?
+ Reply to Thread
Results 1 to 8 of 8
-
-
Not quite - because the VFR version has fewer frames and avisynth is CFR only
But you can use FFVideoSource() with FFInfo() and it will show the CFR and VFR times overlaid so you can compare. You might compare in different tabs in avspmod for example. Seeking should be frame accurate with ffms2 for most types of files, but you can add seekmode=0, threads=1 with FFVideoSource() for extra security (slower) -
Not quite - because the VFR version has fewer frames and avisynth is CFR only
But you can use FFVideoSource() with FFInfo() and it will show the CFR and VFR times overlaid so you can compare.
Code:a=directshowsource("C:\VFR.mkv") b=directshowsource("C:\CFR.mkv") stackhorizontal(a,b)
-
There are no duplicate frames with ffms2 and it's frame accurate - I was suggesting to match by timecode using ffinfo()
You can use DSS2() if you want frame accuracy with directshow duplicates -
There are no duplicate frames with ffms2 and it's frame accurate - I was suggesting to match by timecode using ffinfo()
Also, how do I extract timecodes from MKV? I know how to do it with MP4. And if I had the times.txt, you're saying FFINFO would sync the videos together? You lost me a bit on the last post.
You can use DSS2() if you want frame accuracy with directshow duplicates -
You can use ffvideosource to extract timecodes (flv, mkv, mp4 any container)
eg.
FFVideoSource("movie.mkv", timecodes="movie_timecodes_v2.txt")
For FFInfo, it overlays CFR and VFR times so you can match them up to the correct frame
Try this and you will see what I mean
FFVideoSource("video.mkv")
FFInfo()
You can use DSS2() if you want frame accuracy with directshow duplicates -
Is the VFR video actually VFR, or is it CFR with duplicate frames or with some frames which last for what would normally be the duration for 2 frames etc? If it's the latter, by telling ffms2 to convert the frame rate to the original frame rate you should be able to effectively get it to "fill in" the duplicate/missing frames. For example, 23.976fps:
FFVideoSource("E:\video.mkv", fpsnum=24000, fpsden=1001)
If you're using DirectShowSource:
DirectShowSource("E:\video.mkv", fps=25, convertfps=true)
When using AVISynth to convert VFR video, you can probably convert it as though it's CFR, extract the time codes from the source, then use the extracted timecodes when remuxing the encoded version to match the audio sync. But of course that relies on both the source and the encode having the same number of frames. I doubt you'd have much luck trying to sync two different videos that way. I've not done it much myself but MKVCleaver will extract timecodes from MKV files and of course MKVMergeGUI will let you use those timecodes when muxing. -
Thanks PDR, DSS2 worked perfectly. I will use this from now on.
I did FFInfo and what it showed confuses me. Scrolling all the way to the middle the VFR is about 1-2 minutes behind the CFR time as reported by FFInfo but all the way at the end, it's all matched up. The VFR has 33% less frames than the CFR so I expected it to get 10-20 minutes behind at the very end. What is this reporting? The seeking offset of Directshow?
hello_hello, the video was VFR but I wanted it to be opened with the D frames included so I can align it perfectly with the CFR video for a comparison.
In this particular department, it's great to have so many choices. I usually hate endless choices.
Similar Threads
-
Avisynth script help. VFR & timecodes
By Legiit in forum EditingReplies: 5Last Post: 28th Jun 2012, 12:06 -
Converting VFR FLV (H264/AAC) to AVI (other) w/o sync issue
By kwondra34 in forum Video Streaming DownloadingReplies: 43Last Post: 11th Apr 2012, 00:54 -
Opening a .MOV in AVISynth
By sphinx99 in forum Video ConversionReplies: 4Last Post: 17th Aug 2011, 08:06 -
Cause of A/V sync and how recognize when a video has VFR and audio has VBR?
By Stb1990 in forum Newbie / General discussionsReplies: 3Last Post: 18th Apr 2010, 20:05 -
HDTV to DVD using DGIndex/AviSynth losing frames
By gadgetguy in forum Video ConversionReplies: 13Last Post: 3rd Sep 2008, 16:12