开发者

How do I programmatically extract the audio from a YouTube video? [closed]

开发者 https://www.devze.com 2023-01-03 02:00 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

Improve this question

I'm trying to create a C# application which allows me to extract just the开发者_如何学Go audio from YouTube videos. I've come across sites that already do that, but I'm not sure how they actually work. What would be the best way to do this programmatically?

Thanks for any advice


Writing an application for this might be overkill. Existing tools already do a pretty good job, and it's hard to beat their simplicity:

wget http://www.youtube.com/get_video.php?video_id=... |
  ffmpeg -i - audio.mp3

All done!

If your application needs to do something special with the audio afterwards, it would make sense to write an app for that part. But for just getting the audio out, shelling out to ffmpeg will be a lot easier.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号