Opened 20 years ago

Closed 17 years ago

#1088 closed patch (fixed)

Convert to using MARK_GOP_BYFRAME instead of MARK_GOP_START

Reported by: adeffs@… Owned by: cpinkham
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Geoffrey Hausheer, Janne Grunau, stuartm Ticket locked: no

Description

as seen in http://www.gossamer-threads.com/lists/mythtv/dev/170636

mythcommflag rebuild does not properly rebuild the seek table resulting in extra short length reporting and jumping around doesn't work properly.

daniel.chassot at gmail has a "fix" that works, but may cause other problems: looking in avformatdecoder.cpp around line 794, I found that the keyframe distance is initially set to 15 except for AVI file because the avi keyframes are too irregular. As it seems to be my problem too for my DVB recordings, I've commented out the line 794: if (!strcmp(fmt->name, "avi")).

Attachments (4)

gopbyframe.diff (1.9 KB ) - added by maverik044 18 years ago.
mpegrec_gopbyframe.diff (1.5 KB ) - added by maverik044 18 years ago.
ivtv_gopbyframe.diff (705 bytes ) - added by maverik044 18 years ago.
1088-v1.patch (10.6 KB ) - added by danielk 17 years ago.
fix for mpegrecorder

Download all attachments as: .zip

Change History (18)

comment:2 by danielk, 20 years ago

Milestone: 0.20
Summary: mythcommflag rebuild doesn't work for DVB/ATSC MPEGsmythcommflag rebuild broken for non-ivtv MPEGs
Version: head

We should just get rid of MARK_GOP_START altogether and always use MARK_GOP_BYFRAME which will work with all MPEG recordings.

comment:3 by Geoffrey Hausheer <ghaushe>, 20 years ago

Cc: Geoffrey Hausheer added

comment:4 by cpinkham, 20 years ago

Owner: changed from Isaac Richards to cpinkham

comment:5 by cpinkham, 20 years ago

Status: newassigned
Summary: mythcommflag rebuild broken for non-ivtv MPEGsConvert to using MARK_GOP_BYFRAME instead of MARK_GOP_START
Type: defecttask

comment:6 by cpinkham, 19 years ago

Milestone: 0.200.21

comment:7 by Janne Grunau, 19 years ago

Cc: Janne Grunau added

comment:8 by maverik044, 18 years ago

Here's my go at the patch. Patch is attached in three parts.

  1. gopbyframe.diff I've been able to test. It works works with videos and recordings I have. It works with DVD's I've tested. It fixes the problem of mythcommflag generating incorrect position maps for mpeg files and recordings. This fixes FFW/REW Seeking on mpeg files that have NO position map and that the keyframedist is not constant, but still will want to have a position map as the picture is blocky in FFW and REW.
  1. mpegrec_gopbyframe.diff changes the mpeg recorder to use a keyframedist of 1. I have no way of testing this, this is why it is separate. I noted that the other recorders seem to already use MARK_GOP_BYFRAME, so no changes needed.
  1. ivtv_gopbyframe.diff changes ivtvdecoder.cpp to use MARK_GOP_BYFRAME and keyframedist of 1 if there is no position map. Again I have no way to test this, so it is also separate.

There's some code in decoderbase.cpp in PosMapFromEnc that could be removed if all three diff files are used. This is further code in decoderbase.cpp and avformatdecoder.cpp that is only needed to support old database position maps of type MARK_GOP_START.

by maverik044, 18 years ago

Attachment: gopbyframe.diff added

by maverik044, 18 years ago

Attachment: mpegrec_gopbyframe.diff added

by maverik044, 18 years ago

Attachment: ivtv_gopbyframe.diff added

comment:9 by stuartm, 18 years ago

Cc: stuartm added

comment:10 by cpinkham, 18 years ago

Milestone: 0.210.22

by danielk, 17 years ago

Attachment: 1088-v1.patch added

fix for mpegrecorder

comment:11 by danielk, 17 years ago

Type: taskpatch

The patch I've just attached is lightly tested. I'll be applying it to my production machine to give it decent workout. It just uses MARK_GOP_BYFRAME in the mpegrecorder rather than MARK_GOP_START to avoid creating any new recordings employing MARK_GOP_START...

comment:12 by danielk, 17 years ago

(In [17826]) Fixes #5462. Refs #1088. Use MARK_GOP_BYFRAME for PS recordings in MPEGRecorder.

comment:13 by Janne Grunau, 17 years ago

(In [18854]) convert avformatdecoder seektables from MARK_GOP_START to MARK_GOP_BYFRAME. Refs #1088

comment:14 by Janne Grunau, 17 years ago

Resolution: fixed
Status: acceptedclosed

(In [19242]) remove last active use of MARK_GOP_START. Fixes #1088

Note: See TracTickets for help on using tickets.