问题描述
我需要一种方法来从一些视频中提取音频(在 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 从视频中提取音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)