如何获得MP4(视频文件)的声音部分? [英] How to get sound portion of an MP4 (video file)?

查看:373
本文介绍了如何获得MP4(视频文件)的声音部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Windows Phone 7的应用程序,它的视频录制。我想获得的视频文件(MP4)的声音部分,并做了一些声音增强。我相信声音保存为MP4 AAC帧。 (右?)我怎么能提取videa MP4文件的声音?

I am developing a windows phone 7 application and it does video recording. I would like to get the sound portion of the video file (MP4) and do some enhancements on the sound. I believe sound is saved as AAC frames in MP4. (Right?) How can I extract sound of a videa MP4 file?

由于这是一个视频文件,它可以是巨大的文件。所以上传到云和处理还没有一个很好的选择。由于这WP7应用程序我不能使用unmaged dll文件:(有没有办法在纯C#做?任何开源工具/样品?

Since this is a video file, it can be huge file. So uploading to cloud and processing there is not a good option. Since this WP7 application I cannot use unmaged dlls :( Is there a way to do in pure C#? Any open source tools/samples?

谢谢!

推荐答案

MP4是一种容器格式,抓实声音部分并不总是AAC。它可以是MP3或任何其他数量的不同的音频格式。你也许会想M4A,我相信要求要么AAC或ALAC的。

MP4 is a container format and realistically the sound portion isn't always AAC. It could be MP3 or any other number of different audio formats. You may be thinking of M4A, which I believe requires either AAC or ALAC.

在音频提取的主题,它应该是可以提取使用勉强code从MP4音频。你必须对MP4格式阅读起来(这里,例如 - 这个问题也值得读数),然后通过在该文件中的块搜索的音频的位置,然后要么将它复制到它自己的缓冲器或做你操作。即使是这样,你必须能够认识到当它不是你的应用将不支持的音频格式。

On the subject of audio extraction, it should be possible to extract the audio from an MP4 using just managed code. You'll have to read up on the MP4 format (here, for example - this question is also worth reading) and then search through the file for the location of the audio and then either copy it to its own buffer or do your manipulations in chunks. Even then, you'll have to be able to recognize when it isn't an audio format that your app won't support.

这有可能是已经存在的.NET库,可以做到这一切,但我不知道有什么。它可能不是很受欢迎,因为管理code绝对不是从接近这个最佳角度,但考虑到这是Windows手机,它是,正如你指出,你唯一的方法途径。

It's possible that there already exists a .net library that can do all of this but I don't know of any. It's probably not very popular because managed code is definitely not the best angle to approach this from, but considering this is Windows Phone, it is, as you noted, your only avenue of approach.

祝你好运!

这篇关于如何获得MP4(视频文件)的声音部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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