简体   繁体   中英

Java how to extract audio stream from movie

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM