MythTV to phone (.3gp) transcoder script and Bluetooth transfer

I built a perl script that can be used as a "User Job" from within mythtv to convert a recorded TV program into a cell phone (.3gp) movie. It makes uses of mythname.pl to get the show and title (for the filename) and mplayer/mencoder and ffmpeg to do the actual transcoding.

Unless you want to drop your files off in the /var/lib/mythtv/for_phone directory, you will need to edit the output directory.  I've found that 35 minutes of TV gets shrunken down to 24-30megs when in .3gp format when transcoded at a generous 80/16 (video/audio bitrate).

Script to transcode from mythtv files to .3gp files

I wrote a second script to transfer any files in this directory to my phone via bluetooth OBEX push every night. I use cron to start the phoneTransfer.pl script up each night, and it looks for any .3gp files in the directory and tries to copy them to my phone. If successful, it removes them from the directory.  Note that my Motorola V3xx has an annoying feature where it will receive OBEX bluetooth files into phone memory, and NOT to the default download location (which can be set to the memory card). If your phone is similar, you will have to copy files from the phone's memory to the memory card so that your phone's memory doesn't get full. If your phone's memory gets full, it will refuse further bluetooth transfers until you move the files over to a memory card. 

Script that does a bluetooth transfer to phone

Note that to use this script you will have to find your phone's bluetooth mac address (using "hcitool scan") and put it in the script. Also, you should pair your phone with your computer, and set your phone up to automatically accept OBEX push/FTP transfers unless you want to manually approve each video transfer.

Leave a Reply

Your email address will not be published. Required fields are marked *