Is Comskip meant to work in live tv? (1 Viewer)

erosco

MP Donator
  • Premium Supporter
  • June 25, 2007
    122
    20
    Home Country
    According to http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/0_What's_New/1.9.x/Live_Commercial_Skip MP is supposed to pick up and monitor an .edl file creating during recording and make it available during playback.

    Whilst I have 100% success playing back recordings and seeing the inserted chapter marks AFTER MP has finished the recording.. However If I start watching the recording at any time during the recording no chapter marks are visible - even when I start playback at the last few seconds of the recording... I have confirmed that the .edl file is being created in real-time and updated with chapter marks in real-time.

    Is this meant to work or has the code been pulled? - I have tried an RTSP client, UNC paths and local paths all without any success.

    Many Thanks
    erosco
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi

    I have confirmed that the .edl file is being created in real-time and updated with chapter marks in real-time.
    In other words, you followed the instructions in the linked wiki page to update the Comskip "live_tv" and "output_edl" config, and you configured the TV Server ComSkip launcher plugin to launch ComSkip at the start of the recording...

    ...right? (Please confirm.)

    Is this meant to work or has the code been pulled?
    It definitely hasn't been pulled.

    I don't think Comskip marking works with live TV (though I'm not 100%).
    Assuming Comskip is enabled, configured correctly and has had enough time to do its processing, it should work with complete recordings... and my understanding is that it should also work with in-progress recordings.

    Important
    For it to work with in-progress recordings, you must choose to watch the recording from the TV plugin's recording list. Viewing the same channel via live TV while a recording is in progress is not the same thing and will not work (assuming I'm right that Comskip marking doesn't work with live TV).
     

    erosco

    MP Donator
  • Premium Supporter
  • June 25, 2007
    122
    20
    Home Country
    Hi - Yes, I followed all the steps live_tv and output_edl. Comskip is started at the start of the recording. I have my recordings directory shared so I can monitor the edl over time.. I see the commercial marks in seconds being added to the file whilst the program is being aired (comskip in live mode keeps up with the recording).

    I am also starting the recording from the 'mytv' 'recordings' directory - I assume this is what you meant.

    My only difference is that I'm not using comskip_launcher in the tv server due to a bug with it! (quotes in the parameters fails to launch a .bat file - which is needed for per channel .ini file selection). I use opensource "File Watcher Utilities" that launch comskip as soon as the .ts file is created.. - Could this be my problem? Everything still happens at the right times.. just not started by comskip_launcher.


    thanks
    erosco
     

    erosco

    MP Donator
  • Premium Supporter
  • June 25, 2007
    122
    20
    Home Country
    Thanks

    Will do - sorry - never used the watchdog; might take me a bit to work out how :)
    --- Post updated ---
    As mediaportal doesn't abort I have attached the logs after I have started the recording, waited 10mins for an ad break; confirmed an .edl - attached; started to view the program via the recordings menu in mytv - seen no ad breaks in the osd menu (no red lines).

    Seems I can't upload the .edl - not allowed. changed file to .edl.txt

    Thanks
    erosco

    --- Post updated ---
    Ok - Seems I have an apology to make. I think I managed to get it to sort of work.

    I killed off comskip half way through the show and then watched the recording (whilst still recording in mediaportal) and the chapter marks that had been identified in comskip appeared.

    I am wondering if comskip now had an 'exclusive write' flag or something on the file - seems this might be a(nother) comskip issue and not mediaportal..

    I am very sorry for wasting your time.. now I need to work out why.

    (EDIT) - Maybe if comskip is started by the plugin - the files are accessible by TVService as it's the parent process - ?!!? - this might be the issue!

    MM1352000 - Many thanks for your help.

    Best Regards
    erosco
     

    Attachments

    • Food Network - Farmhouse Rules - 2016-07-09.edl.txt
      16 bytes

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello again

    Sorry for the delayed response - I got waylaid by other priorities.

    Ok - Seems I have an apology to make.
    ...
    I am very sorry for wasting your time.
    No need to apologise to me. :)

    As mediaportal doesn't abort I have attached the logs...
    Yeah, that process should be fine. (y)
    The Watchdog just collects log files when MP is closed. That closing can be a crash or a standard "user-initiated" close.

    The MediaPortal log file you provided shows:
    [2016-07-09 10:23:03,005] [Log ] [MPMain ] [DEBUG] - g_Player.LoadChapters() - Automatic ComSkip mode is on.
    [2016-07-09 10:23:03,006] [Log ] [MPMain ] [WARN ] - g_Player.LoadChapters() - Invalid chapter file

    So, the chapter file is seen but not loaded, and that explains why you don't see the markers.

    I think the relevant code is here:
    https://github.com/MediaPortal/Medi...diaportal/Core/Player/g_player.cs#L3438-L3443
    Code:
      int fps;
      if (String.IsNullOrEmpty(line) || !int.TryParse(line.Substring(line.LastIndexOf(' ') + 1), out fps))
      {
      Log.Warn("g_Player.LoadChapters() - Invalid chapter file");
      return false;
      }

    In other words, it looks like MP is not picking up the Comskip "chapters" because it fails to read the frames-per-second detail from the end of the first line of the Comskip file.

    Looking at the contents of the EDL file, I can see that the end of the line has a tab followed by a zero. MP is expecting a space instead of a tab... and I suspect a real FPS value is needed too.

    Perhaps there are relevant Comskip options - relating to file format and/or frames per second - which you're aware of?
    (I've never used Comskip, so this is where my ability to help you becomes limited at best.)

    I am wondering if comskip now had an 'exclusive write' flag or something on the file - seems this might be a(nother) comskip issue and not mediaportal..

    (EDIT) - Maybe if comskip is started by the plugin - the files are accessible by TVService as it's the parent process - ?!!? - this might be the issue!
    An "exclusive write flag" situation is theoretically plausible, and your explanation might be plausible too. However from the analysis above, to me it looks more like the format of the EDL file is not what MP expects it to be. Nevertheless I could easily be wrong. Might be worth trying the standard Comskip launcher plugin to see if it makes any difference.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Ahhhh, it seems our documentation is misleading. :oops:

    According to our issue tracker, the feature has not yet been merged.
    https://issues.team-mediaportal.com/browse/MP1-4210

    The comments there give some idea of what happened.
    From a team/internal perspective, as far as I'm aware this has completely fallen off the radar...
     

    erosco

    MP Donator
  • Premium Supporter
  • June 25, 2007
    122
    20
    Home Country
    Thanks - I did see that thread; however as it was in the release notes I figured it must have gone ahead.. I guess I should just give up :-(

    Shame, as it'd be a great feature to have.. I believe it's in kodi; although I love MP.
     

    erosco

    MP Donator
  • Premium Supporter
  • June 25, 2007
    122
    20
    Home Country
    Just wanted to add a footnote that I worked out how to use git and cherry pick the required changes then build 1.15.0 with comskip support. Working fine - thanks

    I don't know if the team will reconsider this code sometime in the future but I hope so as I can't really see any side effects.

    Thanks again for your help mm1352000.

    Cheers
     

    Users who are viewing this thread

    Top Bottom