[mythtv-users] MythWeb filename to actual filename
Nick Rout
nick.rout at gmail.com
Tue Apr 7 04:33:42 UTC 2009
On Tue, Apr 7, 2009 at 1:55 PM, David Fishburn
<dfishburn.mythtv at gmail.com> wrote:
>> 2. Re: MythWeb filename to actual filename (Steve Daniels)
>
>>> How do you map this URL:
>>> mythweb/tv/detail/1010/1238544000
>>>
>>> To the actual filename on the filesystem?
>>>
>>> I would have thought there would be a:
>>> recordings/1010_1238544000.mpg
>
>> Quick question, why do you want to do this?
>>
>> Steve Daniels
>
> I am trying to manually run an ffmpeg command line to transcode the
> show for a new device.
>
> Also, often I just want to manually run an ffmpeg command line for a given show.
>
> Trying to find the file out of my 1000s of recorded shows is a bit
> like a needle in a haystack.
Not really. The path offered has the start of the filename (the first
four characters) as the path element like:
mythweb/tv/detail/1010/1238544000
the filename starts with 1010_
The rest of it is made up of the date & time the recording started,
which is shown in mythweb. The format is YYYYMMDDHHMM00.mpg. Its
pretty easy to type
1010_20090407154000.mpg, particularly with the info sitting in mythweb
in front of you and tab completion helping.
Also we are told earlier in the thread that the mysterious numbers
1238544000 are the time in Unix time. using the date function it would
be easy to convert to the right format.
$ date -d @1238544000 +%Y%m%d%H%M%S
20090104130000
(it shows 1300 hours, like 1 pm because its given in my localtime, UTC+1300
see the date man page. I read that the @epochtime only works with
recent versions of date, otherwise a short perl one line seems to be
the required trick.
The format pattern is a pain to type but easy to script.
More information about the mythtv-users
mailing list