PHP Extract audio from video(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 从视频中提取音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP 从视频中提取音频
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
