[mythtv-users] transcode keeping AC3 and internal player/mencoder strangeness
Richard Freeman
r-mythtv at thefreemanclan.net
Fri Feb 23 23:44:10 UTC 2007
Jason Ferrara wrote:
> I'm a little confused here. Won't that actually transcode the file
> (and thus turn the AC3 audio into something else)? There doesn't seem
> to be an option to mythtranscode to get it to build the keyframe
> index without transcoding the file. Or am I missing something?
>
The --buildindex option rebuilds the index without transcoding the file.
> On Feb 19, 2007, at 10:34 AM, Michael T. Dean wrote:
>>
>> What happens when you use "mythtranscode --buildindex" (with
>> appropriate
>> arguments to select the appropriate file) instead of "mythcommflag
>> --rebuild"?
>>
THAT WORKED!!!! On a file that mythcommflag --rebuild failed on. I'd
been struggling with this for months and this just might be the final fix.
FYI - here is my script (in part stolen from another list posting):
#!/bin/sh
# Transcode mythtv video down to a reasonable resolution, preserving AC3
audio
if mencoder -o /dev/null $1 2>/dev/null | egrep -q 'fps:(59|60)'; then
# progressive
OFPS="30000/1001"
FPS="60"
FILTER="tinterlace=4,scale=720:360:1,expand=:480"
else
# interlaced
OFPS="30000/1001"
FPS=$OFPS
FILTER="scale=720:360:1,expand=:480"
fi
nice mencoder -of mpeg -mpegopts format=mpeg2:vbitrate=2000 -oac copy
-ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=2000:keyint=18:aspect=4/3
-vf $FILTER -fps $FPS -ofps $OFPS -vc mpeg12 -o /var/video/$1.tmp
/var/video/$1 && chown mythtv /var/video/$1.tmp && mv /var/video/$1.tmp
/var/video/$1
ERROR=$?
if [ $ERROR -eq 0 ]; then
# Fix the database entry for the file
cat << EOF | mysql --user=mythtv --password=mythtv mythconverg
UPDATE
recorded
SET
filesize = $(ls -l /var/video/$1 | awk '{print $5}')
WHERE
basename = '$1';
EOF
fi
nice mythtranscode --buildindex --infile $1
More information about the mythtv-users
mailing list