LinuxQuestions.org
Review your favorite Linux distribution.
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 01-07-2007, 08:00 PM   #1
Four
Member
 
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
convert mpg to mp3


I have mplayer, and preferably a solution using it (if it supports it)

Is it possible to convert a video file (mpg) to just audio (mp3) so I can put it on my mp3 player?

Thank you
 
Old 01-07-2007, 09:10 PM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Quote:
Originally Posted by Four
I have mplayer, and preferably a solution using it (if it supports it)

Is it possible to convert a video file (mpg) to just audio (mp3) so I can put it on my mp3 player?

Thank you
What type of mpg file you have...I am not sure if this will work but the trick below is the one that I use to grab only mp3 file from the video file.

Code:
ffmpeg -i video-file.mpg -ar 44100 -ab 128 -f mp3 audio-track.mp3
Adjust -ab option accordingly, this is actually the bitrate. If you don't set it it will take default value of 64kbps.

refer man ffmpeg for more info and few examples.
 
Old 01-07-2007, 09:37 PM   #3
Ynot Irucrem
Member
 
Registered: Apr 2005
Location: Perth, Western Australia
Distribution: Debian
Posts: 233

Rep: Reputation: 30
mplayer/mencoder can't create audio-only files, but you can dump the audio stream to WAV:
Code:
mplayer somefile.mpg -ao pcm:file=somefile.wav:fast
and then convert it with something else:
Code:
lame somefile.wav somefile.mp3
(you should be using OGG!!!)
 
Old 01-07-2007, 10:02 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
mplayer can output to just audio. You need to include frameno.
 
  


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
convert realplayer file (.rm) to .mpg? crick Linux - Software 3 03-23-2006 07:04 PM
converting to mpg using convert dovkruger Programming 5 10-10-2005 10:29 AM
Convert mpg to avi (xvid) ? bomix Linux - Software 4 03-10-2005 04:53 PM
convert divx to mpg/svcd citrus Linux - General 2 04-08-2004 06:24 PM
convert avi to mpg jbogins Linux - Software 1 12-28-2003 10:30 AM


All times are GMT -5. The time now is 02:01 AM.

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