2010-12-30, 15:47
cronjobs are used when you want to have unattended processes run at predetermined times. You can attend this process. Off-hand I can't really remember the format of the mythtv job. You will run mythicalLibrarian --undo, then MythTranscode all files, then mythicalLibrarian --scan mp4 /path_to_my/recordings
The script to transcode all of your recordings would look like this
It'll probly take about a day or two to finish if you have a large library.
I wrote this without a terminal to check, so you may need to debug it.
The script to transcode all of your recordings would look like this
Code:
#! /bin/bash
mkfifo NamedPipe #make a pipe
ls -1 >./NamedPipe & #write file list to pipe, one file per line
while read line #loop through pipe, line by line
do
if [ ${line:(-3)} = "mpg" ]; then #if last 3 chars are mpg
MythTranscode blahBlah $line #$line will be the name of the file You need to figure out the options for mythTranscode
fi
done <./NamedPipe #input for the pipe
rm ./NamedPipe #cleanup the left-over named pipe so it does not clutter the filesystem
echo "All Operations Complete [url=file://\\n]\\n[/url] Done." #this is so you don't stop it prematurely
I wrote this without a terminal to check, so you may need to debug it.