From c61154002d8620f4349d034db768795b11fe1d3c Mon Sep 17 00:00:00 2001 From: gpoirier Date: Sun, 4 Sep 2005 12:21:47 +0000 Subject: In order to make sure A/V sync is preserved, MEncoder really has to be fed with an audio track. Added a paragraph that explains why, and nuked all the occurences of "-nosound". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16384 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/encoding-guide.xml | 55 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'DOCS') diff --git a/DOCS/xml/en/encoding-guide.xml b/DOCS/xml/en/encoding-guide.xml index a0410b0a8c..b7718b8fcb 100644 --- a/DOCS/xml/en/encoding-guide.xml +++ b/DOCS/xml/en/encoding-guide.xml @@ -1295,7 +1295,9 @@ Note the and options. algorithms were designed with the intention of recovering files with broken sync. However, in some cases they can cause unnecessary skipping and duplication of -frames, and possibly slight A/V desync, when used with proper input. +frames, and possibly slight A/V desync, when used with proper input +(off course, A/V sync issues apply only if you process or copy the +audio track while transcoding the video, which is strongly encouraged). Therefore, you may have to switch to basic A/V sync with the option, or put this in your ~/.mplayer/mencoder config file, as long as @@ -1362,6 +1364,43 @@ Do not do this! Always use a file or CD/DVD/etc device as input. by hardware players, although this trend is changing. + + Do not use when encoding + a file with audio, even if you will be encoding and muxing audio + separately later. + Though it may work in ideal cases, using is + likely to hide some problems in your encoding command line setting. + In other words, having a soundtrack during your encode assures you that, + provided you don't messages such as + Too many audio packets in the buffer, you will be able + to get proper sync. + + + + You need to have MEncoder process the sound. + You can for example copy the orignal soundtrack during the encode with + or convert it to a "light" 4 kHz mono WAV + PCM with . + otherwise, in some cases, it will generate a video file that won't sync + with the audio. + Such cases are when the number of video frames in the source file do + not match up to the total length of audio frames or whenever there + are discontinuities/splices where there are missing or extra audio frames. + The correct way to handle this kind of problem is to insert silence or + cut audio at these points. + However MPlayer cannot do that, so if you + demux the AC3 and encode it with a separate app (or dump it to PCM with + MPlayer), the splices will be left incorrect + and the only way to correct them is to drop/dup video frames at the + splice. + As long as MEncoder sees the audio when it's + encoding the video, it can do this dropping/duping (which is usually ok + since it takes place at full black/scenechange, but if + MEncoder can't see the audio, it will just + process all frames as-is and they won't fit the final audio stream when + you for example merge your audio and video track into a Matroska file. + + First of all, you will have to convert the DVD sound into a WAV file that the audio codec can use as input. @@ -1822,7 +1861,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. - mencoder dvd://1 -nosound -ovc lavc -ofps 24000/1001 + mencoder dvd://1 -avc copy -ovc lavc -ofps 24000/1001 @@ -1871,7 +1910,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. will encode macroblocks as non-interlaced in places where there is no motion. Note that is NOT needed here. - mencoder dvd://1 -nosound -ovc lavc -lavcopts ildct:ilme:mbd=2 + mencoder dvd://1 -avc copy -ovc lavc -lavcopts ildct:ilme:mbd=2 Use a deinterlacing filter before encoding. There are several of @@ -1885,7 +1924,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. cropping [1] and before scaling. - mencoder dvd://1 -nosound -vf pp=lb -ovc lavc + mencoder dvd://1 -avc copy -vf pp=lb -ovc lavc Unfortunately, this option is buggy with @@ -1910,7 +1949,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. and to be twice the framerate of your original source. - mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 60000/1001 -ofps 60000/1001 + mencoder dvd://1 -avc copy -vf tfields=2 -ovc lavc -fps 60000/1001 -ofps 60000/1001 If you plan on downscaling dramatically, you can extract and encode @@ -1922,7 +1961,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. [1] and scale appropriately. Remember that you will have to adjust the scale to compensate for the vertical resolution being halved. - mencoder dvd://1 -nosound -vf field=0 -ovc lavc + mencoder dvd://1 -avc copy -vf field=0 -ovc lavc @@ -1953,7 +1992,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. accurate method available for encoding both telecine and "mixed progressive and telecine". - mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 24000/1001 + mencoder dvd://1 -avc copy -vf pullup,softskip -ovc lavc -ofps 24000/1001 @@ -1968,7 +2007,7 @@ Do not do this! Always use a file or CD/DVD/etc device as input. , the final result will be entirely progressive. is needed. - mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001 + mencoder dvd://1 -avc copy -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001 -- cgit v1.2.3