[mythtv-users] file to flash

Daryl McDonald darylangela at gmail.com
Sat Oct 19 23:27:10 UTC 2013


On Tue, Oct 15, 2013 at 5:31 PM, Eric Sharkey <eric at lisaneric.org> wrote:
> On Tue, Oct 15, 2013 at 4:38 PM, Daryl McDonald <darylangela at gmail.com> wrote:
>> Furthermore I'm hoping there is a better way to move the file than
>> dragging and dropping, because each time I've done this I end up using
>> 7.8 gb's of ran and 3.4 gb's of swap until I reboot...very sluggish!
>
> I've used a custom user job to do this.
>
> I have UserJob4 defined as:
>
> /usr/local/bin/videoexport "%DIR%/%FILE%" "%TITLE%" "%STARTTIME%" "%SUBTITLE%"
>
> Where the videoexport script is:
>
> ---
> #!/bin/sh
> set -e;
> echo $@ >> /tmp/videoexport.log
> OUTNAME="$3"
> if test -d /var/autofs/misc/innotab/LLN/MOVIE/ ; then
>     CONVERTER=/usr/local/bin/toinnotab.sh
>     TARGET="/var/autofs/misc/innotab/LLN/MOVIE"
>     OUTNAME="$2"
> elif test -d /var/autofs/misc/centon/video/ ; then
>     CONVERTER=/usr/local/bin/tomp4.sh
>     TARGET="/var/autofs/misc/centon/video/$2"
> elif test -d /var/autofs/misc/n900/mythtv/ ; then
>     CONVERTER=/usr/local/bin/ton900mp4.sh
>     TARGET="/var/autofs/misc/n900/mythtv/$2"
> elif test -d /var/autofs/misc/n97/Videos/ ; then
>     CONVERTER=/usr/local/bin/ton97mp4.sh
>     TARGET="/var/autofs/misc/n97/Videos/mythtv/$2"
> fi
> if test -z "${CONVERTER}" -o \! -x ${CONVERTER} ; then
>     echo "Cannot run converter: ${CONVERTER}"
>     exit 0
> fi
> mkdir -p "$TARGET"
> cd "$TARGET"
> if test -n "$4" ; then
>     OUTNAME="${OUTNAME} - $4"
> fi
> SAFEOUTNAME=`echo "${OUTNAME}" | tr -c -d 'a-zA-Z0-9\040()~#!@$_-'`
> ${CONVERTER} "$1" "${SAFEOUTNAME}"
> ---
>
> It just looks for various automountable file systems and the first one
> it finds is considered the target device, under the assumption that
> only one will be there, and then it just calls an appropriate video
> converter script for that device.
>
> All I have to do is insert the media, then execute the user job on the
> recording I want, then remove the media when it's done.
>
> Eric
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

Hey Eric, I finally got how to execute your script on one of my files,
and according to my BE log it was successful, but I can't find it, I
stuck a drive in the front of the box, but it's not there. Here's a
snip of my BE log:

Oct 19 19:08:32 daryl-A780L3C mythbackend: mythbackend[12760]: I
UserJob_1954 jobqueue.cpp:2409 (DoUserJobThread) JobQueue: Started
videoexport for "Aaron's Two Minutes of Fame (Manual
Record)":"2013-10-11 12:50:00" recorded from channel 2011 at
2013-10-11T16:50:00Z
Oct 19 19:08:32 daryl-A780L3C mythbackend: mythbackend[12760]: I
UserJob_1954 jobqueue.cpp:2461 (DoUserJobThread) JobQueue: Finished
videoexport for "Aaron's Two Minutes of Fame (Manual
Record)":"2013-10-11 12:50:00" recorded from channel 2011 at
2013-10-11T16:50:00Z
Oct 19 19:12:37 daryl-A780L3C mythbackend: mythbackend[12760]: I
UserJob_1955 jobqueue.cpp:2409 (DoUserJobThread) JobQueue: Started
videoexport for "Aaron's Two Minutes of Fame (Manual
Record)":"2013-10-11 12:50:00" recorded from channel 2011 at
2013-10-11T16:50:00Z
Oct 19 19:12:37 daryl-A780L3C mythbackend: mythbackend[12760]: I
UserJob_1955 jobqueue.cpp:2461 (DoUserJobThread) JobQueue: Finished
videoexport for "Aaron's Two Minutes of Fame (Manual
Record)":"2013-10-11 12:50:00" recorded from channel 2011 at
2013-10-11T16:50:00Z

apparently it worked both times, alas I'm stumped again.


More information about the mythtv-users mailing list