[mythtv-users] transcode keeping AC3 and internal player/mencoder strangeness

Jason Ferrara jason at discordia.org
Mon Feb 19 03:30:41 UTC 2007


I'm trying to transcode HD recordings down to a reasonable file size  
while keeping the AC3 5.1 audio intact.

I wrote a user job script which basically does...

mencoder infile -oac copy -ovc xvid -vf scale=1280:-3 -xvidencopts  
pass=1:vhq=0:me_quality=5:turbo:quant_type=mpeg:max_bframes=0:bitrate=22 
00
mencoder infile -oac copy -ovc xvid -vf scale=1280:-3 -xvidencopts  
pass=2:quant_type=mpeg:max_bframes=0:bitrate=2200 -of lavf -lavfopts  
i_certify_that_my_video_stream_does_not_use_b_frames:format=avi -o   
outfile
update recorded set basename = oufile where basename = infile
update recorded set filesize = newFileSize where basename = outfile
/usr/bin/mythcommflag --rebuild -f  outfile

The resulting file initially plays ok in mythtv, but if seek around  
the file a few times, the audio gets out of sync by about 1/2 second.  
I can seek around the file in mplayer without any problems.

Also, if in the second encoding pass I don't use the libavformat  
muxer (mencoder infile -oac copy -ovc xvid -vf scale=1280:-3 - 
xvidencopts pass=2:quant_type=mpeg:max_bframes=0:bitrate=2200  -o   
outfile), then seeking in mythtv doesn't work at all. Playback just  
jumps forward a few seconds, no matter which direction or how far I  
try to sync. And again playing with mplayer works fine.

Does anyone have any suggestions for a way to transcode HD to a file  
that mythtv's internal player will be happy with while keeping AC3  
audio?

Thanks

-J


More information about the mythtv-users mailing list