7x11x13 / songs-to-youtube

Desktop application alternative to sites like TunesToTube, audioship, tovid.io, etc
https://pypi.org/project/songs-to-youtube/
210 stars 12 forks source link

Error while rendering - FFmpeg? #17

Closed viatekh closed 3 years ago

viatekh commented 3 years ago

Python 3.9.4, macOS.

Followed the below instructions: Make sure you have Python version 3.8+ installed Download the source code Install required Python modules with python3 -m pip install -r requirements.txt Run the program with python3 main.py

I get the error "qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found." in terminal at runtime.

Otherwise the program loads ok. When I click through to render I am given the following: 13:13:20] [ERROR] /Users/tekh/Damon Wild Presents Nightvision - Nuclear Sun (1993) - Vinyl FLAC/B - Melatonin.flac.mkv - Traceback (most recent call last): File "/Users/tekh/Downloads/songs-to-youtube-0.11.13/src/render.py", line 116, in run errors = handler.run(command_str) File "/Users/tekh/Downloads/songs-to-youtube-0.11.13/src/render.py", line 65, in run p = subprocess.Popen( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg -loglevel error -progress pipe:1 -y -r 1 -i "/Users/tekh/Damon Wild Presents Nightvision - Nuclear Sun (1993) - Vinyl FLAC/00 - A - Cover.jpg" -i "/Users/tekh/Damon Wild Presents Nightvision - Nuclear Sun (1993) - Vinyl FLAC/B - Melatonin.flac" -r 24 -lavfi "[0:v]scale=1920:1102:force_original_aspect_ratio=increase,gblur=sigma=10[bg];[0:v]scale=1920:1102:force_original_aspect_ratio=decrease[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2,crop=w=1920:h=1102,setpts=319.875125/TB" -acodec copy -vcodec libvpx-vp9 -lossless 1 "/Users/tekh/Damon Wild Presents Nightvision - Nuclear Sun (1993) - Vinyl FLAC/B - Melatonin.flac.mkv"' [13:13:20] [ERROR] /Users/tekh/Damon Wild Presents Nightvision - Nuclear Sun (1993) - Vinyl FLAC/B - Melatonin.flac.mkv - Error while rendering

The above is something to do with FFmpeg not being installed properly...? I've installed using ye olde "brew install ffmpeg"

Any thoughts appreciated, been a while since I've used Python and I'm definitely rusty

7x11x13 commented 3 years ago

I have no way of testing on mac, but can you try changing https://github.com/7x11x13/songs-to-youtube/blob/master/src/render.py#L70 to shell=True?

viatekh commented 3 years ago

cheers, that seems to have worked. i'm now catching: FileNotFoundError: No cookie files matching youtube.pkl or youtube.json found in...

i assume this is related to not being logged in to an account, i've gone through "add account" but there is only a field for the username... there is another field but it's purpose is not explained

7x11x13 commented 3 years ago

image The window should look like this, save cookies to a file using the linked browser extension and click open cookies file to load it.

viatekh commented 3 years ago

i'm sorry, i don't follow. i see no reference to a linked browser extension in the docs... if you can point me to what you mean, i'll edit the docs to reflect this :)

7x11x13 commented 3 years ago

Clicking on the underlined text should bring you to https://addons.mozilla.org/en-US/firefox/addon/%E3%82%AF%E3%83%83%E3%82%AD%E3%83%BCjson%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%87%BA%E5%8A%9B-for-puppeteer

7x11x13 commented 3 years ago

Just tested and it doesn't, will fix soon.

viatekh commented 3 years ago

hmm, doesn't exactly look like the most trustworthy of addons 😅

7x11x13 commented 3 years ago

You're free to audit the code yourself, it's a very small program.