Opened 18 years ago

Closed 18 years ago

#760 closed defect (fixed)

Transcode doesn't set keyframes properly, breaks recordings

Reported by: wseltzer Owned by: cpinkham
Priority: trivial Milestone: unknown
Component: mythtv Version:
Severity: low Keywords:
Cc: Ticket locked: no

Description

Problem starts sometime between 7738 and 7780, and continues through current (8220). If necessary, I can test further to find the precise rev where this was introduced.

Recording from WinTV BT878 to MPEG4, cut and transcode to MPEG4. After transcoding, keyframes do not appear to be set properly. Watching a recording still works, but on skip forward or back, the image is blocky and then fills in. Recordings are transcoded correctly if I revert to 7738.

mythfrontend -v playback on a brokenly transcoded file, jumping forward: 2005-11-30 03:11:43.411 TV: ProcessKeypress?() 2005-11-30 03:11:43.411 TV: handled(0) actions[0](SEEKFFWD) 2005-11-30 03:11:43.412 TV: handled(0) actions[1](RIGHT) 2005-11-30 03:11:43.472 DecorderBase::DoFastForward?(3425, do flush) 2005-11-30 03:11:43.472 NVP: ClearAfterSeek?() 2005-11-30 03:11:43.473 VideoOutputXv?: ClearAfterSeek?() 2005-11-30 03:11:43.473 VideoBuffers::DiscardFrames?(): UUAUUUUUUUUUUUUUUUUUUUUUUUUUUUU 2005-11-30 03:11:43.473 VideoBuffers::DiscardFrames?(): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -- done() 2005-11-30 03:11:43.502 waiting for prebuffer... 0 [mpeg4 @ 0xb75fd110]warning: first frame is no keyframe 'video_output' mean = '34784.09', std. dev. = '14630.15', fps = '28.75' 2005-11-30 03:11:48.012 TV: ProcessKeypress?() 2005-11-30 03:11:48.012 TV: handled(0) actions[0](SEEKFFWD) 2005-11-30 03:11:48.013 TV: handled(0) actions[1](RIGHT) 2005-11-30 03:11:48.060 DecorderBase::DoFastForward?(6851, do flush) 2005-11-30 03:11:48.060 NVP: ClearAfterSeek?() 2005-11-30 03:11:48.060 VideoOutputXv?: ClearAfterSeek?() 2005-11-30 03:11:48.060 VideoBuffers::DiscardFrames?(): UUUUUUUUUUAUUUUUUUUUUUUUUUUUUUU 2005-11-30 03:11:48.061 VideoBuffers::DiscardFrames?(): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -- done() 2005-11-30 03:11:48.100 waiting for prebuffer... 0 [mpeg4 @ 0xb75fd110]warning: first frame is no keyframe 'video_output' mean = '34918.18', std. dev. = '15315.23', fps = '28.64' 'video_output' mean = '33330.83', std. dev. = '11012.46', fps = '30.00'

Re-running commercial flagging on a broken recording gives a series of: [mpeg4 @ 0xb7663110]warning: first frame is no keyframe

mplayer exits from the same files with "seek failed" on a ffwd (although testing with older files suggests it can't seek on those either).

Let me know if more info would help. I'll attach a snippet of a broken file to the ticket.

--Wendy

Change History (9)

comment:1 Changed 18 years ago by wseltzer@…

Summary: Transcode doesn't set keyframes properlyTranscode doesn't set keyframes properly, breaks recordings

Further investigation shows the problem was introduced between 7738 and 7740 (that is, transcoding with 7738 produces perfect recordings, transcoding the same show with 7740 produces one that shows blockiness on skip-forward and fails to rewind properly and gives warnings: [mpeg4 @ 0xb750b110]warning: first frame is no keyframe ).

Of course there's a lot in 7739 (the "breaks Live-TV" change), but I hope that helps someone to track down the transcode problems.

(I can't attach a large enough file to show the errors, but email me if you need an example.)

Thanks! --Wendy

comment:2 Changed 18 years ago by Isaac Richards

Owner: changed from Isaac Richards to cpinkham

Chris, mind taking this one?

comment:3 Changed 18 years ago by cpinkham

Status: newassigned

comment:4 Changed 18 years ago by cpinkham

Resolution: fixed
Status: assignedclosed

(In [8562]) In NVR, reset the frameofgop indicator whenever we write out a keyframe, not just whenever we write out the sync frames. mythtranscode just copies sync frames when it does a MPEG4->MPEG4 transcode, so the frameofgop indicator wasn't getting reset properly.

I believe this fixes #760.

comment:5 Changed 18 years ago by cpinkham

Resolution: fixed
Status: closedreopened

Received a report that this isn't fixed yet, so I'm reopening the ticket.

comment:6 Changed 18 years ago by cpinkham

(In [8612]) Fix mythtranscode keyframe creation after a cutpoint when transcoding MPEG4->MPEG4. Also fix a typo bug in the keyframeAdjustTable code in decoderbase.cpp. This commit references #760. It really fixes the issues in the bugreport, but there is one other related issue with seeking that I want to fix before closing the ticket. When seeking by keyframe in the editor, seeking forward by one keyframe actually goes forward by two keyframes.

comment:7 Changed 18 years ago by cpinkham

Milestone: 0.20
Priority: minortrivial
Severity: mediumlow

Since the only existing problem with this ticket appears to affect seeking by keyframe in the editor when editting a recording that has a keyframeadjust map and the fact that I haven't had time to figure it out yet, this issue is not a show-stopper so I'm moving the milestone to 0.20. The issue I'm seeing is that seeking by keyframe jumps forward 2 keyframes instead of one, nothing major.

comment:8 Changed 18 years ago by cpinkham

Milestone: 0.20unknown

Removing the 0.20 milestone on this one. It is a very low priority bug since it is a fringe case. If the double-keyframe seek in the editor when editting fiels with keyframe adjust tables annoys someone enough to submit a patch I'll be happy to apply, but it is a bit down on my list of TODO items right now.

comment:9 Changed 18 years ago by cpinkham

Resolution: fixed
Status: reopenedclosed

Going to close this ticket and open another one for the real bug I mentioned earlier in the ticket. This is a different bug than the one the ticket was opened for so I'm going to create another ticket for that so I can track it separately.

Note: See TracTickets for help on using tickets.