Skip to content
首页 » 博客 » 在线将 MP4 转换为 MP3 – 免费转换器

在线将 MP4 转换为 MP3 – 免费转换器

  • by
  • Uncategorized

在线 MP4 到 MP3 转换器

如果您需要可靠的 MP4 到 MP3 转换工具,请尝试我们的在线 MP4 到 MP3 转换器。其用户友好的界面让您只需点击几下即可从视频文件中提取音频。

使用此免费 MP4 到 MP3 转换器将您的 MP4 文件转换为 MP3,无需创建帐户。跳过可安装的 MP4 转换器。

如何将 MP4 转换为 MP3?

使用我们的在线转换器,MP4 到 MP3 的转换非常简单。请按照下列步骤操作:

从计算机或 Dropbox 上传 MP4 文件。
单击“转换”按钮开始转换。
该过程完成后,下载 MP3 文件。

我们会保证您上传和转换的文件的安全,并在 24 小时后将其从我们的服务器中删除。

为什么选择在线 MP4 到 MP3 转换器?

这款在线 MP4 到 MP3 转换器具有以下几个优点:

易于访问:作为一种基于网络的工具,它可以在任何具有互联网连接的设备上运行。
免费:免费将 MP4 文件转换为 MP3,转换次数没有限制。
无需注册:无需帐户 – 只需打开页面并开始转换。
用户友好:简洁的界面使转换变得毫不费力。
从 MP4 中提取音频 – 开发人员指南

该转换器基于Aspose.Slides API构建,支持.NET、Java、C++、Python、PHP等平台。以下是使用 API 从 PowerPoint 演示文稿创建视频的示例。

C#
在您的应用程序中安装 Aspose.Slides for .NET。
下载并安装 ffmpeg 包。
使用下面的代码从 PPT 创建视频:
使用 System.Collections.Generic;
使用 Aspose.Slides;
使用 FFMpegCore; // 将使用我们之前提取到“c:toolsffmpeg”的 FFmpeg 二进制文件
使用Aspose.Slides.Animation;
使用(演示文稿演示=新演示文稿())

{
// 添加微笑形状,然后为其设置动画
IAutoShape smile =presentation.Slides[0].Shapes.AddAutoShape(ShapeType.SmileyFace, 110, 20, 500, 500);
IEffecteffectIn=presentation.Slides[0].Timeline.MainSequence.AddEffect(smile, EffectType.Fly, EffectSubtype.TopLeft, EffectTriggerType.AfterPrevious);
IEffecteffectOut=presentation.Slides[0].Timeline.MainSequence.AddEffect(smile, EffectType.Fly, EffectSubtype.BottomRight, EffectTriggerType.AfterPrevious);
effectIn.Timing.Duration = 2f;
effectOut.PresetClassType = EffectPresetClassType.Exit;

常量整数 Fps = 33;
List 框架 = new List();

使用 (varanimationsGenerator = newPresentationAnimationsGenerator(presentation))
使用 (varplayer = newPresentationPlayer(animationsGenerator, Fps))
{
player.FrameTick += (发送者, args) =>
{
字符串框架 = $”frame_{(sender.FrameIndex):D4}.png”;
args.GetFrame().Save(frame);
框架。添加(框架);
};
动画生成器.运行(演示文稿.幻灯片);
}

// 配置 ffmpeg 二进制文件文件夹。请参阅此页面:https://github.com/rosenbjerg/FFMpegCore#installation
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = @”c:toolsffmpegbin”, });
// 将帧转换为 webm 视频
FFMpeg.JoinImageSequence(“smile.webm”,Fps,frames.Select(frame => ImageInfo.FromPath(frame)).ToArray());

}

爪哇
在您的应用程序中安装 Aspose.Slides for Java。
添加以下依赖项。

net.bramp.ffmpeg
ffmpeg
0.7.0

复制并粘贴以下代码以从 PPT 创建视频:
演示文稿演示=新的演示文稿();
尝试{
// 添加微笑形状,然后为其设置动画
IAutoShape smile =presentation.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.SmileyFace, 110, 20, 500, 500);
ISequence mainSequence =presentation.getSlides().get_Item(0).getTimeline().getMainSequence();
IEffecteffectIn = mainSequence.addEffect(smile, EffectType.Fly, EffectSubtype.TopLeft, EffectTriggerType.AfterPrevious);
IEffecteffectOut = mainSequence.addEffect(smile, EffectType.Fly, EffectSubtype.BottomRight, EffectTriggerType.AfterPrevious);
effectIn.getTiming().setDuration(2f);
effectOut.setPresetClassType(EffectPresetClassType.Exit);

最终int fps = 33;
ArrayList 框架 = new ArrayList();

PresentationAnimationsGeneratoranimationsGenerator = newPresentationAnimationsGenerator(presentation);
尝试
{
PresentationPlayer 播放器 = newPresentationPlayer(animationsGenerator, fps);
尝试{
player.setFrameTick((发送者, 参数) ->
{
尝试{
Stringframe = String.format(“frame_%04d.png”, sender.getFrameIndex());
ImageIO.write(arguments.getFrame(), “PNG”, new java.io.File(frame));
框架.添加(框架);
} catch (IOException e) {
抛出新的运行时异常(e);
}
});
AnimationsGenerator.run(presentation.getSlides());
}最后{
if (player!= null)player.dispose();
}
}最后{
if (animationsGenerator != null)animationsGenerator.dispose();
}

// 配置 ffmpeg 二进制文件文件夹。请参阅此页面:https://github.com/rosenbjerg/FFMpegCore#installation
FFmpeg ffmpeg = new FFmpeg(“路径/到/ffmpeg”);
FFprobe ffprobe = new FFprobe(“路径/到/ffprobe”);

FFmpegBuilder 构建器 = new FFmpegBuilder()
.addExtraArgs(“-start_number”, “1”)
.setInput(“frame_%04d.png”)
.addOutput(“输出.avi”)
.setVideoFrameRate(FFmpeg.FPS_24)
.setFormat(“avi”)
.done();

FFmpegExecutor 执行器 = new FFmpegExecutor(ffmpeg, ffprobe);
executor.createJob(builder).run();
} catch (IOException e) {
e.printStackTrace();
}

C++
在您的应用程序中安装 Aspose.Slides for C++。
下载并安装 ffmpeg 包。
使用下面的代码从 PPT 创建视频:
void OnFrameTick(System::SharedPtr 发送者,System::SharedPtr args)
{
System::String fileName = System::String::Format(u”frame_{0}.png”, sender->get_FrameIndex());
args->GetFrame()->保存(文件名);
}

无效运行()
{
自动演示 = System::MakeObject();
自动幻灯片 = 演示文稿->get_Slide(0);

// 添加微笑形状,然后为其设置动画
System::SharedPtr smile = slip->get_Shapes()->AddAutoShape(ShapeType::SmileyFace, 110.0f, 20.0f, 500.0f, 500.0f);
自动序列=幻灯片->get_Timeline()->get_MainSequence();
System::SharedPtreffectIn =sequence->AddEffect(smile, EffectType::Fly, EffectSubtype::TopLeft, EffectTriggerType::AfterPrevious);
System::SharedPtreffectOut = 序列->AddEffect(smile, EffectType::Fly, EffectSubtype::BottomRight, EffectTriggerType::AfterPrevious);
effectIn->get_Timing()->set_Duration(2.0f);
effectOut->set_PresetClassType(EffectPresetClassType::Exit);

常量 int32_t fps = 33;

自动动画生成器 = System::MakeObject(演示文稿);
自动播放器 = System::MakeObject(animationsGenerator, fps);
播放器->FrameTick += OnFrameTick;
动画生成器->运行(演示文稿->get_Slides());

const System::String ffmpegParameters = System::String::Format(
u”-loglevel {0} -framerate {1} -i {2} -y -c:v {3} -pix_fmt {4} {5}”,
u“警告”,m_fps,“frame_%d.png”,u“libx264”,u“yuv420p”,“video.mp4”);
自动 ffmpegProcess = System::Diagnostics::Process::Start(u”ffmpeg”, ffmpegParameters);
ffmpegProcess->WaitForExit();
}

探索 PowerPoint 库

如果您想探索有关我们的 PowerPoint 操作库的更多信息,以下是一些有用的资源。

文档
源代码
API 参考
博客
论坛
常见问题解答
如何从 MP4 中提取 MP3 音频?

上传 MP4 文件,单击“转换”,然后下载生成的 MP3 文件。

在这里上传我的 MP4 文件安全吗?

是的。我们会确保您的文件安全,并在 24 小时后将其从我们的服务器中删除。

该转换器可以将 MP4 转换为高品质的 MP3 吗?

绝对地。该转换器可将您的 MP4 视频输出为高质量的 MP3。

结论

您现在知道如何使用我们的在线转换器将 MP4 文件转换为 MP3。随时随地从任何 MP4 视频中提取 MP3 音频。我们还提供独立的库,用于 PowerPoint 演示文稿中的高级视频操作。

另请参阅
使用 C# 在 PowerPoint 演示文稿中嵌入视频
在 C# 中的 PowerPoint PPT 中添加或提取音频

Leave a Reply

Your email address will not be published. Required fields are marked *