LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2011, 02:26 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Rep: Reputation: 49
extract audio from video file using mencoder


I ran
Code:
mencoder The.Negotiator.mkv -of rawaudio -oac mp3lame -ovc copy  -o sound-mencoder.mp3
I got a 195.3MB mp3 file

WHILE
using
Code:
ffmpeg -i The.Negotiator.mkv sound.mp3
I get 64.9MB file.

If I analyse both file i see
Code:
file sound-*
sound-ffmpeg.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1,  64 kbps, 48 kHz, JntStereo
sound-menc.mp3:   MPEG ADTS, layer III, v1,  32 kbps, 48 kHz, JntStereo
How can I get smaller audio file using mncoder ?

Last edited by sumeet inani; 02-02-2011 at 02:27 AM.
 
Old 02-02-2011, 02:41 AM   #2
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Original Poster
Rep: Reputation: 49
I have tried
Code:
mencoder input.mkv -dumpaudio -dumpfile sound.mp3
Then I read in man page "dumpaudio works for MPEG/AC3 only"

I also found this formula to calculate video bitrate for making dvdrip
Code:
bitrate(in Kb/s) = (target_size_in_Mbytes - sound_size_in_Mbytes) * 1024 * 1024 / length_in_secs * 8 / 1000
I found that
sound_size should be obtained from mencoder result that is 195MB not mp3 which is compressed.
How can I get smaller audio file from video using mencoder ?

Last edited by sumeet inani; 03-06-2011 at 11:19 PM.
 
Old 03-29-2011, 09:03 AM   #3
RedNeck-LQ
Member
 
Registered: Jan 2011
Posts: 83

Rep: Reputation: 11
You can experiment with bitrate values to ffmpeg with the -ab switcn
Example

ffmpeg -i The.Negotiator.mkv -ab 96k sound.mp3

The lower the bitrate, the lower the file size will be, but audio quality becomes degraded.

Lower bitrates are good for audio that is talk.
Higher bitrates over 128k is best for music.

Another option is use the -fs switch, a file size limit. you choose how big you want the file to be. The example below will create a 5MB file.

ffmpeg -i The.Negotiator.mkv -fs 5000000 sound.mp3

Last edited by RedNeck-LQ; 03-29-2011 at 09:17 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a video with 1 jpeg plus audio with mencoder slothpuck Linux - Software 1 08-01-2013 12:57 PM
ffmpeg and mencoder slice mp4 video audio out of sync lindylex Linux - Software 5 01-10-2010 04:26 AM
Mencoder muxing problem with audio/video desynch hate29 Linux - Software 1 02-04-2009 02:14 AM
Recording Video and Audio using mencoder OR13 Linux - Desktop 3 01-19-2007 05:19 PM
extract video audio Latem Linux - Software 0 02-05-2005 06:07 PM


All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration