EDL-based seek in MKV broken - works fine with same in MPEG
#1
Hi there,

I use tvheadend 2.12 to record mkv files from DVB-t. The files play fine, but i'm trying to get comskip (under wine) to work properly, as noone like watching adverts.

The process (as far as i can tell) is to
1) use ffmpeg to convert mkv to mpeg
2) use comkip (under wine) to generate the EDL file

This all works swimmingly.

The problem is when i playback the MKV file (with associated EDL in the folder), the seeking as defined in the EDL does not work. The start of the commercial is determined properly, as I can see the OSD come up saying its going to skip. But the skip fails, and it basically keeps showing without skipping.

If I play the ffmpeg generated MPEG file (again with the EDL file in the folder), the skipping works flawlessly.

What is wrong with skipping on tvheadend generated MKV files in XBMC?

From xbmc.log when playing MKV
Quote:14:18:00 T:140157461489408 M:1365270528 DEBUG: CheckAutoSceneSkip - Clock in commercial break [00:03:38.880 - 00:07:19.400]: 00:03:38.902. Automatically skipping to end of commercial break (only done once per break)
14:18:00 T:140157461489408 M:1365270528 DEBUG: demuxer seek to: 439401
14:18:00 T:140157461489408 M:1365270528 DEBUG: SeekTime - seek ended up on time 438840
14:18:00 T:140157461489408 M:1365270528 DEBUG: demuxer seek to: 439401, success
14:18:00 T:140157461489408 M:1365270528 DEBUG: CheckPlayerInit - dropping packet type:2 dts:438840000.000000 to get to start point at 439401000.000000
14:18:00 T:140157417674496 M:1365270528 DEBUG: DllPostProc: Using libpostproc system library
14:18:00 T:140157854013600 M:1365270528 DEBUG: ------ Window Init (DialogSeekBar.xml) ------
14:18:00 T:140157417674496 M:1365270528 DEBUG: DllPostProc: Using libpostproc system library
14:18:02 T:140157854013600 M:1365278720 DEBUG: Previous line repeats 64 times.
14:18:02 T:140157854013600 M:1365278720 DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
14:18:02 T:140157417674496 M:1365278720 DEBUG: DllPostProc: Using libpostproc system library
14:18:07 T:140156795352832 M:1365389312 DEBUG: Previous line repeats 118 times.
14:18:07 T:140156795352832 M:1365389312 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
14:18:07 T:140157417674496 M:1365389312 DEBUG: DllPostProc: Using libpostproc system library
14:18:08 T:140157417674496 M:1365504000 DEBUG: Previous line repeats 13 times.
14:18:08 T:140157417674496 M:1365504000 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
14:18:08 T:140157461489408 M:1365504000 DEBUG: CheckPlayerInit - dropping packet type:2 dts:438760000.000000 to get to start point at 439401000.000000
14:18:08 T:140157461489408 M:1365504000 DEBUG: CDVDPlayer::SetCaching - caching state 2
14:18:08 T:140157461489408 M:1365504000 DEBUG: CheckPlayerInit - dropping packet type:1 dts:438238000.000000 to get to start point at 439401000.000000
14:18:08 T:140157461489408 M:1365504000 DEBUG: CDVDPlayer::SetCaching - caching state 3
14:18:08 T:140157461489408 M:1365504000 DEBUG: CheckPlayerInit - dropping packet type:1 dts:438262000.000000 to get to start point at 439401000.000000
14:18:08 T:140157461489408 M:1365504000 DEBUG: CheckPlayerInit - dropping packet type:1 dts:438286000.000000 to get to start point at 439401000.000000
14:18:08 T:140157461489408 M:1365504000 DEBUG: CheckPlayerInit - dropping packet type:1 dts:438310000.000000 to get to start point at 439401000.000000
14:18:08 T:140157461489408 M:1365504000 DEBUG: CheckPlayerInit - dropping packet type:1 dts:438334000.000000 to get to start point at 439401000.000000

From xbmc.log when playing MPEG
Quote:14:18:27 T:140157461489408 M:1362702336 DEBUG: CheckAutoSceneSkip - Clock in commercial break [00:03:38.880 - 00:07:19.400]: 00:03:38.880. Automatically skipping to end of commercial break (only done once per break)
14:18:27 T:140157461489408 M:1362702336 DEBUG: demuxer seek to: 439401
14:18:27 T:140157461489408 M:1362702336 DEBUG: SeekTime - seek ended up on time 439370
14:18:27 T:140157461489408 M:1362702336 DEBUG: demuxer seek to: 439401, success
14:18:27 T:140157461489408 M:1362702336 DEBUG: CheckPlayerInit - dropping packet type:1 dts:438984000.000000 to get to start point at 439401000.000000
14:18:27 T:140157636372224 M:1362702336 DEBUG: DllPostProc: Using libpostproc system library
14:18:28 T:140157854013600 M:1361412096 DEBUG: Previous line repeats 18 times.
14:18:28 T:140157854013600 M:1361412096 DEBUG: SDLKeyboard: scancode: 113, sym: 276, unicode: 0, modifier: 0
14:18:28 T:140157854013600 M:1361412096 DEBUG: OnKey: 61477 pressed, action is StepBack
14:18:28 T:140157461489408 M:1361412096 DEBUG: CDVDPlayer::SetCaching - caching state 2
14:18:28 T:140157461489408 M:1361412096 DEBUG: demuxer seek to: 183542
14:18:28 T:140157461489408 M:1361412096 DEBUG: SeekTime - seek ended up on time 183530
14:18:28 T:140157461489408 M:1361412096 DEBUG: demuxer seek to: 183542, success
14:18:28 T:140157854013600 M:1361412096 DEBUG: CAnnouncementManager - Announcement: PlaybackSeek from xbmc
14:18:28 T:140157636372224 M:1361412096 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
14:18:28 T:140157443970816 M:1361412096 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
14:18:28 T:140157443970816 M:1361412096 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(183024000.000000, 0)
14:18:28 T:140157461489408 M:1361412096 WARNING: CDVDPlayer::CheckContinuity - wrapback of stream:2, prev:183650000.000000, curr:183570000.000000, diff:-80000.000000
14:18:28 T:140157461489408 M:1361412096 DEBUG: CDVDPlayer::HandleMessages - player started 1
14:18:28 T:140157636372224 M:1361412096 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(183530000.000000, 1)
14:18:28 T:140157636372224 M:1361412096 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback

Any thoughts?

Cheers,

Nathan
Reply
#2
the mkvs that are created by tvheadend aren't correct afaik. that might have been fixed since the last time I checked, but in the version on my ppa there's some problem with the length/timestamps.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#3
dushmaniac Wrote:the mkvs that are created by tvheadend aren't correct afaik. that might have been fixed since the last time I checked, but in the version on my ppa there's some problem with the length/timestamps.

is this still the case? again because playing this on mplayer of ffmpeg works just fine and skips correctly, in XBMC the skip is a few frames off.
Reply
#4
You could try remuxing with mkvmerge before running comskip. That would iron out any seek table problems.
Reply
#5
now why didnt i think of that? Smile I'll give it a shot hopefully soon.... Cheers Nathan
Reply
#6
I knew your suggestion was too easy Smile For my purposes, i have the original mkv (with timestamp problems), take a copy, convert to mpeg, run comskip, copy the edl back to the source folder.

The problem with fixing the mkv, is that i need to copy the fixed mkv over the original one. This would be bad if you happened to be watching the original mkv right? Unless xbmc has some smarty-pants way of continuing to play a file, when it is being overwritten?

I just have to hope that the tvheadend author fixes the mkv timestamp issue, and then i'll be 100% go with comskip.

Cheers,

NAthan
Reply

Logout Mark Read Team Forum Stats Members Help
EDL-based seek in MKV broken - works fine with same in MPEG0