LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-29-2005, 10:12 AM   #1
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Rep: Reputation: 37
Questions about extracting audio from a movie


I wanted to extract audio from a movie to use as a soundtrack of sorts. For some movies, the obvious ones being Eddie Murphy's Delirous and the less obvious ones being Snatch, my wife and I love repeating the lines over and over again. They make us laugh and I'd like to burn an audio CD for our car so that we can listen to these movies over and over. Hours of research on google pointed me to mencoder.

I wanted to test on a small file so I picked Luxo Jr from Pixar. I had already ripped to mpeg before on windows so I typed the following:

Code:
mencoder Luxo_Jr.mpg -oac mp3lame -lameopts br=128:cbr:vol=3 -ovc frameno -o Luxo.mp3
After about 2 minutes (if that much) the file had been output. The program complained a little about lack of a frameno.avi (what it normally calls an audio extract), but I played the file in xmms with no problems.

However, when I type

Code:
file Luxo.mp3
I am told

Code:
Luxo.mp3: RIFF (little endian) data, AVI, 352x288, ~30fps, video:, audio:MPEG-1 Layer 3 (stereo, 44100 Hz)
Since a file can be named *.anything in Linux unlike windows where text must be .txt, etc I am worried that since file says this is an mp3 file that I won't be able to use it in my audio CD. Also, mp321 doesn't like the file too much. I am on my laptop and I don't have my external CD-burner with me or I'd just test it now.

Can someone help me either to extract the audio properly or whatever I need to do to be able to burn this onto either a regular audio CD format or an mp3 format that my car's player (which plays mp3s and wmas) will like.

Thanks!
 
Old 08-29-2005, 12:02 PM   #2
DeNayGo
Member
 
Registered: Jun 2005
Location: Aachen, Germany
Distribution: Debian
Posts: 74

Rep: Reputation: 16
I don't think MEncoder is the best program to do that (though it might be possible). I recommend you either use tcextract from Transcode or Avidemux2, whereas I prefer Transcode.

If you decide to use Transcode (which can help you in many situations like that):

tcextract -i movie.avi -x mp3 > soundtrack.mp3

If you got an MPEG file:

tcexract -i movie.mpg -x mp3 | lame --mp2input - soundtrack.mp3

Both should work on your car's MP3 player, but no guaranty.

Last edited by DeNayGo; 08-29-2005 at 12:04 PM.
 
Old 08-29-2005, 12:19 PM   #3
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
Thanks, I'll definitely check that out
 
Old 08-29-2005, 01:42 PM   #4
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
that worked perfectly - freshrpms had the necessary files and dependencies (I chose Transcode)

Thanks a million

If I wanted to change the kbps or the volume of the mp3, would that be from the lame options?

Thanks!
 
Old 08-29-2005, 01:53 PM   #5
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
Ok, I found out how to change the kbps in lame, although nothing about volume. How would I record stereo sound? The sound always seems to be mono.
 
Old 08-29-2005, 03:22 PM   #6
DeNayGo
Member
 
Registered: Jun 2005
Location: Aachen, Germany
Distribution: Debian
Posts: 74

Rep: Reputation: 16
Um... I just tried it with an MPEG file, and the soundtrack is in stereo. Are you sure it's mono? Cause if you're not, just play it with MPlayer, it shows you the channel count.

About changing the volume:
If you use Transcode instead of Lame, you have the option to change the volume. I don't know how exactly to do this, but I think something like

transcode -i soundtrack.mp2 -x null,mpeg2 -s volumegain -o soundtrack.mp3 -y null,lame -b bitrate

should work. Just take a look at man transcode, if it doesn't.

Last edited by DeNayGo; 08-29-2005 at 03:25 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there linux software for extracting/editing audio from a .mpg format movie Rick069 Linux - Software 1 11-10-2005 08:42 PM
some questions:movie player, SK,RU language vasil Linux - Software 0 08-06-2005 12:46 PM
Extracting individual frames as pictures from various movie formats.? rhinomite Linux - Software 0 01-24-2005 06:28 PM
xine and DVD movie audio track Hannes Linux - Software 2 09-23-2003 01:47 PM
MPlayer: Extracting 1 minute from a movie. Obi Perrin Linux - Software 1 12-23-2002 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:20 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
Open Source Consulting | Domain Registration