John,
Thanks for the reply. I really appreciate it. I guess my last question
on this is: Does anyone know how I can get the Card Input ID (the
cardinputid column under the cardinput table) for the card that is
recording? I'd like to pass that value to the script so that I can run
ivtvctl -q 0 on the two Tuner inputs for my PVR-500. If I can get that,
I can modify your shell script that will do the rest. Thanks. I really
appreciate the help.
Jonathan Black
John Biundo wrote:
>Jonathan Black wrote:
>
>
>>John,
>>
>>Yes, ivtvctl -q 0 fixes the problem everytime. But it does cause the
>>audio to skip for a second, so the cron job wouldn't go over well.
>>
>>I would like to see your script. I will most likely have to edit it some
>>because I plan on having an option for my parents to record shows
>>through the RCA as well if I need. I'll figure it out though. Your
>>script should help me figure out where I have to edit code at and such.
>>
>>Thanks. I appreciate it.
>>
>>Jonathan
>>
>>
>>
>
>Jonathan,
>
>OK, I'm really NOT a programmer, so forgive the hackiness of this.
>Sounds like you and I have pretty much the same symptoms, so maybe this
>will help.
>
>Basically, what I did was to turn on all the debug messages and used
>that to deduce what code was running whenever a recording began. I then
>inserted a single line of code that invokes a shell script at the
>beginning of that function.
>
>Below is the segment of the program file tv_rec.cpp that includes the
>three lines I added. In my case, with mythtv 0.19-fixes from about a
>month ago, this begins on line 609 of that file.
>
>My changes begin and end with a line like VERBOSE(VB_RECORD, "JBJBJB:...)
>
>Following the tv_rec.cpp changes is the shell script I run. Most of the
>stuff in the shell script is unnecessary -- it's just left over from
>when I was doing some testing to verify that I was running the right
>script at the right time. Also, I'm not sure whether the sleep 15 is
>necessary, but I wanted to make sure the recording had actually begun.
>In my case, I always start recording 90 seconds early anyway, so this is
>not a problem.
>
>========= tv_rec.cpp segment ===========
>
>void TVRec::StartedRecording(ProgramInfo *curRec)
>{
> if (!curRec)
> return;
>
> VERBOSE(VB_RECORD, "JBJBJB: Begin Record Hack");
> system("sh /space1/scripts/mythtv/prerecord &");
> VERBOSE(VB_RECORD, "JBJBJB: End Record Hack");
>
> curRec->StartedRecording(rbFilePrefix, rbFileExt);
> VERBOSE(VB_RECORD, LOC + "StartedRecording("<<curRec<<") fn("
> <<curRec->GetFileName()<<")");
>
>======== shell script (e.g., /space1/scripts/mythtv/prerecord, in my
>case) =========
>
>#!/bin/sh
>echo "Begin prerecord script (v0.2)..." >> /var/log/mythtv/prerecord.log
>/bin/date >> /var/log/mythtv/prerecord.log
>sleep 15
>/usr/local/bin/ivtvctl --device=/dev/video0 -q0 >>
>/var/log/mythtv/prerecord.log
>echo "End prerecord script" >> /var/log/mythtv/prerecord.log
>/bin/date >> /var/log/mythtv/prerecord.log
>
>Let me know if this works for you. I'll try to answer any questions,
>but my C++, Mythtv source, and ivtv knowledge are still pretty basic.
>The good news is that this seems to work for me. I've had 3 or 4 cases
>where I've had a recording start out with tinny audio, then, about 15
>seconds into it, the ivtvctl script kicks in and it magically fixes the
>problem.
>
>Cheers,
>john
>
>_______________________________________________
>ivtv-users mailing list
>[email protected]
>http://ivtvdriver.org/mailman/listinfo/ivtv-users
>
>.
>
>
>
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users