How to extract audio with youtube-dl on Windows

后端 未结 3 1745
灰色年华
灰色年华 2021-01-12 21:52

I want to extract audio from a video downloaded with youtube-dl on Windows. I got youtube-dl working, but am unable to extract the audio. This problem is caused due to not h

3条回答
  •  孤城傲影
    2021-01-12 22:26

    ffmpeg is not a Python module. Take a look at the code of youtube-dl in the FFmpegExtractAudioPP class.

    It uses this call to figure out if the executable exists or not. It checks in your current path:

    subprocess.Popen([exe, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    

    You'll need to download the Windows builds of ffmpeg and put them in your current path, probably making sure that they do not have .exe at the end of their names.

提交回复
热议问题