cTiVo icon indicating copy to clipboard operation
cTiVo copied to clipboard

edl output

Open techpro2004 opened this issue 2 years ago • 12 comments

It would be great if ctivo would output a edl file to the recordings directory. Nothing fancy needed just plop it in there. Thanks.

techpro2004 avatar Jun 28 '22 12:06 techpro2004

And what would you then do with it?

mackworth avatar Jun 28 '22 15:06 mackworth

I use handbrakecli for encoding which does not support commercial cutting. I also have a windows 11 arm vm setup in utm with mcebuddy. mcebuddy checks for existing edl files before running comskip. so I would use that to cut commercials. It is faster to run comskip natively then in a vm

techpro2004 avatar Jun 28 '22 15:06 techpro2004

So, if you'd like a challenge...a different path would be to create a version of ffmpeg_edl_ac3.sh batch file to call handbrake instead of ffmpeg. That would avoid needing to have a second pass entirely, and would also be useful for anybody who wants to run handbrake but w/ cutting as no VM would be required.

At a high-level, that shell script calls ffmpeg to first get the length of the file, then iterates through the EDL list, encoding each useful piece, then it calls it one last time to put all the pieces together. I'd leave the first/last parts as ffmpeg, as there's no encoding going on. Handbrake has its start-at/stop-at commands, so it should be feasible. The relevant calls are at line 273 (for no EDL) and 332 (w/ EDL); you could add a parameter to launch_and_monitor_ffmpeg to call handbrake instead (or create a parallel one). The harder part would be to modify the $ss $to and $encode_opts creation/processing to match handbrake's needs. Happy to consult if that's something you'd care to build.

If not, you could simply do a shell script that copies the EDL wherever you like it and then passes the other parameters through to HandbrakeCLI. IIRC, you'd need to echo the HB output to ensure the cTiVo can "see" it.

mackworth avatar Jun 28 '22 16:06 mackworth

My mac scripting skills are non-existant. I am good with .bat files though. Could you put together a short script to copy the edl and pass the arguments to handbrakecli. Thanks.

techpro2004 avatar Jun 28 '22 17:06 techpro2004

Hello? Are you there?

techpro2004 avatar Jun 29 '22 01:06 techpro2004

Um, yes. but that will take a while to do.

mackworth avatar Jun 29 '22 01:06 mackworth

Sure Thanks. Take your time and get back to me. Keep in mind, I would be happy to make a small donation to ctivo once my system is fully up and running. (Things are a little tight here)

techpro2004 avatar Jun 29 '22 01:06 techpro2004

No donations required, or even accepted! This is my hobby, so I prefer not to get money involved.

mackworth avatar Jun 29 '22 01:06 mackworth

Thanks. I am happy to help any way I can, but I don't know much about apple products.

techpro2004 avatar Jun 29 '22 02:06 techpro2004

On that note, I did a lot of googleing and even more trial and error and I came up with this. handbrakecli_edl_copy.zip

techpro2004 avatar Jun 29 '22 18:06 techpro2004

Just tweaked the script for increased reliability and now the percent counter works handbrakecli_edl_copy.zip .

techpro2004 avatar Jul 04 '22 21:07 techpro2004

Mcebuddy just added support for ctivo chapter markers so do not use the above script.

techpro2004 avatar Jul 08 '22 19:07 techpro2004

not sure why I left this open, I think you decided this is unnecessary, correct?

mackworth avatar Mar 11 '23 15:03 mackworth