essandess / etv-comskip

Commercial Marking and Skipping for EyeTV and iTunes Exports
GNU General Public License v2.0
55 stars 7 forks source link

Running etv-comskip on existing files #71

Closed benfry closed 6 years ago

benfry commented 6 years ago

I must be missing something, but I can't figure out how to run the scripts on already existing recordings. Or is that not possible?

Thanks for your work on this; it looks really helpful.

essandess commented 6 years ago

Example workflow:

/Library/Application\ Support/ETVComskip/bin/MarkCommercials --help

/Library/Application\ Support/ETVComskip/bin/MarkCommercials

546233460 = [The Opposition With Jordan Klepper - Ross Douthat], [858], [Comedy Central HDTV (East)]
544931880 = [Trust - La Dolce Vita], [830], [FX HDTV (East)]
546141480 = [Trust - Silenzio], [830], [FX HDTV (East)]
545536680 = [Trust - That's All Folks!], [830], [FX HDTV (East)]
/Library/Application\ Support/ETVComskip/bin/MarkCommercials --force 545536680
benfry commented 6 years ago

Got it, thanks for the reply. I'd tried that but got Python errors:

Error loading Python lib '/var/folders/x9/wbv5rwcn54x11gdj304kqpj40000gn/T/_MEIyRij4J/Python': dlopen(/var/folders/x9/wbv5rwcn54x11gdj304kqpj40000gn/T/_MEIyRij4J/Python, 10): Symbol not found: _getentropy
  Referenced from: /var/folders/x9/wbv5rwcn54x11gdj304kqpj40000gn/T/_MEIyRij4J/Python (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib
 in /var/folders/x9/wbv5rwcn54x11gdj304kqpj40000gn/T/_MEIyRij4J/Python

…so I assumed that I was headed in the wrong direction. But now that I know that's the correct route, I'll figure out what's wrong on my end.

Thanks again.

essandess commented 6 years ago

That's weird. All the libraries should be dynamically linked. What do you see with this command?

otool -L /Library/Application\ Support/ETVComskip/bin/MarkCommercials
/Library/Application Support/ETVComskip/bin/MarkCommercials:
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
benfry commented 6 years ago

Looks the same?

/Library/Application Support/ETVComskip/bin/MarkCommercials:
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

From brief searching earlier it seems to be issues with various versions of Python and how they interact with macOS versions. The machine in question is running 10.11, I was gonna try it on a 10.13 machine and see how it goes.

I have Homebrew on that machine, was also considering brew installing Python and altering the .py files to use that version instead of Apple's.

benfry commented 6 years ago

Now noticing the which was built for Mac OS X 10.13 part of the original error message, which makes me think it's an issue with the version of the OS X SDK used to build the binaries.

essandess commented 6 years ago

The binary /Library/Application Support/ETVComskip/bin/MarkCommercials should be a standalone created by pyinstaller, along with the dynamic libraries that it's linked to.

I don't see how Homebrew or Macports python installs should make a difference after pyinstaller creates the binary.

Looks like some dependency issue on that box.

Look at which python and play around with getting the Hombrew python out of your PATH. Try using /usr/bin/python.

You can see the python module dependencies in the Makefile. If you have all those installed, this will work too:

python /Library/Application\ Support/ETVComskip/scripts/MarkCommercials.py --help
essandess commented 6 years ago

makes me think it's an issue with the version of the OS X SDK used to build the binaries

Are you matching the etv-comskip release with the OS on the box? Cross-macOS compatibility isn't guaranteed by pyinstaller.

benfry commented 6 years ago

Yep, that was the problem… I missed the fact that the downloads after 3.5.3 started specifying Sierra and High Sierra. Ugh, sorry for the trouble.