Use mplayer and mencoder to extract audio from a movie

Source: Internet
Author: User

Enter

Mplayer A. rmvb-ao PCM: file112a.wav-VC dummy-vo null

A. rmvb is the video to be extracted.

A.wav is the extracted sound.

For more information about mplayer and parameter usage, see

Http://www.mplayerhq.hu/DOCS/man/zh_CN/mplayer.1.html

Http://www.mplayerhq.hu/DOCS/HTML/en/index.html

For other languages, see select

Http://www.mplayerhq.hu/DOCS/

 

The following uses mencoder to extract

Mencoder-O outtrans-OVC frameno-OAC mp3lame-lameopts CBR: Br = 128-of rawaudio-SS-endpos test. rmvb

In practice, you need to change the two time parameter values! The command parameters are described as follows:

-O outputted target file name
-OVC frameno does not process video encoding.
-The audio encoding format output by OAC mp3lame is MP3.
-Lameopts CBR: Br = 128 audio attachment option, CBR (constant bit rate) encoding format, and the audio bit rate is 128 BPS (is sufficient for mp3)
-Of rawaudio: the output file is the original audio stream.
-The starting time of the SS audio clip (indicating that the video is captured from 1st minutes to 30 seconds)
-Endpos: 2 minutes 45 seconds the length of the pre-captured audio (indicating that the pre-captured audio length is, the end time can be calculated)
Test. rmvb Input Source File

For example, to capture a video from 1:28:10 ~ For the audio of 1:30:25, the value of the-SS parameter should be 88: 10 (1 hour, 28 minutes equals to 88 minutes ), -The endpos parameter value should be (that is, the difference between the above two time periods), and then the actual parameter value can be substituted into the above command!

The input source file selected in the preceding example is in rmvb format. Of course, multimedia files in formats such as avi and MP4 are also feasible!

-SS parameter usage example:

-Ss 10 starts from 10 seconds
-SS starts from 10 minutes and 10 seconds
-SS 1:10:10 starts from 1 hour, 10 minutes, and 10 seconds

-Example of endpos parameter usage:

-The endpos 10 encoding time is 10 seconds.
-The endpos encoding time is 10 minutes and 10 seconds.
-The endpos 1:10:10 encoding time is 1 hour, 10 minutes, and 10 seconds.
-The endpos 10 MB encoded data volume is 10 MB.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.