EDL (and ComSkip) integration
#46
Have you had time (and interest) to look at using the EDL class for the DVDPlayer video-player core?
http://xboxmediacenter.com/wiki/index.ph...evelopment
http://forum.xbmc.org/showthread.php?tid=10216
http://xboxmediacenter.com/wiki/index.ph..._Libraries
Reply
#47
Gamester17 Wrote:Have you had time (and interest) to look at using the EDL class for the DVDPlayer video-player core?
http://xboxmediacenter.com/wiki/index.ph...evelopment
http://forum.xbmc.org/showthread.php?tid=10216
http://xboxmediacenter.com/wiki/index.ph..._Libraries

Not yet, but the code is pretty generic and will easily integrate.
If I finish it, I can check out DVDPlayer integration. Maybe we can do something smart with chapters and scenemarkers, so we can use chapters for non-DVD movies.
Reply
#48
Rainbow 
DrDDT Wrote:Maybe we can do something smart with chapters and scenemarkers, so we can use chapters for non-DVD movies.
That would be great, some non-DVD video containers such as MKV (Matroska), OGM, NUT, and DIVX (that is .divx and not .avi) do have chapter support. I believe FFmpeg which the DVDPlayer uses does have support for chapter markers jumping in some of those containers (I think at least for MKV and OGM). Though I'm not sure if it has been implemented and enabled in the DVDPlayer(?)
Reply
#49
DrDDT Wrote:When using EDL, standard seeking can give a problem when the seek target is inside a cutpoint. When seeking backward inside a cutpoint, mplayer will jump forward again.

I wrote a seek compensator, but I don't know how to interpret the following code:

Code:
//If current time isn't bound by the total time,
    //we have to seek using absolute percentage instead
    if( GetTime() > iTime * 1000 )
    {
      SeekPercentage(GetPercentage()+percent);
    }

Is it possible not to know the total movie time? Of won't this situation occur for normal movies?
(I must admit I didn't know about percentage seeking. As long as I know of I'm seeking in seconds. Blush)

I'll ignore this for now.
Reply
#50
Hi,

I'm pretty much done with upgrading EDL features by writing a seperate class for it, and I'm thinking of supplying a patch and move on to something else.

I played around a lot, added/removed features, and for now I ended up with the following features:

- Read the following EDL formats:
EDL
ComSkip .txt (with framerate, like Comskip generates)
VideoRedo
- Cache EDL file to disk and pass it to MPlayer.
- Adjust seeking so cutpoints are skipped.
- Support for SceneMarkers for the following formats:
VideoRedo
EDL (I introduced a type '3' for scenemarkers)
- Support for SceneMarkers seeking, added keycode.
(I mapped this to the >| and |< keys on my remote)
- added 'edl:y|n to video status screen.

The following is implemented, but disabled:
- Cutpoint seeking (only usefull for cutpoint editing?)
- Automatically create Bookmarks for every SceneMarker.
(Didn't even test this, because commercial skippers generate a lot of scenemarkers).
- Reading of 'VDR' format, because it's not very well specified.

Not implemented:
- Compensation for cutpoint when movie length is unknown and percentage seeking is used.
- Visual cutpoints/scenemarkers on video progress bar.

Problems/Questions:
- The readers now stop reading at the first format error, and invalidate the EDL. This might be a problem for showanalyzer, I get a lot of strange format errror with this tool. Comskip output is fine.
- Should I be able to go to a scenemarker inside a cutpoint? For now, you can.
- Should one be able to seek inside a cutpoint, and just jump over a cutpoint beginning to avoid bouncing?
- Any other missing features, or should I drop features?
- The code needs more testing. I can only test using XBMC_PC and release code on XBOX, using my limited usage pattern.
Reply
#51
Hi!

I modified the CMPlayer:Confusedeek function to compensate for cutpoints.
So far this was working fine, but I've run into strange mplayer seek behaviour.

Normally, a seek step is 30 seconds, but to jump over a cutpoint, I dynamically increase it. Next CMPlayer::SeekRelativeTime is called with the changed number.

I noticed that sometimes MPlayer seeks with the 'standard' 30 seconds, and not with the number I called SeekRelativeTime with!

I added some debugging to show that the code is correct, only MPlayer doesn't execute the correct seek:

Code:
00:31:12 M: 30973952   DEBUG: Mplayer: SeekRelativeTime:300, command:seek +300 0
00:31:13 M: 30990336   DEBUG: CApplication::OnKey: 166 pressed, action is 22
00:31:13 M: 31039488   DEBUG: CEdl: Compensateseek, curtime:2794.00, old:300 new:300
00:31:13 M: 31039488   DEBUG: Mplayer: SeekRelativeTime:300, command:seek +300 0
00:31:15 M: 30998528   DEBUG: CApplication::OnKey: 168 pressed, action is 20
00:31:15 M: 30994432   DEBUG: CEdl: Compensateseek, curtime:3097.00, old:30 new:455 CORRECTED
00:31:15 M: 30994432   DEBUG: Mplayer: SeekRelativeTime:455, command:seek +455 0
00:31:16 M: 30969856   DEBUG: CApplication::OnKey: 168 pressed, action is 20
00:31:16 M: 30969856   DEBUG: CEdl: Compensateseek, curtime:3553.00, old:30 new:30
00:31:16 M: 30969856   DEBUG: Mplayer: SeekRelativeTime:30, command:seek +30 0
00:31:18 M: 30965760   DEBUG: CApplication::OnKey: 168 pressed, action is 20
00:31:18 M: 31039488   DEBUG: CEdl: Compensateseek, curtime:3585.00, old:30 new:30
00:31:18 M: 31039488   DEBUG: Mplayer: SeekRelativeTime:30, command:seek +30 0
00:31:19 M: 30986240   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:19 M: 30986240   DEBUG: CEdl: Compensateseek, curtime:3617.00, old:-30 new:-30
00:31:19 M: 30986240   DEBUG: Mplayer: SeekRelativeTime:-30, command:seek -30 0
00:31:19 M: 30949376   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:19 M: 30949376   DEBUG: CEdl: Compensateseek, curtime:3588.00, old:-30 new:-30
00:31:19 M: 30949376   DEBUG: Mplayer: SeekRelativeTime:-30, command:seek -30 0
00:31:21 M: 30842880   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:21 M: 30842880   DEBUG: CEdl: Compensateseek, curtime:3559.00, old:-30 new:-455 CORRECTED
00:31:21 M: 30842880   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:21 M: 30965760   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:21 M: 31014912   DEBUG: CEdl: Compensateseek, curtime:3531.00, old:-30 new:-455 CORRECTED
00:31:21 M: 31014912   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:22 M: 31035392   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:22 M: 31035392   DEBUG: CEdl: Compensateseek, curtime:3503.00, old:-30 new:-455 CORRECTED
00:31:22 M: 31035392   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:23 M: 30978048   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:23 M: 31047680   DEBUG: CEdl: Compensateseek, curtime:3476.00, old:-30 new:-455 CORRECTED
00:31:23 M: 31047680   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:24 M: 31010816   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:24 M: 31043584   DEBUG: CEdl: Compensateseek, curtime:3446.00, old:-30 new:-455 CORRECTED
00:31:24 M: 31043584   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:25 M: 31023104   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:25 M: 31023104   DEBUG: CEdl: Compensateseek, curtime:3419.00, old:-30 new:-455 CORRECTED
00:31:25 M: 31023104   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0

Several times, the command 'seek -455' is sent to mplayer, but a seek of -30 is executed.

Any idea what might be wrong, and how to fix this?
Reply
#52
I just submitted the edl class/scenemarker code.

http://sourceforge.net/tracker/index.php...tid=581840
Reply
#53
DrDDT Wrote:Hi!

I modified the CMPlayer:Confusedeek function to compensate for cutpoints.
So far this was working fine, but I've run into strange mplayer seek behaviour.

Normally, a seek step is 30 seconds, but to jump over a cutpoint, I dynamically increase it. Next CMPlayer::SeekRelativeTime is called with the changed number.

I noticed that sometimes MPlayer seeks with the 'standard' 30 seconds, and not with the number I called SeekRelativeTime with!

Several times, the command 'seek -455' is sent to mplayer, but a seek of -30 is executed.

Any idea what might be wrong, and how to fix this?

This behaviour also occurs with the new EDL code, using seektime().

I traced down the problem to the following situation:

Say your EDL file contains a cut from 300 to 600 seconds.
With the 'new' EDL code, the cuttime is removed, so when you're at 610 seconds absolute time, XBMC will display 610-300 cut seconds = 310.

Now when you're at 310 seconds, and trying to seeks before the cutpoint, say to 290 seconds, the bug occurs.

Somehow, the EDL code of MPlayer re-applies the cutpoint, and jumps back to past the cutpoint. A seek to 290 will often throw you back beyond the cutpoint.

I tried debugging, but you cannot debug mplayer.dll easy.

Any ideas would be welcome.
Reply

Logout Mark Read Team Forum Stats Members Help
EDL (and ComSkip) integration0