Harry Muscle Wrote:I'm glad we got your attention dteirney ... thanks for all the feedback.
My goal in designing the new file format was to have the most flexibility possible, which is why I wanted to be able to specify the start and end times in pretty much any format possible. Currently I use AVIDemux to figure out the cut points and it provides me with either HH:MM:SS.MMM or frames numbers, both of which needed a manual conversion to be useful in any of the existing supported files (also my frame calculations were never perfect since AVIDemux and XBMC detect ever so slightly different frame rates for the same video). I created the new format with the idea that no matter which video editor the user might be using they will be able to simply copy and paste the info from the video editor into the new EDL file without having to break out the calculator and convert figures. Then I just simply switched from using 0, 1, 2, 3 to something more descriptive.
As for the option of doing only a video blank ... well I'm not 100% sure what the use would be, but again, was going for maximum flexibilty and I figure someone could find a use. The only one I can think of is if there's dialogue in a movie that's important to the story, but it's happening in a child inappropriate place with inappropriate "scenery" in the background.
I'm guessing though that you wanna keep things simpler to avoid confusion, etc. The way I figure, we have a couple of options:
1. Leave things as currently proposed with a new .xdl file format
2. Create a new file with the extension .edlf that's identical to the existing .edl file format but instead of seconds uses frame numbers
3. Create a new file with the extension .edlf that's a combination of the two above ideas. It allows only frames for start and end times, but allows either 0, 1, 2, 3 or a, v, s, c for the action making it somewhat more user friendly to create and not mess up by using the wrong number (or the user can stick with the numbers if they so prefer). Also this would allow the f action to specify the frame rate for the movie in case XBMC detects it wrong. We could forget the av action and simply make v specify both audio and video blank so all actions would be one character to keep more in line with the existing EDL file format. Personally this is as simplified as I would prefer to go since it still allows for a decent amount of flexibility.
4. Don't create a new file extension but instead incorporate the new format ideas into the existing .edl file. So if the file has a 0, 1, 2, 3 action specified treat the start and end fields as the old EDL file format, but if it has one of the new letter actions specified allow full flexibility for start and end times, etc. This would be a good solution for instances where a user might already have existing EDL files, but wants to edit or update then using the new format. The code would allow both types in the same file so the user can simply append to the existing EDL file using the new format.
There's probably another option or two that's possible and if anyone can think of one feel free to propose it. Also anyone who's reading this feel free to comment on which format you would prefer, etc.
Dteirney let me know which one you like, since I think it'll be your call anyway since I'm guessing you'll be the one to approve the patch
Thanks,
Harry
Harry, thanks for your concise analysis of the problems as you see them. Below is my take on what would help you achieve what you need and avoids XBMC EDL support moving too far away from existing "public" EDL file formats (I don't think the Open Source community benefits greatly from another file format and we are already taking some liberties with the .edl file format that MPlayer first introduced).
1) Expand the existing .edl processing logic to support the time code being in HH:MM:SS.sss format. This is easy to do by checking for ":" within the read in string prior to the whitespace and then the code. I think allowing the frame markers to be used is problematic due to the conversion that is necessary to time. Getting the fps from the file can be dubious as you have seen, and extending the format to allow the frame rate to be specified feels like it is pushing the file format too far away from the simple time code and action approach. If you are using AVIDemux and can easily get the time in a formatted way, that will be much more robust.
2) Put that time parsing from "string" code somewhere in an XBMC utility - there might some code that does this already. Perhaps extend / improve StringUtils::TimeStringToSeconds
3) Leave the existing 0, 1, 2, 3 codes for the moment rather than introducing "English only" characters. I agree they are not the most intuitive things to use, but introducing a character is massaging the .edl file format perhaps too far away from the original model.
Future:
4) Implement the Audio Muting / Silence functionality - no idea how, you'll have to get some input from the other devs.
5) Figure out how to integrate with the XBMC Video Bookmarks functionality for Scene Markers that are loaded from an EDL source.
6) Enhance the Commercial Break related EDL sources to automatically include Scene Markers at the end of each commercial break.
Let me know what you think. I feel like I'm acting in a bit of a custodial role, making sure people can do what they need without straying too far from the original EDL intentions and reasonably well known file format.