AviSynth or MEncoder as video Source ?

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

AviSynth or MEncoder as video Source ?

Postby meRobs » Sun Feb 28, 2010 10:30 pm

[Updated 16 Apr 2010]
As explained elsewhere (viewtopic.php?f=17&t=8082&p=24703#p24703), a VOB file will usually have a Video Delay value indicated in its metadata, usually negative to indicate that the audio arrives later than the video. The value may be seen by clicking on the file, when in MediaCoder, and then Item > Details of Selected File (displays properties via MediaInfo). Being similar to a VOB, an MPEG2 file may also have a 'Video delay' in its header.

When the VOB or an MPEG is converted to an AVI, WMV or MPEG2, for example, the audio delay will be present (out of sync) when MEncoder is used as the video Source. The delay may be corrected in MediaCoder during such a conversion, as explained here: viewtopic.php?f=17&t=8160&start=0.

Once I realised that setting AviSynth as the video source may avoid the audio delay, I did a comparison to see what its disadvantages are, if any. I used MediaCoder build 4606.

I chose a 10 min VOB from an NTSC disc – the second in a VTS title – with a video delay of –540 msec (16 frames) and with easily identified impact noises near each end. It was converted to 5 formats: MPEG2/AC3, DV-AVI, WMV-8, MPEG4 (AVI) and to FLV/MP3, all with the same Resize (720x480), etc.

The time to convert using MEncoder and AviSynth (values in brackets), when expressed as a percentage of the original file duration was: 30% (43%), 27% (61%), 36% (51%), 24% (44%) and 31% (49%), respectively. In all cases, use of the AviSynth took longer by up to 2 to 1. Of course, the times relate only to my system but the relative values should be valid.

All output files created with MEncoder as the source were out of sync by 16 frames, whereas, those from AviSynth were in sync. AviSynth achieved this by adding ~16 duplicate video frames to the start of the video stream so as to align it with the audio stream. These excess frames may or may not be a problem, depending on what you wish to use the files for. This was determined for all formats except FLV by examining them in Adobe Premiere. The FLV files were assessed by playing them in VLC.

There were minor differences in Hue and Lightness between the files.

Hence, AviSynth has the advantage of overcoming (avoiding) the audio delay in VOB/MPG files but adds extra duplicate frames at the start of the file and takes significantly longer to convert.

NOTE 1
: by copying the AC3 DLL from Adobe Encore CS3 to the root directory of Adobe Premiere CS3, the latter is able to import and play VOB files (often needing a change in extension to .mpg). Strangely, the above VOB played in Premiere in sync, despite its stated video delay!

NOTE 2: The use of AviSynth in build 4625 worked as above, except that for a VOB source file with numerous audio streams, it chose the second stream, the first that was not 6-channel. So, be wary.
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

Return to “Generic Discussions”

Who is online

Users browsing this forum: No registered users and 8 guests