[mythtv-users] OT: Transcoding for iPod/iPhone playback and transfer to iTunes?

Mike Dent mcdent at gmail.com
Sat Dec 27 15:57:47 UTC 2008


Hi,
having got an iPhone recently I've been trying to get mythtv and
ffmpeg to transcode my recordings for playback on it.

I managed to do this by following the first part of the instructions
here http://www.mythtv.org/wiki/index.php/Streaming_to_iPod_touch_or_iPhone
, basically
just using the bash script /usr/local/bin/mythipod.sh  to do this.

I end up with a transcoded mp4 file in my chosen directory which is
then shared out to my windows PC.

The file appears with the correct name and extension. However when I
drag it over to iTunes the name gets changed to a single letter 'x' ?
I'm guessing iTunes is reading some information from the file and is
unable to give it a proper name?

The important lines from the script are:-
######
FILE=$1
TITLE=$2
OUTDIR="/mnt/mobile-video/ipod-touch/"


#Get the video information
video_info=`mplayer -vo null -ao null -frames 10 -identify
"${directory}/${file}" 2>/dev/null`

#Command line grep sucks, but we make due...
aspect=`echo $video_info | egrep -oe "Movie-Aspect is [0-9:.]+" |
egrep -o "[0-9:.]+"`
framerate=`echo $video_info | egrep -oe "[0-9.]+ fps" | egrep -o "[0-9.]+"`
# set resolution by aspect ratio

if [ "$aspect" == "1.78:1" ]
then
  width=432
  height=240
  vbitrate=480k
else
  width=480
  height=360
  vbitrate=378k
fi

abitrate=128k

ffmpeg -i $FILE $ACODEC -ab ${abitrate} -ac 2 -s ${width}x${height}
-vcodec mpeg4 -b ${vbitrate} -flags +aic+mv4+trell -mbd 2 -cmp 2
-subcmp 2 -g 250 -maxrate 512k -bufsize 2M -title X
"$OUTDIR$TITLE.mp4"
####


Thanks in advance,

Mike


More information about the mythtv-users mailing list