mackworth / cTiVo

TiVo Show Downloads for MacOS
220 stars 36 forks source link

edl output #493

Closed techpro2004 closed 1 year ago

techpro2004 commented 2 years ago

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

mackworth commented 2 years ago

And what would you then do with it?

techpro2004 commented 2 years ago

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

mackworth commented 2 years ago

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.

techpro2004 commented 2 years ago

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 commented 2 years ago

Hello? Are you there?

mackworth commented 2 years ago

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

techpro2004 commented 2 years ago

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)

mackworth commented 2 years ago

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

techpro2004 commented 2 years ago

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

techpro2004 commented 2 years ago

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 commented 2 years ago

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

techpro2004 commented 2 years ago

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

mackworth commented 1 year ago

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