[mythtv-users] Use external script with options to provide video.
Stephen Worthington
stephen_agent at jsw.gen.nz
Fri Jul 26 09:34:10 UTC 2013
On Thu, 25 Jul 2013 21:04:15 -0500, you wrote:
>On 25/07/13 10:13, Rob Davis wrote:
>> On 07/25/2013 10:00 AM, Raymond Wagner wrote:
>>> On Jul 25, 2013, at 10:50, Rob Davis <rob at davis-family.info> wrote:
>>>
>>>> I want to use a script to provide channels and incorporate it into
>>>> MythTv
>>>
>>> You should be able to manipulate the Import Recorder to achieve that.
>>
>> The import recorder didn't allow me to run a script. I can run the
>> script manually, and the import recorder will show it. What I'd like is
>> the import recorder to start and kill the script when the tuner is
>> accessed.
>>
>
>Does anyone know how to get input recorder to pause x seconds before
>searching for its file? I have a script which reads the log files and
>fires up the script I need, and takes it down again when not needed, but
>it creates its file too late for MythTv to see. If I append it to an
>existing file, then myth crashes.
Take a look at the events system. You can run scripts from start and
stop recording events. I have had this working to record from an FM
tuner, but recent changes in 0.26 have broken it and I have yet to get
around to fixing it. The start recording event is a bit broken in
0.26 so far - it does not provide the directory for the recording
file. Instead of a directory you get:
GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/<hostname>
So I had to search backwards in mythbackend.log to find the correct
location. Here is the code I use (2007 is the channel.chanid for
recording from this device):
recording_dir=`tac $mythtvlogdir/mythbackend.log | grep -m 1
"TVRecEvent.*(TuningNewRecorder).*2007_" | sed -n "s/.*\x27
\(.*\)\/2007_.*/\1/p"`
Contact me off list if you would like copies of my scripts as a basis
to work from - I do not want to make them generally available while
they are broken.
More information about the mythtv-users
mailing list