If I code it (frame based EDL), will you guys include it?
#1
It seems I might have a few months of extra time on my hands since I will likely be between jobs soon. So I was thinking of helping out a bit with some XBMC coding.

One feature that I would love to add is frame based EDL. Currently the EDL (edit decision list) support is time based, and I'm pretty sure it does a good job for skipping commercials, etc. However, I'd like to be able to use EDL for editing scenes out of movies (gory scenes, or scenes with lots of swearing, etc. ... ie: make a movie child safe). The existing EDL just didn't seem to have fine enough resolution for specifying which parts to edit, etc. since after all it's time based and in one tenth of a second 2.4 frames fly by (or more). Usually I'd either cut off the last part of the previous scene or show the first part of the scene I wanna cut out. It just didn't look perfect enough for my taste Smile

My plan is to make use of a lot of the code found here (http://github.com/lbrandy/ffmpeg-fas/) which allows frame based interaction with ffmpeg and incorporate it into the existing EDL code.

In the end what I would like to achieve is the ability for XBMC to skip as little as one frame or several thousand frames, all with perfect frame accuracy.

For short skips it might take longer to seek to the end of the skip than to just play the frames (ie: a skip of 5 frames for example). So for short skips I would just blank the screen and add a small blurb about what's happening (sort of like what happens when XBMC has to buffer). I also would like to add the ability to skip just video, just audio, or both which would allow editing swearing, etc.

The only downside I can see is that all of this would add a small performance hit since each time XBMC displays a frame I would need to check which frame it is and decide whether to actually display it or not, etc.

Before I begin this endeavor though I wanted to make sure that this would even make it into XBMC. If my code meets all XBMC coding standards, etc. would you guys be willing to include this feature? Or would you consider this not too useful for most other people and pass?

I know dteirney did the majority of the existing EDL coding, so if you're reading this, I'd love to hear your input on this idea too.

Thanks,
Harry
Reply
#2
fuck me, hell if i know.
Reply
#3
Harry Muscle Wrote:It seems I might have a few months of extra time on my hands since I will likely be between jobs soon. So I was thinking of helping out a bit with some XBMC coding.

One feature that I would love to add is frame based EDL. Currently the EDL (edit decision list) support is time based, and I'm pretty sure it does a good job for skipping commercials, etc. However, I'd like to be able to use EDL for editing scenes out of movies (gory scenes, or scenes with lots of swearing, etc. ... ie: make a movie child safe). The existing EDL just didn't seem to have fine enough resolution for specifying which parts to edit, etc. since after all it's time based and in one tenth of a second 2.4 frames fly by (or more). Usually I'd either cut off the last part of the previous scene or show the first part of the scene I wanna cut out. It just didn't look perfect enough for my taste Smile

My plan is to make use of a lot of the code found here (http://github.com/lbrandy/ffmpeg-fas/) which allows frame based interaction with ffmpeg and incorporate it into the existing EDL code.

In the end what I would like to achieve is the ability for XBMC to skip as little as one frame or several thousand frames, all with perfect frame accuracy.

For short skips it might take longer to seek to the end of the skip than to just play the frames (ie: a skip of 5 frames for example). So for short skips I would just blank the screen and add a small blurb about what's happening (sort of like what happens when XBMC has to buffer). I also would like to add the ability to skip just video, just audio, or both which would allow editing swearing, etc.

The only downside I can see is that all of this would add a small performance hit since each time XBMC displays a frame I would need to check which frame it is and decide whether to actually display it or not, etc.

Before I begin this endeavor though I wanted to make sure that this would even make it into XBMC. If my code meets all XBMC coding standards, etc. would you guys be willing to include this feature? Or would you consider this not too useful for most other people and pass?

I know dteirney did the majority of the existing EDL coding, so if you're reading this, I'd love to hear your input on this idea too.

Thanks,
Harry

Sounds interesting, but is there a serious practical application for this? or just wanting to do this for kicks? If you want a challenge, we can probably find half a dozen things that alot more people would benefit from.
Reply
#4
Personally, I think it would be a useful addition by, perhaps, opening up XBMC to a wider audience.
Reply
#5
I don't really see the need considering how easy it is to convert frame based edls to time based with a script. Hence I agree with Malard's comments.

Also correct me if I am wrong but all my edls seem to go to 2 decimal places and the videos are 25fps. Hence individual frames can be specified and each increases by 0.04seconds

I do agree xbmc needs some work on the edl department, though I'm sure this will come with the pvr development in Eden. Some things that come to mind:

- better visibility of edl existence (perhaps on the progress bar)
- display all valid cuts. At the moment if the edl contains an invalid cut then the whole edl is disregarded.
- comskip integration with the pvr section.

Perhaps your time may be better spent on one of these?
Reply
#6
spiff Wrote:fuck me, hell if i know.

I'll take that as a definite possible maybe Laugh

Harry
Reply
#7
Nick8888 Wrote:I don't really see the need considering how easy it is to convert frame based edls to time based with a script. Hence I agree with Malard's comments.

Also correct me if I am wrong but all my edls seem to go to 2 decimal places and the videos are 25fps. Hence individual frames can be specified and each increases by 0.04seconds

I do agree xbmc needs some work on the edl department, though I'm sure this will come with the pvr development in Eden. Some things that come to mind:

- better visibility of edl existence (perhaps on the progress bar)
- display all valid cuts. At the moment if the edl contains an invalid cut then the whole edl is disregarded.
- comskip integration with the pvr section.

Perhaps your time may be better spent on one of these?

I've tried the 2 decimal places thing but I still didn't get the results I was looking for. However that was several months ago at least, so the code might have improved since then. I'll take a look again, and maybe see if instead of going the frame route, it might make more sense to improve the time route to be more accurate. I also like the suggestions you mentioned.

Thanks for all the comments so far, keep 'em coming if you'd like.

Harry
Reply
#8
I'll throw in my desire for this. At the moment I trim out scenes from movies that are mostly kid friendly using avideo editor. A more robust EDL would be much more convenient.

Then again I haven't tried them in a year, I suppose I could take a swing at it again this weekend.
HTPC Rig:
Acer Revo 1600 /Tira2 IR rcvr
NAS: UNRAID
Reply
#9
keep in mind that with h.264 and reference frames. Accurate frame seeking means seeking to the nearest full frame reference then decoding to reach the desired. This can get tricky when using hardware decoders.
Reply
#10
technojunkie Wrote:I'll throw in my desire for this. At the moment I trim out scenes from movies that are mostly kid friendly using avideo editor. A more robust EDL would be much more convenient.

Then again I haven't tried them in a year, I suppose I could take a swing at it again this weekend.

I'm glad I'm not the only one doing this Smile

Harry
Reply
#11
davilla Wrote:keep in mind that with h.264 and reference frames. Accurate frame seeking means seeking to the nearest full frame reference then decoding to reach the desired. This can get tricky when using hardware decoders.

I'm contemplating a few ideas on how to achieve what I'm after. Like you mention it might get tricky with hardware decoders, etc. which is why I'm gonna see if I can intercept the frames just before they are displayed and then either display them or not.

I'm also gonna take a deeper look at the existing EDL code and see if maybe the time based EDL can be made more accurate to a point where "time -> frame" and "frame -> time" calculations can be done perfectly.

My last option is to just forget this idea altogether Smile ... but it's looking like there's a least a bit of interest in this. I know personally this and Dynamic Range Compression are the only two features that I would love XBMC to have, otherwise it's perfect for me. Dynamic Range Compression is sort of dependent on the Audio Engine being worked on now, so I figure I might put my efforts into better EDL.

I'm gonna start delving into the code further to get a better idea of how to approach this. I'll post my progress for review by other programmers, etc. and to make sure I'm still on track ...

Thanks,
Harry
Reply
#12
Not having an intimate knowledge of video compression methods this may be a dumb question... but I'll ask anyway.

Are reference frames tied to specific intervals or can they be of varying durations apart?

If they can be varying durations would it be possible/useful to create new reference frames at points where an EDL would have a skip? I realize it wouldn't be as simple as creating a text file for an EDL as a utility would be required to create the new reference frames, but it would alleviate the need to find the previous reference frame and render to the desired location.

Then again that is quite cumbersome, so probably not a good idea.
HTPC Rig:
Acer Revo 1600 /Tira2 IR rcvr
NAS: UNRAID
Reply
#13
All of this might prove a lot simpler than I originally envisioned. It seems dteirney has almost everything in place already for making frame accurate cuts. There was a rounding error in the edl code that led me to believe that the EDL code isn't accurate enough, but I think it might be. I'll submit a patch to fix the rounding error right away. There's still more than can be done, but this looks like it won't take long to super charge EDL.

I think the biggest improvement would be a new file type that allows a user to specify frames or time (both in the same file if the user wants) and also which feature to skip (video or audio or both). Sort of like the existing MPlayer EDL file format, but allowing frames in addition to seconds. Cause as it turns out the code that dteirney put in place is extremely accurate at making frame->time calculations. More accurate than for example AVIDemux (so trying to use AVIDemux to figure out where to make cuts and using AVIDemux time instead of frame location ends up being not accurate enough, XBMC does a more accurate job itself).

Thanks,
Harry
Reply
#14
Like I thought, all that seems to be needed is a better file format that allows us to specify frames and cuts (not commercial skips). Currently none of the support files types allow this (they either allow frames and comm skips or time and cuts). I changed the code quickly to allow frames and cuts and it seems like we can get frame accurate cuts.

Anyone know if it's too late to include this in the Dharma release. The diff is surprisingly small.

Thanks,
Harry
Reply
#15
No new features in Dharma, only bugfixes - feature freeze Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
If I code it (frame based EDL), will you guys include it?1