BrettSheleski / comchap

Commercial detection script to add chapters into video file
MIT License
136 stars 26 forks source link

Using ComCut to find .mpg's in a directory and use the existing EDL to create new file, move to another directory #42

Open omn1slash opened 4 years ago

omn1slash commented 4 years ago

Hello, so in a nut shell, I use Channels-DVR to record shows. Channels produces the file (they are .mpgs') and then dumps it in its DVR folder. With it, it also dumps a .edl folder and the program reads it to skip commercials. Plex does not read .edl's... so what I'd like to have done is use comcut to find these .mpg's that are in the DVR directory (and sub directories for shows), run the comcut process with the .edl (keeping the .edl when done) and then moving the result to another directory for plex to see. I can get this to work via the command line but I can't get it to retain the original file name. I'm using comcut /home/user/dvr/.mpg .mpg, which just renames it to a *.mpg (sorry my Linux skills are mediocre). Is there a way to use comcut to do this, or know of a script that would automatically do this?

daphatty commented 4 years ago

Is comcut actually creating usable files for you? Whenever I try to remove commercials from my ChannelsDVR recorded shows using the accompanying .edl file, the resulting file has no audio at all.

omn1slash commented 4 years ago

Yeah, they were creating just fine. The problem was I couldn't get the program to find a way to find anything *.mpg in the channels DVR folder, so this didn't work out for me. I ended up installing a Windows VM on my Linux box and using an automated MCEBuddy process.

BrettSheleski commented 4 years ago

@omn1slash - You'd have to write a script to handle what you're looking for. Off the top of my head you should probably be able to use the find command with the -exec parameter.

Something like the following:

find /path/to/source/dir -name "*.mpg" -exec comcut {} /path/to/destination/dir/`basename {}` \;
omn1slash commented 4 years ago

I'll give that a shot - thanks! I'm not a pro at Linux or devising scripts, but this should be helpful. I really do like comcut and would prefer to use it.