Opened 11 years ago

Closed 11 years ago

#9256 closed Bug Report (Fixed)

Corrupted preview pics for MPEG2-TS and MPEG2-PS

Reported by: beirdo Owned by: beirdo
Priority: minor Milestone: 0.24.1
Component: MythTV - General Version: Master Head
Severity: low Keywords:
Cc: j-rod Ticket locked: no


On most of my MPEG2-TS and MPEG2-PS recordings, my preview pics are either black frames or partial frames (looks like a B-frame). I have tracked the issue down to the in-recording seektable being incorrect (and not matching a rebuilt seektable), and in particular, having offsets that are past the frame in question.

I have a fix for the -TS case complete (just needs tidying), but the -PS case is still being somewhat problematic. I'm creating the ticket so it doesn't get forgotten, and so there's a ticket number to refer to.

Attachments (1)

0001-Tweaking-in-recording-seektable-building.patch (4.2 KB) - added by beirdo 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by beirdo

Status: newassigned

comment:2 Changed 11 years ago by beirdo

The attached patch has it behaving well enough to get previews. The TS case seems to be fixed, the PS is at least always with too early an offset rather than too late, so it's functional, but not perfect.

I still need to test, and try to perfect the PS case, but I'm posting this for others to test in the mean time.

Changed 11 years ago by beirdo

comment:3 Changed 11 years ago by Clayton Smith <argilo@…>

I just wanted to confirm that I've been seeing this bug in my previews ever since upgrading from 0.23 to 0.24. All new recordings (both NTSC and ATSC) made with my Hauppauge HVR 1600 have mostly black previews.

comment:4 Changed 11 years ago by stuartm

Ticket locked: set

Clayton, please read the TicketHowTo, we don't like 'me toos' in ticket, they add absolutely nothing of value to most tickets and just increase the workload for the developers.

If you wanted to help you could have tested the patch that Beirdo attached to the ticket.

comment:5 Changed 11 years ago by beirdo

Ticket locked: unset

Judging by the success I've been hearing from j-rod and a couple others, I am willing to provisionally check this in, although it isn't completely clean yet as the MPEG2-PS recordings do not yet match the rebuilt. Unless I hear otherwise in the next few days, I'll commit, but not close the ticket quite yet until they actually match.

comment:6 Changed 11 years ago by beirdo

(In [27338]) Fix the in-recording seektable for MPEG2-TS. Also, make the in-recording seektable for MPEG2-PS better, although not yet quite correct. In particular, the file offsets are consistently earlier than they should be, but at least this makes the previews functional.

The original issue seemed to be that we were recording the offest AFTER the packet in question, rather than the offset at the beginning of the packet. In MPEG2-TS, due to the packetizing of the stream, it's easy to backtrack to the beginning of the previous packet, but in MPEG2-PS, the frames are all of differing sizes, and I haven't quite got it tweaked right yet.

Refs #9256

comment:7 Changed 11 years ago by beirdo

(In [27339]) Backport [27338] from trunk.

Should make the black/glitched-out previews not happen anymore. Fixes in-recording seektable generation for MPEG2-TS, and gets MPEG2-PS nearly fixed.

Refs #9256

comment:8 Changed 11 years ago by beirdo

Resolution: Fixed
Status: assignedclosed

I'm going to close this now. If it reoccurs, we can open a new one to make it work again. The checked-in solution isn't perfect, but it's been working quite well. The MPEG2-PS seekmap made during recording, and that made during a rebuild do not yet match, but it seems to be working OK.

Note: See TracTickets for help on using tickets.