View Single Post
CrossBow's Avatar
Posts: 58 | Thanked: 5 times | Joined on Dec 2005
#5
I was not intending to publish my scripts for several reasons:

1. Mine are very specific to my setup, and specific programs I encode.
2. Appearently different cards produce different files. Mine will only work for cards that produce MPEG files.
3. It won't work for hi-def.
4. I have not updated my system (and thus my scripts) for MythTV 0.19 (although you should just need to change the extension of the input file)
5. There are lots of similar scripts. Mine is a combination of what I used to use for my Zaurus and my Nokia 9500, and the ones from the Maemo wiki.
6. This scipt drops frames. I am sure there are ways to produce optimized output.

That said, here is one of my scripts (without GUI). This is the one that crops letter boxed NTSC. It should work as a MythTV post-processing job, but the one time I tried this, it did not. You may need to suppress the output for this to actually work.

Put this in a file (called onepass16_9_nuv.sh), and make it executable.

Code:
#!/bin/bash
 
# 16:9
 
# Intended to be called from mythtv.
# Call it like this:
# onepass16_9_nuv.sh %CHANID% %STARTTIME% %ENDTIME% %TITLE% %SUBTITLE%
 
if [ $# != 5 ]
        then
        echo "Invalid number of parameters"
        exit -1
fi

# source file - Format:   Channel ID_Start Time_Endtime.nuv
FILE="/var/video/$1_$2_$3.nuv"

OUT="/home/mythtv/$4_$5".avi                 # Output file Name
 
RES=352:192                     # resolution
ABR=48                          # audio bitrate
VBR=300                         # video bitrate
NICE=19                         # Nice Value  10=normal  19=Nice
 
nice -n $NICE \
mencoder $FILE \
    -o "$OUT" \
    -oac lavc -lavcopts acodec=mp3:abitrate=$ABR \
    -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$VBR:mbd=1 \
    -vf crop=720:368:0:54,scale=$RES \
    -ffourcc DIVX \
    -ofps 15

1. The crop values are selected specifically for letterboxed stuff recorded from The Sci Fi channel. They may need tweeking for specific programs.
2. Change the specifics for your set-up. For example, my recodings are in /var/video
3. The script dumps the resulting .avi in the mythtv user's home direcory. You may need/want to change this.
__________________
--- CrossBow

Mobile Linux? Got That.
Pepper Pad 3, Nokia 770, GP2X, Motorola A780

Please visit http://linuxslate.com/ New! Discussion boards just started.