Opened 18 years ago

Closed 15 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 17 years ago.
mpegrec_gopbyframe.diff (1.5 KB) - added by maverik044 17 years ago.
ivtv_gopbyframe.diff (705 bytes) - added by maverik044 17 years ago.
1088-v1.patch (10.6 KB) - added by danielk 16 years ago.
fix for mpegrecorder

Download all attachments as: .zip

Change History (18)

comment:2 Changed 18 years ago by danielk

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 Changed 18 years ago by Geoffrey Hausheer <ghaushe>

Cc: Geoffrey Hausheer added

comment:4 Changed 18 years ago by cpinkham

Owner: changed from Isaac Richards to cpinkham

comment:5 Changed 18 years ago by cpinkham

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

comment:6 Changed 18 years ago by cpinkham

Milestone: 0.200.21

comment:7 Changed 17 years ago by Janne Grunau

Cc: Janne Grunau added

comment:8 Changed 17 years ago by maverik044

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.

Changed 17 years ago by maverik044

Attachment: gopbyframe.diff added

Changed 17 years ago by maverik044

Attachment: mpegrec_gopbyframe.diff added

Changed 17 years ago by maverik044

Attachment: ivtv_gopbyframe.diff added

comment:9 Changed 17 years ago by stuartm

Cc: stuartm added

comment:10 Changed 16 years ago by cpinkham

Milestone: 0.210.22

Changed 16 years ago by danielk

Attachment: 1088-v1.patch added

fix for mpegrecorder

comment:11 Changed 16 years ago by danielk

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 Changed 16 years ago by danielk

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

comment:13 Changed 15 years ago by Janne Grunau

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

comment:14 Changed 15 years ago by Janne Grunau

Resolution: fixed
Status: acceptedclosed

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

Note: See TracTickets for help on using tickets.