-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channels DVR EDL "Merge cuts" not creating chapters from merged segments in Plex #1223
Comments
hi. on the top of my head i think yin yang doesn't work with chapters. disable that and try to instead use the tools -> segments -> invert |
It's still not doing what I'm expecting or wanting it to do. Here is what I'm looking for:
I've only been able to achieve the following with Losslesscut:
|
I think mp4 chapters cannot have gaps, or am I wrong? |
Well, here is the EDL created from Channels DVR recorded as mpeg file.
I am trying to attempt to use Losslesscut as a replacement for MCEBuddy. The only difference (I believe) between the EDL generated from MCEBuddy and Channels DVR is 0 is used instead of 3, which I'm not sure matters? I tried manually changing the 3's to 0's with LLC and it made no difference. The video files created with HDHomeRun and Channels DVR are both mpg file extension. When I run the HDHomeRun file through MCEBuddy (which is using comskip), it creates an EDL and a mp4 file with chapters. Chapter 1 is the start of the video and ends after the first commercial break. Chapter 2 starts when the first commercial break ends, and so forth. So when the first commercial break starts, you can select chapter 2 and skip past the first commercial break. Does this make sense? Obviously I am comparing a difference software to yours, but I just want to make sure that I am not missing a way to do this. |
is it possible to share an mp4 or mkv file that has these kinds of chapters with (desired) gaps in it? |
Here is an example mp4 and EDL generated by MCEBuddy. https://drive.google.com/file/d/1b3Jn6hlPs_-VZfcFfwrHWxCzktjcq3-2/view?usp=sharing Load this into Plex and view how the chapters are setup with the commercial breaks. |
thanks. i ran ffprobe: ffprobe file.mp4 -show_chapters -of json {
"chapters": [
{
"id": 0,
"time_base": "1/1000",
"start": 0,
"start_time": "0.000000",
"end": 34020,
"end_time": "34.020000",
"tags": {
"title": ""
}
},
{
"id": 1,
"time_base": "1/1000",
"start": 34020,
"start_time": "34.020000",
"end": 408520,
"end_time": "408.520000",
"tags": {
"title": "Chapter 1"
}
},
{
"id": 2,
"time_base": "1/1000",
"start": 408520,
"start_time": "408.520000",
"end": 937070,
"end_time": "937.070000",
"tags": {
"title": "Chapter 2"
}
},
{
"id": 3,
"time_base": "1/1000",
"start": 937070,
"start_time": "937.070000",
"end": 1386420,
"end_time": "1386.420000",
"tags": {
"title": "Chapter 3"
}
},
{
"id": 4,
"time_base": "1/1000",
"start": 1386420,
"start_time": "1386.420000",
"end": 1858970,
"end_time": "1858.970000",
"tags": {
"title": "Chapter 4"
}
},
{
"id": 5,
"time_base": "1/1000",
"start": 1858970,
"start_time": "1858.970000",
"end": 1859930,
"end_time": "1859.930000",
"tags": {
"title": "Chapter 5"
}
}
]
} as far as I can see, your file contains no gaps, as every chapter is a continuation of the previous chapter (and commercials are also chapters). I don't know if there is something wrong with ffprobe, or am I misunderstanding something. Does Plex not show the commercials as chapters? If so, I wonder how it can distinguish between commercial chapters and non-commercial chapters |
Here is what Plex shows as the chapters for that file. It actually shows two "Chapter 1". The first Chapter 1 consists of the first 30 seconds that is recorded ahead of the recording time (set by HDHomeRun). The second Chapter 1 is the start of the program. That Chapter 1 then ends at the end of the first commercial break. So then Chapter 2 starts after the first commercial break ends and the program returns. There are 6 total chapters. Individual commercial breaks do not get their own chapters. Obviously I could manually adjust segments in LLC to accomplish this, but I am looking to automate this later with the CLI and a shell script. |
Ok, so it seems like plex works the same as llc if I understand correctly. As far as I can see from your plex screenshot, it looks identical to what my ffprobe command above returned (and what losslesscut shows). There are also 6 chapters. If I export your file with "Chapters only", and then open the exported file again in losslesscut, it looks identical. So I'm not sure exactly what you need |
Right, this file was recorded with HDHomeRun and EDL created with MCEBuddy. This setup when run through LLC appears to work as expected. Now try this file recorded with Channels DVR with EDL creation option enabled (zip contains original recording, EDL, and exported LLC file with inverted timeline segments, "Chapters Only", MKV ): LLC shows 5 segments will be created: However, when played in Plex, 10 chapters are shown which includes a chapter for each commercial break. |
Ok, now I see. The reason is that losslesscut auto-creates chapters for the gaps. If this is not done, ffmpeg (which losslesscut uses), will create incorrect chapters. I just tested with your file (by disabling autocreation of chapters for gaps in the code), and the first chapter will start from 0 and the second chapter is missing. So that's the reason. If you manually expand the segments to fill the gaps, it should work. We could introduce a function for auto-expanding all segments to fill the gaps until the next segment |
How would I manually expand the segments to fill the gaps? |
in the segment list, double click on the last segment. then single click on the segment before. then press o |
This appears to work. If you setup a function for auto-expanding, would that be accessible via the CLI as well? Overall, if I want to script this. Would I use the CLI or the FFMPEG command? The "Last ffmpeg commands" don't appear to include the EDL filepath, so I'm assuming that won't work. Some initial searching shows that maybe you can include all the cuts in a single command or possible multiple. Or can I just use the CLI to accomplish this easier? The CLI section on the readme just says "arguments", do you have more documentation on what those arguments are and how to use the CLI? |
you can't really automate/script much with losslesscut, as it was never designed for that. There is a feature request to add more automation in losslesscut, but i'm not sure if I want to go that way: #980 I think I would just use the ffmpeg CLI if I were you. As for losslesscut CLI docs in readme, there exists just one available cli argument, list files to open, and one option ( |
Thank you! |
Describe the bug
I am recording shows with Channels DVR and have it generating an EDL file. LossLessCut's exported file when played in Plex does not contain chapter markers when using the LossLessCut "merge cuts" and "create chapters from merged segments".
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Chapters markers for exported video file should be present in Plex.
Other testing
Testing a video file recorded from HDHomeRun DVR and MCEBuddy generated EDL file run through the same LossLessCut settings results in Plex chapter markers as expected. The MCEBuddy EDL file uses type "0"(cut) and Channels DVR uses type "3"(commercial break). I did try changing the Channels DVR EDL file to "0" but that did not make a difference.
Desktop (please complete the following information):
Example files:
I can provide the before and after export video file and EDL file if needed.
Problem report:
The text was updated successfully, but these errors were encountered: