在windows上用youtube-dl提取音频 [英] extract audio with youtube-dl on windows

查看:696
本文介绍了在windows上用youtube-dl提取音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows上从youtube-dl下载的视频中提取音频。我有youtube-dl工作,但无法提取音频。由于没有安装正确的音频代码,导致此问题。当我尝试提取音频时,会告诉我以下内容:

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 having the correct audio codes installed. When i try to extract audio it tells me the following:

'警告:无法使用ffprobe获取文件音频代码

'WARNING: unable to obtain file audio codes with ffprobe'

youtube-dl man sais如下:
-x -extract-audio将视频文件转换为音频文件(需要ffmpeg或avconv和ffprobe或avprobe)

youtube-dl man sais the following: -x -extract-audio convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe)

如何安装ffprobe或ffmpeg?我是否在Windows上安装,还是将其安装为python扩展?我不知道,有人可以指向正确的方向吗?

How do I install ffprobe or ffmpeg? Do I install this on windows, or do I install this as a python extension? I have no idea, can someone point me in the right direction?

操作系统:Windows 7

OS: windows 7

推荐答案

ffmpeg 不是Python模块。看看 FFmpegExtractAudioPP 类中 youtube-dl 的代码。

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()

您需要下载 Windows构建的 ffmpeg ,并将它们放在您当前的路径中确保他们的姓名没有 .exe

这篇关于在windows上用youtube-dl提取音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆