[mythtv-users] trandcoding messes up 6 channel audio slow audio playback

Michael S. Keller samsara at tulsaconnect.com
Thu Apr 28 19:16:59 UTC 2011

On 4/28/11 2:38 AM, Scott Macdonell wrote:
> So, what are people doing while mythtranscode doesn't work on 6 channel recordings? I'm burning through disk space pretty fast here. Are there any user jobs I could use to get essentially the same functionality as mythtranscode? I've already tried mythnuv2mkv, but that ruined my recordings in the same way as mythtrancode.
> Hopefully this will get fixed soon and I wont need a user job. I've played around a bit and thought I would report on my findings. (Maybe someone finds them useful, or knows what I could do to get more useful results).
> I've got another machine that has basically the same set up as my normal backend minus the tuner cards. I compiled the source from https://github.com/MythTV/mythtv/tree/jyavenard/backports/fixes/0.24 that Jean-Yves posted on this other machine. I transfered over mythconverg and a couple of recordings from my actual backend so I could do some testing on this other machine.
> I tried to transcode a recording from my cable box with 6 channel audio. I called mythranscode as:
> /usr/local/bin/mythtranscode --infile 10181_20110427200700.mpg --outfile /home/scott/HDtestoutput.mpg --profile 27  --showprogress -v audio

I abandoned the internal transcoder and am using a modified version of a 
script with the attribution in it:

# Written by Defcronyke Webmaster, copyright 2010.

I'm not sure where I obtained it, but may have a bookmark somewhere. It 
was intended to transcode to H.264, but that's far too slow on my 
hardware and its ffmpeg effort didn't produce satisfactory results. I 
substituted HandBrake and am going to the same MPEG-4 that the internal 
transcoder uses, but HandBrake handles the multiple audio streams correctly.

The only trouble is that shows on some feeds, particularly Fox, end up 
with skips in the audio - usually the picture doesn't appear affected 
and it always stays in sync.

I want to see the internal transcoder working again.

Here is the entire functional part of the script, with some extraneous 
parts still active:

DIRNAME=`dirname "$2"`
BASENAME=`echo "$2" | awk -F/ '{print $NF}' | sed 's/ /_/g' | sed 
's/://g' | sed 's/?//g' | sed "s/'/_/g"`
BASENAME2=`echo "$1" | awk -F/ '{print $NF}'`
HandBrakeCLI -q 0.8 -f mp4 -4 -O --crop 0:0:0:0 -d -i "$1" -o 
if [ $RC -eq 0 ]
         # update the database to point to the transcoded file and 
delete the original recorded show.
         NEWFILESIZE=`du -b "$DIRNAME/$BASENAME" | cut -f1`
         echo "UPDATE recorded SET 
basename='$BASENAME',filesize='$NEWFILESIZE',transcoded='1' WHERE 
chanid='$3' AND starttime='$4';" > update-database.sql
         mysql --user=$DATABASEUSER --password=$DATABASEPASSWORD 
mythconverg < update-database.sql
         mythcommflag --rebuild --file "$DIRNAME/$BASENAME"
         rm $1
         rm $DIRNAME/$BASENAME
rm update-database.sql


More information about the mythtv-users mailing list