如何在VB.NET中将任何视频转换为mp3 [英] How to conver any videos to mp3 in VB.NET

查看:73
本文介绍了如何在VB.NET中将任何视频转换为mp3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有



现在我想问你如何使用VB.NET创建任何mp3视频?

和你能给出一个项目的例子吗?



谢谢

解决方案

最简单,最强大的方法可能是使用FFMpeg或libavcode它是基于。 http://en.wikipedia.org/wiki/Ffmpeg [ ^ ],

http ://ffmpeg.org/ [ ^ ],

http://en.wikipedia.org/wiki/Libavcodec [ ^ ],

http://libav.org/ [ ^ ]。



这是我所知道的最好的库和实用程序集。我可以通过使用命令行界面以编程方式运行可用的实用程序(FFmpeg.exe)来使用。



可选,您可以嵌入为图书馆。使用C ++显然是可能的,因为库是用C编写的。如果你需要.NET功能,你也可以这样做:你仍然可以使用非托管库,在C ++ / CLI混合模式(托管+非托管)项目中使用它。您可以在托管的ref类中公开您需要的功能;然后你可以使用这些类作为通常的.NET程序集引用生成的模块。



使用.NET和没有C ++ / CLI,它可能更复杂,因为它需要使用P / Invoke。同时,您可以找到合适的包装器。请参阅:

http://www.ffmpeg-csharp.com/ [ ^ ],

http://sourceforge.net/projects/sharpffmpeg/ [ ^ ],

http://vbffmpegwrapper.codeplex.com/ [ ^ ]。



毕竟,尝试找一些: http://bit.ly/VpboUJ [ ^ ]。



如果你想工作在你自己的包装但不知道如何,问一个问题,我会给你基本的想法(使用P / Invoke或C ++ / CLI混合模式项目)。

< br $> b $ b



一个注意事项:为什么你需要像MP3一样糟糕和过时的格式?我可以想象在哪里:例如,那些愚蠢的汽车音响单元只需要MPEG-3或WMA,但这是一个蹩脚的案例;汽车电子产品即使在最新型号上也总是过时的;那你真的需要那些媒体类型。但如果你的意思是在计算机上使用音频,包括移动设备,你真的需要更好的东西。我强烈推荐Opus,第二选择是AAC(基于MPEG-4音频规格)。



祝你好运,

< DD> -SA

Dear all

Now I want to ask you about how to create any videos to mp3 by using VB.NET?
and can you give an example of project?

Thanks

解决方案

The simplest and most robust way is probably using FFMpeg or libavcode it's based on. http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

This is the best library and utility set I ever knew. I could be used just by running the available utility (FFmpeg.exe), programmatically or not, using command-line interface.

Optionally, you can embed is as a library. It's apparently possible with C++, as the library is written on C. Same thing if you need .NET functionality: you can still use the unmanaged library, using it in your C++/CLI mixed-mode (managed + unmanaged) project. You can expose just the functionality you need, in managed "ref" classes; then you can use these classes referencing the resulting module as a usual .NET assembly.

With .NET and without C++/CLI, it can be more complex as it would require using P/Invoke. At the same time, you can find appropriate wrapper. Please see:
http://www.ffmpeg-csharp.com/[^],
http://sourceforge.net/projects/sharpffmpeg/[^],
http://vbffmpegwrapper.codeplex.com/[^].

After all, try to find some more: http://bit.ly/VpboUJ[^].

If you wish to work at such wrapper by yourself but don't know how, ask a question, I'll give you the basic ideas (using P/Invoke or C++/CLI "mixed-mode" project).

[EDIT]

One note: why would you need such a bad and obsolete format as MP3? I can imagine where: for example, those stupid car audio units require only MPEG-3 or WMA, but this is a lame case; car electronics was always outdated even on newest models; then you really need those media types. But if you mean to use audio on computers, including mobile devices, you really need something better. I would highly recommend Opus, the second choice would be AAC (based on MPEG-4 audio specification).

Good luck,
—SA


这篇关于如何在VB.NET中将任何视频转换为mp3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆