Java如何从电影中提取音频流
我需要从电影中提取音频流,并最终将其转换为某种格式,比如 192 kbps 的 MP3,以便稍后处理,更准确地检测声音。
是否有用于从电影中提取音频流的库?
I need to extract the audio stream from a movie and eventually convert it to a certain format, let's say MP3 at 192 kbps, for later processing, more exactly to detect the voices.
Are there any libraries for extracting the audio stream from a movie?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 mplayer 将音频提取到单独的文件:
mplayer yourmovie.mov -vo null -vc null -ao pcm:fast
http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html
you could use mplayer to extract audio to a seperate file:
mplayer yourmovie.mov -vo null -vc null -ao pcm:fast
http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html
假设您有一张 DVD,那么就像剥离音轨一样简单,您可以使用各种 DVD 翻录软件来完成此操作。
如果它具有标准杜比数字音轨(高达 48kHz 16 位),或者在蓝光情况下可能具有 TrueHD(高达 96kHz,24 位),您应该能够使用 mplayer 或ffmpeg。
如果是 Java,您有兴趣查看 FMJ:
http://fmj-sf.net/index.php
这为 ffmpeg 提供了一个 Java 包装器。
Assuming you have a DVD it can be as simple as stripping the audio track, which you can do with various bits of DVD ripping software.
It it has a standard Dolby Digital audio track (up to 48kHz 16bit) or possibly TrueHD in the case of Blu-Ray (up to 96kHz, 24bit) you should be able to decode either using either mplayer or ffmpeg.
If it's Java you're interested in check out FMJ:
http://fmj-sf.net/index.php
This provides a Java wrapper to ffmpeg.