[mythtv-users] Captions with HD-PVR help
Mike Rice
mikerice1969 at gmail.com
Sun Nov 16 18:24:26 UTC 2014
On Tue, Nov 11, 2014 at 8:16 PM, Bob <mythtv at cox.net> wrote:
> On 11/11/2014 06:03 PM, Mike Rice wrote:
>
>>
>> I think I may try to start the vbi recording from a rec started writing
>> event instead of a rec started event. That may get me closer to what I
>> need, and then ccextractor might add my delay better (or I'll use a perl
>> script).
>>
> Let me know how well this works. I have a variable amount of delay in my
> captions. If I do a single recording the delay is around 30 seconds. If I
> have back-to-back recordings the delay is almost zero. I usually have to
> use a script to get the captions within 5 seconds, then I can use the
> frontend menu to fine tune.
Looks like I am having pretty good success now. Most of my recordings seem
to be fairly in sync with the captions within a second or so (which can be
easily adjusted in the frontend). Here's what I did:
1. Run the hd-captions-start script when REC_STARTED_WRITING event is
triggered instead of REC_STARTED. For me there was a minimum pf 8 second
delay between those two events. Maybe more if the system was busy.
2. Removed all code that tried to determine the recording duration and
adjust based on it. Instead I just went with the idea of recorder
on/captions on and recorder off/captions off.
3. In hd-captions-start just start recording the captions as soon as
possible. I left the code to kill vbi2raw in but it has never fired for me
according to my logs. Not sure I follow why that's needed. I am assuming
the REC_FINISHED event occurs when the tuner stops recording no matter what
postroll/end late/early options you use. If that's true then vbi2raw is
almost certainly killed before the REC_STARTED_WRITING event occurs for the
next recording, especially in my case where I have around 8 seconds between
REC_STARTED and REC_STARTED_WRITING. I will probably try to remove it to
improve the timing a bit more.
4. In hd-captions-finalize (called at REC_FINISHED) I just kill the vbi2raw
that was started in hd-captions-start then run ccextractor -in=raw -delay X
and copy the resulting .srt file to the recording directory. I also copy
the .raw file to the recording directory along with a script that I can
easily run to adjust the delay if I find out later it is off.
5. Created a script to run on REC_DELETED to remove the .srt file, .raw
file, and script.
Still need clean up my scripts a bit but it looks good.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20141116/fbbb3e07/attachment.html>
More information about the mythtv-users
mailing list