音频和视频使用PHP或.NET混合音频、视频、NET、PHP

2023-09-04 06:20:00 作者:心窝里的爱人

下面是我的查询:

[1]音频文件混合

需要混合(未合并)2的音频文件(MP3播放),以创建一个单一的文件(MP3播放)。音频文件的比特率进行混合将是相同的,并最终混合文件的比特率也应保持不变。

[2]创建自定义视频

还需要使用一些可用的图像显示为幻灯片放映,并在背景中播放的音频文件来创建视频(.MP4或.MPG)与几个不同的转换(ATLEAST 5-6)。

这一切都需要使​​用.NET和PHP都可以实现。因此,需要相关的第三方工具/库(免费或付费),可以使用。

建议

让我知道,如果有更多的细节是必需的。

解决方案 php培训 –

您可能希望调查的http://袜。 sourceforge.net/ 时,这是一个命令行音频处理工具。您可以从PHP或.NET(一胜二是可用)经由外壳执行它调用它。

从来没有使用过,而且目前还不清楚如何以及究竟你想混。您要咨询的联机帮助 http://sox.sourceforge.net/sox.html 但除非你需要的效果很可能只是:

 系统(SOX input1.mp3 input2.mp3混合output.mp3);
 

合并音频和图像转换成视频文件是 的ffmpeg相当简单 ,它是简单又通过命令行来调用它。 男人codeR 允许更多的转变。

Here are my queries :

[1] Audio File Mixing

Need to mix (not merge) 2 audio files (.mp3) to create one single file (.mp3). The bit rates of the audio files to be mixed will be same and the bit rate of the final mixed file should also remain the same.

[2] Create Custom Video

Also need to create video (.mp4 or .mpg) with few different transitions (atleast 5-6) by using some available images to show as a slide show and an audio file to be played in the background.

All this is required to be achieved using .NET and PHP both. So need suggestions related to 3rd party tools/libraries (free or paid) that can be used.

Let me know if any more details are required.

解决方案

You probably want to investigate http://sox.sourceforge.net/, which is a command line audio processing utility. You can invoke it from either PHP or .NET (a win binary is available) by executing it via the shell.

Never used it, and it's not clear how and what exactly you want to mix. You have to consult the manpage http://sox.sourceforge.net/sox.html but unless you need effects it's probably just:

system("sox input1.mp3 input2.mp3 mix output.mp3");

Merging audio and images into a video file is quite simple with ffmpeg, where it's again simple to invoke it via the commandline. mencoder allows for more transitions.