[mythtv-users] mytharchive dvd audio out of sync with Video

Rod Smith mythtv at rodsbooks.com
Sat Sep 22 17:00:27 UTC 2007

On Saturday 22 September 2007 05:27:25 Paul wrote:
> Just cut a DVD of a DVB-T show and the Audio is out of sync . is there
> any this I can do to prevent this in future
> What should I look for in the logs to see what has happend?

In my experience, when MythArchive uses ffmpeg to transcode files to another 
format (MPEG-4 or RTJpeg files to MPEG-2, or even just MPEG-2 to MPEG-2 to 
reduce the size of a file), the audio is likely to go out of sync. My own 
solution is to use a custom script that uses mencoder to do the transcoding, 
then use MythArchive's "do not re-encode" setting rather than the SP, LP, or 
EP quality setting -- or better yet, I record at the desired bitrate to begin 
with and then use MythArchive's "do not re-encode" setting. In case you're 
interested, I've just put my script up on my Web site:


You'll need to change the tempFile variable near the start of the script. 
(Using /dev/null will speed things up slightly when doing 2-pass transcoding, 
but if the process fails you'll then need to start over from scratch.) Also, 
since you mention you're recording DVB-T, I assume you're in Europe, so 
you'll want to change the -ofps option in the mencoder lines to produce 25 
fps files rather than 29.97 fps files that I need in the US. Pass the script 
input and output filenames. It then prompts for various options. The final 
option is an audio offset in case there are remaining audio sync problems, 
but I've seldom had to use this. The script does minimal error checking on 
inputs, and I have no idea what'll happen if you input ridiculous values 
(negative bitrates, say).

Rod Smith

More information about the mythtv-users mailing list