Skip to content
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

Support for Comskip/Mplayer .edl files? #609

Closed
markmonroy opened this issue Jan 23, 2021 · 9 comments
Closed

Support for Comskip/Mplayer .edl files? #609

markmonroy opened this issue Jan 23, 2021 · 9 comments

Comments

@markmonroy
Copy link

Happy to have discovered this terrific app. I record shows using Channels DVR which produces simple sidecar .edl files marking the in/out times of commercial breaks. Format is detailed here. I'd like to put in a feature request for Lossless Cut to interpret these. Thanks!

@mifi
Copy link
Owner

mifi commented Jan 23, 2021

shoudln't be too hard. for now if you can convert the edl to csv you can already import them

@mifi
Copy link
Owner

mifi commented Jan 23, 2021

I didn't understand the edl_skip_field=3 stuff though

@markmonroy
Copy link
Author

markmonroy commented Jan 23, 2021

Thanks! I've been able to convert them manually so far; the csv format seems to be built around ins/outs of what should be kept, whereas these edls have ins/outs of what to discard, so I have to invert everything along with changing the format.

The edl_skip_field=3 in comskip.ini is for the program that creates the .edl files (comskip), so I don't think you'd have to worry about that. The files it spits out are very simple. Here's an example:

0	72.06	3
791.31	1017.39	3
1392.28	1633.29	3
2024.31	2330.35	3
2719.17	3050.4	3
3244.33	3489.37	3

where the format is:

[start time][TAB][end time][TAB][action]

The actions are:

0 - Cut
1 - Mute
2 - Scene Marker (if start and end times are specified, the end time is used)
3 - Commercial Break

As far as I can tell Channels DVR only ever uses 3, Commercial Break.

@mifi
Copy link
Owner

mifi commented Jan 24, 2021

Ok thanks for the input. FYI I think you can invert cutting by using the YinYang symbol ☯️ in the UI so you don't have to invert cut times.

Btw the comskip format you explained uses start/end time, while in the document you linked that is the mplayer format "1.1 MPlayer EDL".

"1.3 Comskip" uses frames instead:

FILE PROCESSING COMPLETE
------------------------
[start frame] [end frame]

I'm a little confused here. Is mplayer/comskip the same format? how do we know if there are frames or times in the file?

@markmonroy
Copy link
Author

I think by default comskip produces a text file with that format, but also has the option to create an EDL in Mplayer format. In Channels DVR's implementation, they only give you the option to save the EDL, so that's what I have at my disposal.

Thanks for the tip on inverting. Knowing that, I think I have enough regex skills to make a little script to convert.

@markmonroy
Copy link
Author

For posterity:

#!/bin/sh
sed 's/3$//g; s/\t/,/g' "$1" > "${1%.edl}.csv" 

@mifi mifi closed this as completed in d5e0378 Feb 21, 2021
@mifi
Copy link
Owner

mifi commented Feb 21, 2021

This is now implemented and will be included in the next version
(only basic support for mplayer type=0)

@markmonroy
Copy link
Author

Thanks for adding this! Unfortunately Channels DVR only uses type 3 (commercial break) rather than type 0. Would it be difficult to allow it to parse type 3? If I go in and manually change the 3 to 0 it works fine.

0	72.06	3
791.31	1017.39	3
1392.28	1633.29	3
2024.31	2330.35	3
2719.17	3050.4	3
3244.33	3489.37	3

mifi added a commit that referenced this issue Aug 24, 2021
@mifi
Copy link
Owner

mifi commented Aug 24, 2021

have implemented support for all 3 types. will be out in the next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants