[mythtv-users] an easier way to create "friendly" names for converted files

Jeremy Jones jeremy.dwain.jones at gmail.com
Fri Jan 4 00:51:08 UTC 2013


On Thu, Jan 3, 2013 at 8:08 AM, Larry Roberts <mythtv at american-hero.com>wrote:

>  On 1/3/2013 8:58 AM, Jeremy Jones wrote:
>
> On Thu, Jan 3, 2013 at 7:50 AM, Larry Roberts <mythtv at american-hero.com>wrote:
>
>> On 1/3/2013 3:15 AM, Michael T. Dean wrote:
>>
>>> On 01/03/2013 02:06 AM, Bob Long wrote:
>>>
>>>> Larry Roberts wrote,
>>>>
>>>>  My end goal is to get a couple of daily recordings converted to a roku
>>>>> compatible format with friendly names for my wife to watch on the roku
>>>>> in our bedroom.
>>>>>
>>>>
>>>> [snip]
>>>>
>>>> Are you aware of http://www.mythtv.org/wiki/Mythlink.pl ?
>>>>
>>>>
>>> [snip]
>>>
>>>  Definitely aware of mythlink as I use it to to interface with airvideo.
>> It was a great find at the time and something my kids use every night. to
>> stream videos to the iPAD.
>>
>> Maybe its just my understanding of how the user job operates and stores
>> information but how do I tell mythlink to create links to those newly
>> converted .m4v files?  I didn't see a way to specify the directory the
>> files were in.  I believe it gets that info directly from the DB and from
>> what I can tell only did the original file.  I run mythlink every 30
>> minutes to update recording information and I cant find a link to the newly
>> created .m4v file.
>>
>>  I think we all missed the "convert" part of your original post.  What
> are you doing to create the .m4v files?  Since these are not referenced by
> mythlink I assume they also do not show up in Myth Frontend under Watch
> Recordings.  Is that correct?
>
>
> I have a user job that references my transcode script.  I'm passing the 2
> variables to the script (channel id and start time) which can then
> autobuild the file name since it also knows the directory my recordings are
> all stored in.
> my transcoding is working great and I end up with the transcoded file in
> my /tmp/ directory with the typical mythtv name 1006_blahblahblah.m4v.
> What I want and am trying to do is to move/rename the .m4v file and create
> a "family friendly" name in my directory store.
>
>
I think you should be able to transcode directly to the name that you want
using the data from the database.



>  my very ugly rename/move command that is part of the transcode script is
> below:
>
> mysql -uroot -ppasswordremoved mythconverg -B --exec "select
> basename,title,subtitle from recorded;" | grep ${CHANID}_${STARTTIME}  |
> sed 's/.mpg//'| sed 's/\t/ /g' | while read b NAME ;do mv
> {$TMPDIR}/${CHANID}_${STARTTIME}.m4v */roku/*"$NAME".m4v;done
>
>
I'm not a programmer either, but I dabble.  Is this bash?  - I think that
the post in this thread by Ron Frazier may be the help you need here. Ron's
post is pasted (out of context) below)

> You need to quote the parameters when you setup the user job. Example:
>/usr/local/scripts/myscript %CHANID% %STARTTIMEUTC% "%TITLE%" "%SUBTITLE%"



> I woke up this morning to find my file transcoded but still sitting in the
> /tmp directory so something isn't working with my command above, althought
> I can run it manually and it works just fine (assuming I set the variables
> of course)  .
>
> Roku doesn't natively support uPNP.  Still looking at finding a solution
> for that as it may be easier to just point to mythtv as its already a uPNP
> server.
>
>
Sound like Chris has a more permanent solution for you to explore (now or
maybe later) with mythrokuplayer, but if that does not work for your, why
not consider transcoding in place to the m4v file and then use mythlink to
generate the links for the roku box to read?

If this sounds like something you may want to explore then take a look at:
http://www.mythtv.org/wiki/Transcode_wrapper_stub

This is a python script that pretty much has all you need to do to
transcode in-place setup in it.  You just need to edit the transcode
command, and maybe a few others noted with comments.  Once that is in place
you can call it automatically as a userjob.  One note though, any
commercial flagging will probably need to be done after running the
userjob.

I only see a couple of potential reason not to do this. 1) the quality you
are transcoding to is not acceptable for your mythfrontend playback. and 2)
you want to permanant store the video and delete it from the recordings.

If #2 is your reason, then look at:
http://www.mythtv.org/wiki/Mythvidexport.py
and at: http://www.mythtv.org/wiki/Lossless_Cut

These are intended to export the recording to the video library with real
human readable names.

Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130103/329f1cf0/attachment.html>


More information about the mythtv-users mailing list