从视频中提取PHP音频 [英] PHP Extract audio from video

查看:449
本文介绍了从视频中提取PHP音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要一种方法来提取一些视频(在PHP)的音频。我有视频YouTube串流的,所以我真的很喜欢它,如果它是动态流,不是我必须将它保存到一个临时目录并进行处理存在(虽然这是可以接受的。)谢谢,艾萨克·沃勒

编辑:更具体,我有一个MP4,我想这是一个MP3


I need a way to extract the audio from some video (in PHP). I have the video streaming in from YouTube, so I would really like it if it were on the fly streaming, not I have to save it to a temp directory and process it there (though that is acceptable.) Thanks, Isaac Waller
to be more specific, I have a MP4 and I want it to be a MP3.

推荐答案

您会想使用类似的ffmpeg 和使用PHP的exec命令调用它。如果在文档环顾四周,我相信你能弄清楚用什么标志只获取音频。

You're going to want to use something like ffmpeg and call it using php's exec command. If you look around in the docs, I'm sure you can figure out what flag to use to only get the audio.

我以前使用过这个程序上进行视频直播转码项目,就像一个魅力。只要确保你的服务器是否正确安装。

I've used this app before on a project for live transcoding of video, works like a charm. Just make sure your server has it correctly installed.

这篇关于从视频中提取PHP音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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