Opened 7 years ago

Closed 6 years ago

#10800 closed Bug Report - General (Fixed)

Inaccurate mythtranscode cuts

Reported by: im.js@… Owned by: Jim Stichnoth
Priority: minor Milestone: 0.27
Component: MythTV - Mythtranscode Version: 0.25-fixes
Severity: medium Keywords:
Cc: Ticket locked: no


When using mythtranscode --honorcutlist to remove commercials, the resulting cuts are not accurate to the cuts specified in the cut list.

I am trying to remove commercials from 1080i recordings by marking the cuts in Mythtv and running the default transcode profile configured for lossless output.

The actual cuts are off mark by different amounts, sometimes over 2 seconds from the intended cut point.

I am running mythtv 0.25 on a fresh install of mythbuntu 12.04.

This method of cutting commercials worked with frame-level accuracy in previous versions of mythtv, but it appears to be broken now.

The cuts seem to be set accurately when playing back the recording with the frontend.

I have tried re-building the keyframe index prior to setting cut points and transcoding, but that made no difference. I also tried multiple different 1080i TV sources, with no improvement.

I really miss this feature, and would be happy to diagnose further, provide logs, or whatever.

Change History (7)

comment:1 Changed 7 years ago by Jim Stichnoth

Status: newinfoneeded_new

The best way to diagnose this is if you can provide a short sample (50-100MB) demonstrating the problem. Doing so gets a bit complicated since it needs to be done in the context of MythVideo?. Here is how it would go:

  1. Create a sample: "dd if=/path/to/recording.mpg of=/path/to/video_storage_group/sample.mpg bs=1M count=100"
  2. Build the seektable: "mythcommflag --rebuild --video sample.mpg". Be sure to use a file path relative to the Videos storage group, not an absolute path.
  3. Edit the recording from within MythVideo? playback. There won't be an Edit Recording menu option, so you'll have to enter a keypress for the EDIT keybinding ("e" by default). The network control interface is good for this if you don't have an EDIT button mapped.
  4. Run mythtranscode manually: "mythtranscode -i sample.mpg -o edited.mpg --video --mpeg2 --honorcutlist". (I haven't actually tried this step, so the options may need adjustment.)
  5. Import edited.mpg into MythVideo? by rescanning. Verify the mismatch between sample.mpg+cutlist and edited.mpg.
  6. Upload sample.mpg and extract its cutlist for others to test. Unfortunately there's no officially supported way to extract a MythVideo? cutlist (this is an oversight in mythutil), so it would require running a mysql query like this:
select mark, type from filemarkup where filename='sample.mpg' and type in (0,1);

comment:2 Changed 7 years ago by Jim Stichnoth

Detailed description of a likely similar problem:

comment:3 Changed 7 years ago by beirdo

Owner: set to Jim Stichnoth

comment:4 Changed 7 years ago by im.js@…

After some trial and error, I found a workaround to this problem.

I found that when I do an initial "cut to beginning" on a video and run mythtranscode, I could then make accurate cuts on the resulting file.

This is an extra step, but it solves the problem for me as I record 1 minute early for programs I want to keep.

I hope this will help someone else.

comment:5 Changed 7 years ago by Kenni Lund [kenni a kelu dot dk]

im.js, would it be possible for you to provide the information which stichnot requested? A workaround is not a solution, it's a...workaround.

comment:6 Changed 6 years ago by Jim Stichnoth

Could you test this against the latest 0.25 or 0.26 and see if the problem is still there? This is probably related to a recent fix in v0.25.3-26-gff8c496 or later, and v0.26.0-70-gff4edc7 or later.

comment:7 Changed 6 years ago by Jim Stichnoth

Milestone: unknown0.27
Resolution: Fixed
Status: infoneeded_newclosed

I'm closing this as fixed for 0.27, as a result of a number of changes to keyframe detection in the recorder and the player. Some of these have been back-ported to 0.26 and 0.25, but anything more risks adding instability to those releases.

Note: See TracTickets for help on using tickets.