[mythtv-users] file to flash

Daryl McDonald darylangela at gmail.com
Thu Oct 17 22:03:27 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

Transcoding is now working, but I'm having trouble with this UserJob.
I pasted this script into my "/usr/local/bin" directory, opened the BE
and typed "videoexport" beside UserJob#4, and
"/usr/local/bin/videoexport" in the command field, rebooted the BE,
and went to the FE and could not find "videoexport" among the Jobs in
the menu dropdown. What did I miss?

Daryl


More information about the mythtv-users mailing list