Edl file location

This looks promising: ComChap
This gives you the option to cut or just add chapters. I only tested on a .mp4 file. Later I will try with mpeg2 files from Channels DVR.

Also, I had to apply fix from this Issue #24 to get it to work on MacOS.

I used command: comchap --keep-edl --keep-meta input.mp4 output.mp4

That way I keep some of the files for analysis. Also, if you have input.edl file, comskip won't try to process the input file it will just chapter mark the file.

1 Like

On the Apple TV, you have to use the remote and Swipe down to show the top bar, then pick the Chapter. There's no button sequence to do it.

On the Plex Web App, I think it's Ctrl-Right Arrow or Alt-Right Arrow..one of those.

Does ChannelsDVR internally store the EDL file to allow for skipping commercials or does it chapter mark the MPEG files?

Channels DVR creates a separate edl file that is saved in the same folder as the video file.

Yes. When you enable channels to save the edl file. But there is a setting on the server, Detect Commercials, to allow the server to run comskip. But if you don't perform the EDL hack then the EDL file is not saved. However, channels DVR still allows a user to skip commercials even though the EDL file is not present.

So, I am asking does Channels DVR hold that EDL file internally to allow for clients to skip commercials. This might make my efforts obsolete since the script I found, ComChap, is modifying the DVR recording.

But the script still might be valuable since watching recordings outside of channels Clients would allow commercial skipping.

Yes, the data from the EDL is saved in Channels's database. So it does not need the EDL file itself, just the results from the comskip pass.

The EDL file is technically still in the Logs directory, and if you enable the EDL hack it will create edl files for all old recordings as well.

If you want to convert a DVR mpg to mkv and add chapter markers, you can do it easily using the video.ffmeta file that lives alongside video.edl in the Logs directory, as follows:

ffmpeg -i input.mpg -i video.ffmeta -c copy output.mkv

This will create a output.mkv which has chapter markers where the commercials occur.

So, I guess the MPEG format does not support chapter marking and thus the file would have to be converted to MKV format? I can't just update the MPEG file? Is that ffmpeg transcoding process and thus CPU intensive or just a copy so I would effectively double storage space since the Channels Database know nothing about the new MKV file.

What do you do with the original MPEG file? Delete it?

Correct. The mpegts format doesn't support commercial markers.

It is not transcoding, just copying the existing audio/video into a new container. Fast and low cpu usage.

You could replace the existing .mpg file with an .mkv and channels will still work.

Unless you changed it since I started doing this a long time ago you still have to change the extension back to .mpg, even though it's a .mkv.

Correct it must still be named .mpg

Yes, once it's moved into the folder that Sonarr reads to pick it up and sort it into Plex, I delete the original recording from Channels.

How is this executed on a Windows machine? Who decided that the edl file wouldn't exist right beside the recording by default like virtually every other piece of software out there?

If that's not working you could try this in powershell:
Invoke-WebRequest -Method PUT http://127.0.0.0.1:8089/dvr/hacks/edl

As for your second question most people don't use them, so why have the extra files?

I was under the impression the extra files were already being created, so why not put them right beside the recordings by default?

I have to agree they are creating the file anyway so it should be created where the recording is. Everytime I setup a new Install I have to remember to do the hacks.

This is the response from powershell

PS C:\Users\username> Invoke-WebRequest -Method PUT http://127.0.0.0.1:8089/dvr/hacks/edl
The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, v
erify that the path is correct and try again.
At line:1 char:18

  • Invoke-WebRequest <<<< -Method PUT http://127.0.0.0.1:8089/dvr/hacks/edl
    • CategoryInfo : ObjectNotFound: (Invoke-WebRequest:String) [], CommandNot
      FoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Maybe it would just be easier to have a settings section on comskip so that normal folks could make standard decisions.

Sorry, not much more help since I don't have a Windows computer, but I know in PowerShell Core (or maybe PowerShell 6... I forget) that's stripped out. What Windows box do you have? Hopefully @tmm1 will show up shortly and he might be able to help.

As for the setting, I'm sure if it's requested enough and the use is there they could make it easier. I think they went this route since it was also the same thing that was done with the json's for people who wanted that for MCEBuddy way back in the day.