本文介绍了通过命令行将*(mp3,m4p等)转换为OGG,以实现HTML5兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PHP将MP3转换为OGG的选项有哪些?我假设唯一的方法是通过命令行与execute语句。这是真的?

What options do I have for converting MP3's to OGG on the fly using PHP? I assume the only way to do this is via the command line with an execute statement. Is this true? If so, what converters (and associated commands) would I be best off using?

我尝试过:

oggenc2.exe,但程序告诉我,我传递的MP3不是一个有效的文件类型

oggenc2.exe but was told by the program that the MP3 I passed was not a valid filetype

ffmpeg.exe,但无法找出如何从mp3到ogg(找到如何从ogg到mp3)

ffmpeg.exe but was unable to figure out how to go from mp3 to ogg (found how to go from ogg to mp3 though)

推荐答案

..

exec(/ usr / bin / ffmpeg -i infile.mp3 -acodec libvorbis outfile.ogg);

这篇关于通过命令行将*(mp3,m4p等)转换为OGG,以实现HTML5兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 17:38