[mythtv-users] recordinng profile based on channel

Larry Roberts mythtv at american-hero.com
Thu Aug 1 03:14:08 UTC 2013


On 7/31/2013 4:47 PM, Tom Hayward wrote:
> On Wed, Jul 31, 2013 at 10:17 AM, Larry Roberts
> <mythtv at american-hero.com> wrote:
>> they can be for watching via the web/frontend.  I may be bringing in
>> knowledge artifacts from my PVR-350 days when you could tell what quality to
>> save.  Its the old I dont know what I dont know so I'm trying to think of
>> all the things I could need to change going from SD to HD.
> There is no need to transcode HDHR recordings for playback with
> Mythfrontend. In fact it's best to not transcode them to save on time,
> electricity, and preserve quality.
>
> The only time I transcode anything is for use with a particular
> device, like to watch something on my phone while traveling, etc. Your
> use case with the Roku sounds similar. You could write a script that
> looks at the video resolution and chooses an appropriate action based
> on some bounds you have defined. However, the Roku should be able to
> play things without resizing, so just change the codec/container as
> necessary and don't worry about resolution. The transcode commands
> suggested at http://www.mythtv.org/wiki/ROKU_HD_Frontend don't mess
> with resolution or discriminate between SD/HD.
>
> Tom
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
First off thanks for the URL.  That was a new one that I hadn't hit 
yet.   I guess my use of transcode was a bit misplaced. I thought that I 
needed to do something special to have the system save the HD video as HD.
I used the term transcode as it seemed to imply what I was getting at.  
I recall a setting where I could choose the quality of the video.  I 
believe that this was a mythfrontend setting now that I reflect back.  
As I dont use mythfrontend at this point I think its mute.
I do have a question around recording profiles.  After adding my 
HDHomeRun I have several recording profiles listed under a HDHomeRun 
Recorders.  While they have several listed they appear to have no 
settings.  Any ideas what that is all about and when/if I should change 
them?  I see under the transcoders I can change some transcoding options 
but the HDHomeRun has no settings.  Perhaps this is what I was thinking 
of above.


I do have 2 transcode jobs (User Job's 1 and 2) that I call for certain 
programs that I want to be converted to a .m4v file that is compatible 
with Roku/Air Video.  Each script (and HD and SD version) calls ffmpeg 
with various options to convert to a .m4v file as needed. They are a bit 
long but just in case someone else wants to try this at home.  I call 
the script with 3 arguments, the file the title and the subtitle.  This 
allows me to not only convert the file but to rename it to something 
easy to understand.
I'm still experimenting with the various ffmpeg options to produce a 
video that will not buffer on Air Video and can be played on Roku. They 
worked fine under SD video but the HD video is a bit to much I believe.  
As you can see I'm a hacker at best so no laughing at the code. Lots of 
debug stuff is still included so I can better understand any problems.  :)

#!/bin/bash

FILE=$1
TITLE="$2"
SUBTITLE="$3"
FILENEW=`echo "$FILE" | sed "s/\.mpg//"`
DATE=`date +%b-%d-%Y`
INDIR="/mythtvstorage"
TMPDIR="/tmp"
OUTDIR="/roku"
PROG="/usr/bin/ffmpeg"
LOG="/var/log/mythtv/h264xcode.log"
MVCMD="/bin/mv -v -T"
FILENAME=${TITLE}-${SUBTITLE}-${DATE}
FINALNAME=`echo "${FILENAME}" | sed "s/\://" | sed "s/\//-/"`

TMPFILE2="${TMPDIR}/${FILENEW}"
# Changed libfaac to aac
# Changed preset to medium
COMMAND2="${PROG} -i ${INDIR}/${FILENEW}.mpg  -vcodec libx264 -preset 
medium -crf 22 -strict -2 -acodec aac -ab 128k ${TMPFILE2}.m4v"
echo "Original File Name $FILE" >>$LOG
echo "New File Name $FILENEW" >>$LOG
echo "Final File Name $FINALNAME" >>$LOG
echo $TITLE >>$LOG
echo $SUBTITLE >>$LOG
echo "END OF VARIABLES" >>$LOG
echo "h264xcode: ${COMMAND2}" >> $LOG
$COMMAND2 >> $LOG 2>&1
echo "encode complete, moving file" >>$LOG
${MVCMD} "${TMPFILE2}.m4v" "${OUTDIR}/${FINALNAME}.m4v"
echo "Move Complete..." >>$LOG





More information about the mythtv-users mailing list