mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.53k stars 200 forks source link

OSError: [Errno 13] Permission denied... mac. #177

Closed Websteria closed 10 years ago

Websteria commented 10 years ago

I got everything installed and running, but am receiving errors...

here's my application.ini: [SickBeard] host=localhost port=8081 username= password= web_root= ssl=0 api_key=

[NzbDrone] host=localhost port=8989 web_root= ssl=0 api_key=b9eab3d7acce400ea06570a053862d13

[MP4] ffmpeg=/Applications/ffmpeg/ ffprobe=/Applications/ffmpeg/ output_directory= copy_to= move_to= output_extension=mp4 output_format=mp4 delete_original=false relocate_moov=True audio-codec=ac3 video-codec=h264,x264 ios-audio=True max-audio-channels=5 audio-language=eng audio-default-language= audio-channel-bitrate= subtitle-language= subtitle-default-language= fullpathguess=True convert-mp4=False tagfile=True tag-language=en download-artwork=True download-subs=False embed-subs=False sub-providers=addic7ed,podnapisi,thesubdb,opensubtitles

[CouchPotato] host = localhost port = 5050 username = password = web_root = ssl = 0 apikey = 38af5a06e75b41d580000598393cc4b8 delay = 65 method = renamer delete_failed = 0

[uTorrent] label=

and here are the errors I receive when I try to run it manually... python ./manual.py -i /Users/xx/Downloads/Movies/BeetleJuice\ (1988).mkv -a Audio bitrate was invalid, defaulting to 256 per channel 64 Matched movie title as: Beetlejuice 1988-03-30 Processing Beetlejuice Traceback (most recent call last): File "./manual.py", line 298, in main() File "./manual.py", line 289, in main processFile(path, tagdata) File "./manual.py", line 188, in processFile output = converter.process(inputfile, True) File "/Applications/sabnzbd-prowl-master/mkvtomp4.py", line 106, in process options = self.generateOptions(inputfile, original=original) File "/Applications/sabnzbd-prowl-master/mkvtomp4.py", line 184, in generateOptions info = Converter(self.FFMPEG_PATH, self.FFPROBE_PATH).probe(inputfile) File "/Applications/sabnzbd-prowl-master/converter/init.py", line 248, in probe return self.ffmpeg.probe(fname) File "/Applications/sabnzbd-prowl-master/converter/ffmpeg.py", line 352, in probe '-show_format', '-show_streams', fname], True) File "/Applications/sabnzbd-prowl-master/converter/ffmpeg.py", line 306, in _spawn close_fds=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in init errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child raise child_exception OSError: [Errno 13] Permission denied

mdhiggins commented 10 years ago

Your paths to ffmpeg and ffprobe are pointing to a directory. They need to point to the individual executable files for each program respectively

Websteria commented 10 years ago

Fixed that, now I'm getting this error:

       nzbToNzbDrone MP4 edition
Audio bitrate was invalid, defaulting to 256 per channel
Processing episode /Users/jeff/Downloads/TVFinal/PAW.Patrol.S01E02.Pup.Pup.Boogie.Pups.in.a.Fog.HDTV.x264-W4F/paw.patrol.s01e02.pup.pup.boogie.pups.in.a.fog.hdtv.x264-w4f.mp4
Traceback (most recent call last):
  File "/Applications/sabnzbd-prowl-master/nzbToNzbDroneMP4.py", line 21, in <module>
    converter.process(inputfile)
  File "/Applications/sabnzbd-prowl-master/mkvtomp4.py", line 145, in process
    dim = self.getDimensions(outputfile)
  File "/Applications/sabnzbd-prowl-master/mkvtomp4.py", line 176, in getDimensions
    return { 'y': info.video.video_height,
AttributeError: 'NoneType' object has no attribute 'video'
Websteria commented 10 years ago

I've also noticed this line gets added to the console when the process fails:

12/5/14 1:13:32.712 PM taskgated[77]: no signature for pid=3260 (cannot make code: UNIX[No such process])

I'm not a python coder, but I'm an ex c# .net programmer. It looks like it's something to do with the last line of this code returning null, I'm guessing. It's definitely not an object type.

mkvtomp4.py - 180

 # Generate a list of options to be passed to FFMPEG based on selected settings and the source file parameters and streams
    def generateOptions(self, inputfile, original=None):    
        #Get path information from the input file
        input_dir, filename, input_extension = self.parseFile(inputfile)

        **info = Converter(self.FFMPEG_PATH, self.FFPROBE_PATH).probe(inputfile)**

pprint (vars(info)) gives an error about the object needing a dict so that's as educated a guess as I can make.

I'm still trying to track it down but I have a feeling it's something to do with my ffmpeg or the probe one..

anthmoksh commented 10 years ago

I am also having the exact same error . Any luck?

Websteria commented 10 years ago

I narrowed it down to the fact that I didn’t have FFMPEG or probe installed correctly.

When I tried to just execute ./ffprobe -L before it gave me a “Killed: 9"

I followed the instructions here to install FFMPEG: http://www.renevolution.com/how-to-install-ffmpeg-on-mac-os-x/ http://www.renevolution.com/how-to-install-ffmpeg-on-mac-os-x/ and that fixed it for me. I used the --with-tools option for ffmpeg.

There should be some error checking around FFMPEG executions I feel.. there are too many assumptions in there. Maybe it’s time for me to learn some python. :-)

Anyways, this is resolved.

TLDR: Make sure ffmpeg and ffprobe run from the terminal and at least tell you they’re ok. If not, you probably should install them properly. :-p

On Dec 5, 2014, at 2:50 PM, anthmoksh notifications@github.com wrote:

I am also having the exact same error . Any luck?

— Reply to this email directly or view it on GitHub https://github.com/mdhiggins/sickbeard_mp4_automator/issues/177#issuecomment-65867443.

Websteria commented 10 years ago

Can someone mark the last answer as the solution? :-)

anthmoksh commented 10 years ago

ffprobe works fine on my system but I still have the same error. I am not sure about the compilation options that I used for ffmpeg. Here are the options that I used.

CFLAGS="-march=armv5te -Wall -O2 -fstrength-reduce -finline-functions -ffast-math -fomit-frame-pointer" ./configure --prefix=/opt --enable-gpl --enable-nonfree --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-asm --disable-debug