[mythtv-users] Automatic converting HDTV to MPEG2

Trampas tstern at nc.rr.com
Wed Dec 13 00:54:12 UTC 2006


Casey,

Thanks that was what I was looking for...

Trampas

-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of casey dunn
Sent: Tuesday, December 12, 2006 12:03 PM
To: Discussion about mythtv
Subject: Re: [mythtv-users] Automatic converting HDTV to MPEG2

On 12/12/06, Trampas <tstern at nc.rr.com> wrote:
>
>
>
>
> Casey,
>
> My original question was how to enable automatic transcoding of the HDTV
to 720x480 MPEG2, I do run the Myth Frontend on the box that is the backend.
My question was how do I make the automatic transcoding work.


http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_from_mythweb_u
sing_flash_video#Transcode_recordings
http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_to_mobile_devi
ces#Add_user_job_in_mythtv

Quick howto's for adding a user job.

Your job is going to be a bit different than the examples above,
luckily simpler.  What I think you want is the same thing I do,
replace the existing HDTV.nuv with SVCD/DVD.mpg.  This is a cleaned up
version of my script. (for reference I'm targeting XBMC over a poor
802.11g connection and SMB)

####################### START ######################################
#!/bin/sh
# script to shrink the size of mpeg2 recordings, & make them human readable.

cd /media/video

#setup varaibles
input_file=$1
output_dir=$PWD

#strip extension
name=`echo ${input_file} | sed -e "s/[.].*$//"`
extension=`echo ${input_file} | sed -e "s/^[^.]*[.]//"`

 transcode_options="-target ntsc-svcd -deinterlace"

#run transcoder
ffmpeg -i "${input_file}" ${transcode_options} "${name}.mpeg"

#replace original
 rm "${input_file}"
mv "${name}.mpeg" "${input_file}"

# update file names
#~/mythrename.pl --link /home/Shared/Video
~/mythrename.pl --underscores
######################### END ##################################



Looking at the examples in the wiki it should probably look like
this... (untested)
############################## START ##############################
directory=$1;
file=$2;

# Transcode the HDTV stream to DVD quality mpeg

ffmpeg -i $directory/$file -target ntsc-dvd -deinterlace
$directory/$file.mpeg

rm $directory/$file
mv $directory/$file.mpeg $directory/$file
############################### END ###############################

I would put echo's in-front of the rm and mv for testing it a few
times from the command line and in myth before letting it delete my
originals (just in case).  Or change it to create copies and manually
delete the originals.
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list