EDL (and ComSkip) integration - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: EDL (and ComSkip) integration (/showthread.php?tid=27798) |
EDL (and ComSkip) integration - DrDDT - 2007-08-07 Hi! I'm trying implement EDL for XBMC (see http://forum.xbmc.org/showthread.php?tid=21890&page=4) I'm very new to XBMC development so please be patient with me. I'm trying to add the option 'path_to_movie\movie.edl' to the mplayer options, if the file 'path_to_movie\movie.edl' exists. As suggested, I'll have to do the following: - Check if the filename give to mplayer is actually a movie and not a stream/playlist: // Check if file can have EDL if (item.IsInternetStream()) .... if (item.IsPlayList()) .... if (!item.IsVideo()) .... - If the file can have an edl, generate the possible filename: CStdString strEdlFileName; ReplaceExtension(strFile, "edl", strEdlFileName); - Check if 'path_to_movie\movie.edl' exists -[ How do I do this? ]- - Add the option to the mplayer conf Someting like: options.SetEDLFile(strFile); if (m_stredlfile.length() > 0) { m_vecOptions.push_back("-edl=" + m_stredlfile ); } Is this going to work? How do I check if the EDL file exists? - spiff - 2007-08-07 CFile::Exists and yes it will work - DrDDT - 2007-08-07 spiff Wrote:CFile::Exists I gave it a shot, it compiles, but I cannot test it yet: Code: Index: mplayer.cpp - spiff - 2007-08-07 i havent tested it either but your diff is unacceptable for inclusion indent is 2 space using spaces, please comply. and i'd prefer if you didnt spam your name all over the file. (do not mistake this for hostility) - DrDDT - 2007-08-07 spiff Wrote:i havent tested it either but your diff is unacceptable for inclusion This patch wasn't meant for inclusion, sorry I didn't make this clear. The 'name spamming' is only for me to find my own changes. I haven't coded a single line for over ten years, so I'm a bit rusty. I'll test it first, then I'll find the correct formatting and submit rules for patches. - spiff - 2007-08-07 cool - DrDDT - 2007-08-08 I've got it working now (after a few bugfixes). I'll try to add a on/off switch in the settings now. - spiff - 2007-08-08 why would we want that? if you dont want your edls, rename them / delete them. - DrDDT - 2007-08-08 spiff Wrote:why would we want that? if you dont want your edls, rename them / delete them. Doesn't the same goes for subtitles? If I have a recorded tv show, and have comskip generate an edl for removing commercials, I might want to disable the EDL because too much of the show was disabled. Maybe later then. - spiff - 2007-08-08 oh sorry you mean an osd option. a conditional osd option (only shown if we have an edl) is all fine. i thought you meant a "real" setting in settings->video. - DrDDT - 2007-08-09 The following code uses the edl option in mplayer when a 'moviename.edl' file is found. Observations: - The 'mute' function doesn't seem to work - The 'skip' function works fine. You can still use the forward/back functions to see the skipped parts. Here is the patch, hopefully using the correct format this time: Code: Index: mplayer.cpp - DrDDT - 2007-08-09 Would it be doable to show the EDL 'skip' parts when showing the movie play progress bar? Maybe use a differen color, so if one shows the progress bar, you know where parts are going to be skipped? - DrDDT - 2007-08-10 DrDDT Wrote:Would it be doable to show the EDL 'skip' parts when showing the movie play progress bar? Example of the progress bar I was thinking of. Maybe also the miniature one in the top right of the screen, if it uses the same code. - spiff - 2007-08-10 it does use the same code. however there's no such support as of yet. patch welcome, i doubt any of the devs care (i for one do not). it would be rather tricky, as the progress bar is just generated based on info labels i'll apply your submitted patch tonite unless elupus objects for some reason (cant see why) - DrDDT - 2007-08-12 spiff Wrote:it does use the same code. however there's no such support as of yet. Great! I see the patch is in. Shouldn't we add this to the Wiki now? Somewhere in this page? http://xboxmediacenter.com/wiki/index.php?title=Videos |