The program can't convert m4a to mp3 because it says ffmpeg can't be found. However, I did put the file into C:/Windows/System32 and I can use it from powershell. I tried writing out the full ffmpeg command (from debug log) to my powershell and it ran successfully converting the song.
(cut out most relevant part, can provide full log if needed)
(the second warning after the ffmpeg I added myself to see what the exception was)
DEBUG: Downloading from URL: https://r6---sn-8pgbpohxqp5-h5oz.googlevideo.com/videoplayback/id/bd7336038c00a6ca/itag/140/source/youtube/requiressl/yes/mm/31,29/pl/23/mn/sn-8pgbpohxqp5-h5oz,sn-aigl6n7z/initcwndbps/1861250/mv/m/ms/au,rdu/ei/6nBsW92nCsTvVt-2qPAN/ratebypass/yes/mime/audio%2Fmp4/otfp/1/gir/yes/clen/4591731/lmt/1520386557549759/dur/288.856/mt/1533833360/fvip/5/disable_polymer/true/ip/82.40.143.222/ipbits/0/expire/1533855050/sparams/ip,ipbits,expire,id,itag,source,requiressl,mm,pl,mn,initcwndbps,mv,ms,ei,ratebypass,mime,otfp,gir,clen,lmt,dur/signature/3439EEF687AC4838109628EB47252BED6426B19E.48A8DB4F8B0C25A2418F4A9B15FE3266809A474C/key/dg_yt0/
DEBUG: Saving to: /other/Cruk - Illusion.m4a
4,591,731 Bytes [100.00%] received. Rate: [11479 KB/s]. ETA: [0 secs]
INFO: Converting Cruk - Illusion.m4a to mp3
DEBUG: ['ffmpeg', '-y', '-i', '/other/Cruk - Illusion.m4a', '-codec:v', 'copy', '-codec:a', 'libmp3lame', '-ar', '44100', '-b:a', '192k', '-vn', '/other/Cruk - Illusion.mp3']
WARNING: Could not find ffmpeg, skipping conversion
WARNING: [WinError 2] The system cannot find the file specified
INFO: Applying metadata
DEBUG: Removing downloaded song from text file
ffmpeg version N-91589-ge0539f0349 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20180808
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 22.101 / 58. 22.101
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
Did you tried to add ffmpeg to PATH?
System32 folder is in the PATH and the ffmpeg.exe is in system32
PowerShell does let me use ffmpeg from anywhere.
I know but when I started using this tool instead of putting FFmpeg into System32 I've added it to PATH. So I know that it's a little stupid but just try and then tell me the result
Ok, I will try it once I get back.
Thank you
Always happy to help!
After moving the ffmpeg.exe out of system32 and adding it to PATH it worked. It's a bit odd seeing as system32 is in PATH. Oh well.
Might be worth updating the installation instructions in the wiki to say moving the file to system32 may not work.
Thank you
Yes, it's strange. Maybe because python can find programs only that are present in PATH. I don't really know but the good thing is that we found a solution.
After moving the ffmpeg.exe out of system32 and adding it to PATH it worked. It's a bit odd seeing as system32 is in PATH. Oh well.
Might be worth updating the installation instructions in the wiki to say moving the file to system32 may not work.
Thank you
I had the same issue and that solved it.
After moving the ffmpeg.exe out of system32 and adding it to PATH it worked. It's a bit odd seeing as system32 is in PATH. Oh well.
Might be worth updating the installation instructions in the wiki to say moving the file to system32 may not work.
Thank youI had the same issue and that solved it.
hello, I am new to this, can you explain in steps how you fix this? thanks much
@damirdarme You simply don鈥檛 have to put ffmpeg in System32 but you have to add it directly in PATH
Btw @ritiek I think you can change the code a little bit in convert.py, at line 143, and write the code like this code = subprocess.call(command, shell=True) based on what I read online, but I could be wrong as I鈥檓 not on the PC right now.
@TheLifeGamingYT Yep, that will probably allow us to find FFmpeg when placed in System32. But, lots of other bad things could happen on the side. Using shell=True could completely change the way a command gets interpreted. So considering everything, IMO let's avoid shell=True.
After moving the ffmpeg.exe out of system32 and adding it to PATH it worked. It's a bit odd seeing as system32 is in PATH. Oh well.
Might be worth updating the installation instructions in the wiki to say moving the file to system32 may not work.
Thank youI had the same issue and that solved it.
hello, I am new to this, can you explain in steps how you fix this? thanks much
@damirdame It depends on your system. But you can find steps easily if you just google "how to add to path environment variable"
Use $ pip install ffmpeg
it will automatically install ffmpeg into PATH.
Most helpful comment
Yes, it's strange. Maybe because python can find programs only that are present in PATH. I don't really know but the good thing is that we found a solution.