[mythtv] Transcoding ATSC -> MPEG4 = a/v sync offset

Jesse Crews jcrews at gridlox.net
Sat Jun 3 19:55:03 UTC 2006


I've brought this up before, but I've started looking around for a
possible solution. If anyone else experiences this, please let me
know, so that I can at least figure out if this is a common thing or
specific to my particular setup.

Here's what I think is happening. Anything transmitted with AC3 5
channel audio gets its a/v sync borked when the transcoder
downmixes the audio to 2 channels, MPEG layer 3. Any AC3 2 channel to
MPEG layer 3 works fine, the only loss of sync seems to happen when  
there are more than 2 channels of audio in the recording. There isn't  
any drift, it's just off by the same amount the whole way through.

When I play the recording with the internal player, it is in sync. I  
use AC3 IEC958 pass through, but sync also looks good with this  
disabled (stereo down mix to PCM).

I've saved logs, but I don't think they have any pertinent information
(all were on), because they look the same as the non broken
recordings' output.

A possible solution may just be to create an option to do copyaudio  
for AC3, or if uncompressed audio is used, and the source is AC3,  
don't pass it to a 2 channel down mix to PCM. That looks like  
something I would be able to do while not making a hack, so that it  
can be included in production.

How does the transcoder program handle a/v sync vs. the internal  
player? I didn't see where the frontend starts playing with tv_play,  
but looking at SetupPlayer in libs/libmythtv/tv_play.cpp, I don't see  
anything being done other than some basic nvp creation and setup, and  
then letting nvp just play the video on its own. The transcoder looks  
like it does some extra stuff on the side, other than setting up the  
player/recorder and letting them run.

This is all very unfamiliar to me at this time, and I didn't see any  
class descriptions, etc in the wiki, at least not in the places I  

I'd greatly appreciate any help on understanding how all this video  
playback,transcoding and a/v sync stuff works, so that I can hopefully  
track down the source of this funky behavior.

The stations used are:


This is with a flexcop2/lgdt3303.

The other stations don't transmit 5.1 audio, or I don't record any
such material from them. Any 2.0 channel broadcasts from WAVY or WVBT
transcode fine.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060603/0abed546/attachment.pgp 

More information about the mythtv-dev mailing list