Opened 11 years ago

Closed 11 years ago

#11326 closed Bug Report - General (Won't Fix)

During playback of glitching HD-PVR recording, srt captions sometimes reset to time=0

Reported by: mythwiki@… Owned by: Jim Stichnoth
Priority: minor Milestone: unknown
Component: MythTV - Captions Version: 0.25.2
Severity: low Keywords:
Cc: Ticket locked: no

Description

Recordings made with the HD-PVR sometimes contain glitches, possibly due to momentary signal loss at the provider, or something else that makes the HD-PVR lose lock briefly. During playback of those recordings, if a .srt file is present to supply captioning data, sometimes the playback will stutter and continue, but the captions will rewind to the beginning of the recording and resume from there, so you'll see on screen the text that appeared during the opening of the show, even if you're 50 minutes into the program.

Change History (3)

comment:1 Changed 11 years ago by Jim Stichnoth

Component: MythTV - Video PlaybackMythTV - Captions
Owner: set to Jim Stichnoth
Status: newaccepted

It would be really helpful if you could provide a small HD-PVR sample with such a glitch near the beginning (then you can use "dd" to extract from the start of the file until just a bit after the glitch).

Also, please attach a mythfrontend log with "-v vbi,playback".

comment:2 Changed 11 years ago by mythwiki@…

I've examined a case of this in more detail. The recording where this happened did experience a HD-PVR reset. This seems to happen to me when there's a problem in the originating station, they get some momentary dropouts, and my STB produces something that causes the HD-PVR to give up on it. It doesn't seem to be an HD-PVR hardware issue, as it happens only with certain channels, and when it does, I can hook up the TV directly to the STB and see that there's heavy pixellation and often sound drop-outs on the particular channel that caused the problem.

So, the backend log showed:

E DeviceReadBuffer DeviceReadBuffer.cpp:513 (Poll) DevRdB(/dev/hdpvr): Poll giving up 2
E RecThread mpegrecorder.cpp:1010 (run) MPEGRec(/dev/hdpvr): Device error detected

which indicates that the HD-PVR read loop is being closed and restarted. This had the effect of resetting PTS/DTS to zero. The captions then restart from zero. This bad time synchronization manifests even if the user skips over the broken part of the file, or exits the viewer and restarts it from the bookmark.

As theorized by stichnot in IRC, it seems that the reset of PTS/DTS to zero is being sent to the captioning system and making it think we've jumped to the beginning of the recording.

comment:3 Changed 11 years ago by Jim Stichnoth

Resolution: Won't Fix
Status: acceptedclosed

To summarize the problem: When the SRT file is timestamp-based, the display code uses the PTS/DTS of the video to determine which subtitles to display. The HD-PVR recorder resets PTS/DTS to zero upon a device error. The SRT file in question is generated independently by a different recorder which has no idea about the device error.

As discussed on IRC, a safer approach would be to produce an SRT file with frame-based timing rather than timestamp-based. MythTV uses the Xine SRT parser, so any format that matches the parsing code in xine_demux_sputext.cpp that sets "demuxstr->uses_time=0;" should avoid the timestamp reset problem, though there may still appear to be small synchronization errors after the recorder reset.

I'm closing this as "won't fix" as the timestamp-based code seems robust for SRT files generated directly against the video source.

Note: See TracTickets for help on using tickets.