LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-08-2009, 05:53 PM   #1
rokitscintist
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
Convert flv to mp3?


Anyone know of a good simple free application to convert flv files to mp3? I am on fedora 10
 
Old 03-08-2009, 06:04 PM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-14.1 on a Lenovo T61 6457-4XG
Posts: 3,970

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
ffmpeg -i /path/to/video.flv /path/to/song.mp3
 
1 members found this post helpful.
Old 03-08-2009, 06:09 PM   #3
rokitscintist
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Original Poster
Rep: Reputation: 0
is this a url?
 
Old 03-08-2009, 06:14 PM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-14.1 on a Lenovo T61 6457-4XG
Posts: 3,970

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
This is the command to make the conversion. Application's name is ffmpeg.
 
Old 03-08-2009, 06:17 PM   #5
rokitscintist
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Original Poster
Rep: Reputation: 0
sorry i am new to linux- I need very detailed simple instructions
 
Old 03-08-2009, 06:25 PM   #6
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-14.1 on a Lenovo T61 6457-4XG
Posts: 3,970

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
Unfortunately I do not know how to get ffmpeg for Fedora -- I use Slackware. Wait for somebody who knows, look in Fedora documentation or ask Google.
 
Old 03-25-2009, 01:18 PM   #7
creeping death
LQ Newbie
 
Registered: Jun 2008
Distribution: Fedora 10, Minix3 , Plan 9
Posts: 1

Rep: Reputation: 0
if you have a file in /home/you/video/thedoors.flv then we write that as "/path/to/video" that means you must type the path(relative or absolute) to the file that you want to convert and then type the path where you want to save the mp3 file.

so your command would be
open terminal and type
Code:
ffmpeg -i /home/you/thedoors.flv /home/you/music/thedoors.mp3
assuming that you want to save your file in /music directory in your home directory.

but first find if you have "ffmpeg" installed or not.
open terminal and type
Code:
su
yum list ffmpeg*

Last edited by creeping death; 03-25-2009 at 01:26 PM.
 
Old 03-25-2009, 03:26 PM   #8
JaksoDebr
Member
 
Registered: Mar 2009
Distribution: Fedora, Slackware
Posts: 104

Rep: Reputation: 21
On Fedora, after opening a Terminal window (also called shell), you can run
yum install ffmpeg ffmpeg-compat ffmpeg-libs
If you have these already installed, then you will be notified accordingly, otherwise you have to confirm installation by typing 'yes'. Optionally you can also install ffmpeg-compat-devel, ffmpeg-devel.i386 and ffmpeg2theora.

The tricky part of any audio and video entertainment is hidden in the codecs. For legal reasons a default Fedora installation does not provide non-free codecs, but by enabling an alternative package repository for 'yum' (the installation and updater tool) you can get access to those. These are not illegal tools, it's rather that the legal background is prone to interpretation, and the Fedora developers do not want go into unnecessary legal dispute.

One such alternative repository for codecs is livna.org, have a look.

Linux Archive

Last edited by JaksoDebr; 04-02-2009 at 04:58 AM.
 
Old 03-25-2009, 11:51 PM   #9
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
@ rokitscintist

Most flv files are mono with an audio frequency of 22050 Hz. For example, the videos from youtube.com.

You can add these options to ffmpeg to improve the sound.

ffmpeg -i file.flv -f mp3 -ab 128k -ar 44100 -ac 2 file.mp3

-ab is the audio bitrate
-ar is the frequency
-ac is 2 channels or stereo

There are times when we rip the flv file, the volume is low. A better way is to convert the flv file to a wav file, normalize it and then convert the wav to an mp3 file. Example:

ffmpeg -i file.flv -f wav file.wav

normalize file.wav

ffmpeg -i file.wav -f mp3 -ab 128k -ar 44100 -ac 2 file.mp3

If you have many flv files, you can create a for loop shell script and use variables in place of the file(s).
-

- Cheers

Last edited by dv502; 03-25-2009 at 11:55 PM.
 
Old 06-09-2009, 09:08 AM   #10
tomlin
LQ Newbie
 
Registered: Oct 2008
Posts: 15

Rep: Reputation: 0
Hmmmm....

Looks like some "youtube" vids don't convert. While some work fine with:

ffmpeg -i file.flv -f mp3 -ab 128k -ar 44100 -ac 2 file.mp3

others give me MANY lines of:

[flv @ 0xb80794c8]Unsupported video codec (7)
[flv @ 0xb80794c8]Unsupported video codec (7)
[flv @ 0xb80794c8]Unsupported video codec (7)
[flv @ 0xb80794c8]Unsupported video codec (7)
[flv @ 0xb80794c8]Unsupported video codec (7)
[flv @ 0xb80794c8]Could not find codec parameters (Video: 0x0007)
[flv @ 0xb80794c8]Could not find codec parameters (Audio: 0x000a, 44100 Hz, stereo)
File_Name.flv: could not find codec parameters
 
Old 06-09-2009, 09:56 AM   #11
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
You can try this code

mplayer -dumpaudio file.flv -dumpfile file.mp3

Note: The mp3 audio will have the same audio properties as the source file, i.e file.flv

If this doesn't work for those difficult flv files, most likely those flv files are using a codec that ffmpeg and mplayer don't have support for. You can try upgrading both programs from your package manager or get the latest from the svn servers of these programs. Maybe that will fix the problem.

- Cheers

Last edited by dv502; 06-09-2009 at 10:51 AM.
 
Old 06-09-2009, 03:30 PM   #12
tomlin
LQ Newbie
 
Registered: Oct 2008
Posts: 15

Rep: Reputation: 0
mplayer won't even play the file....

I get this.
Code:
.
.
.
.
.
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]Unsupported video codec (7)
[flv @ 0x8836f48]skipping flv packet: type 97, size 7627016, flags 0
[flv @ 0x8836f48]skipping flv packet: type 246, size 9863168, flags 0
[flv @ 0x8836f48]skipping flv packet: type 5, size 7813105, flags 0
[flv @ 0x8836f48]skipping flv packet: type 124, size 12025813, flags 0
[flv @ 0x8836f48]skipping flv packet: type 169, size 3063444, flags 0
[flv @ 0x8836f48]skipping flv packet: type 101, size 13668200, flags 0
[flv @ 0x8836f48]skipping flv packet: type 156, size 169905, flags 0
[flv @ 0x8836f48]skipping flv packet: type 168, size 5268516, flags 0
[flv @ 0x8836f48]skipping flv packet: type 179, size 7864621, flags 0
[flv @ 0x8836f48]skipping flv packet: type 149, size 2268705, flags 0
[flv @ 0x8836f48]skipping flv packet: type 58, size 12194430, flags 0
[flv @ 0x8836f48]skipping flv packet: type 16, size 10618098, flags 0
[flv @ 0x8836f48]skipping flv packet: type 48, size 1477676, flags 0
[flv @ 0x8836f48]skipping flv packet: type 128, size 4929, flags 0
[flv @ 0x8836f48]skipping flv packet: type 212, size 8036935, flags 0
[flv @ 0x8836f48]skipping flv packet: type 210, size 16376733, flags 0
[flv @ 0x8836f48]skipping flv packet: type 13, size 5713925, flags 0
[flv @ 0x8836f48]skipping flv packet: type 253, size 2437295, flags 0
[flv @ 0x8836f48]skipping flv packet: type 10, size 361091, flags 0
[flv @ 0x8836f48]skipping flv packet: type 33, size 2642020, flags 0
[flv @ 0x8836f48]skipping flv packet: type 168, size 6931406, flags 0
[flv @ 0x8836f48]skipping flv packet: type 17, size 6210506, flags 0
[flv @ 0x8836f48]skipping flv packet: type 227, size 12294855, flags 0
[flv @ 0x8836f48]skipping flv packet: type 93, size 7281316, flags 0
[flv @ 0x8836f48]skipping flv packet: type 72, size 8965514, flags 0
[flv @ 0x8836f48]skipping flv packet: type 158, size 5495990, flags 0
[flv @ 0x8836f48]skipping flv packet: type 215, size 13635635, flags 0
[flv @ 0x8836f48]skipping flv packet: type 108, size 2834567, flags 0
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO:  []  0x0  0bpp  1000.000 fps    0.0 kbps ( 0.0 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Cannot find codec matching selected -vo and video format 0x7.
Read DOCS/HTML/en/codecs.html!
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [dmo] Win32/DMO decoders
Win32 LoadLibrary failed to load: wmspdmod.dll, /usr/lib/win32/wmspdmod.dll, /usr/local/lib/win32/wmspdmod.dll
IMediaObject ERROR: 0x88deba9  could not open DMO DLL (0x0 : 0)
ERROR: Could not open required DirectShow codec wmspdmod.dll.
ADecoder preinit failed :(
ADecoder init failed :(
Opening audio decoder: [dshow] Win32/DirectShow decoders
Win32 LoadLibrary failed to load: wmavds32.ax, /usr/lib/win32/wmavds32.ax, /usr/local/lib/win32/wmavds32.ax
Warning: DS_Filter() could not open DirectShow DLL.  (DLL=wmavds32.ax, r=0x9c2657a)
ERROR: Could not open required DirectShow codec wmavds32.ax.
ADecoder preinit failed :(
ADecoder init failed :(
Cannot find codec for audio format 0xA.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Video: no video


Exiting... (End of file)
desktop@ibex:~/Videos$
When playing the video with Totem Movie Player, it shows the video codec is H.264/AVC Video and Audio is AAC.
 
Old 06-09-2009, 06:26 PM   #13
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
It appears mplayer is looking for two codecs wmspdmod.dll and wmavds32.ax from the /usr/lib/win32 directory. I guess this is a clue to where to begin.

Do you have the win32-codecs-all installed on your system? If not, install it and see what happens.


-later

Last edited by dv502; 06-09-2009 at 07:10 PM.
 
Old 06-11-2009, 06:16 PM   #14
tomlin
LQ Newbie
 
Registered: Oct 2008
Posts: 15

Rep: Reputation: 0
Frustrating

Thanks for your help.

I installed w32codecs from the Medibuntu repositories....still nothing. wmspdmod.dll IS in /usr/lib/win32, so I don't know why it can't find it. But, wmavds32.ax is nowhere to be found on the machine.
 
Old 06-11-2009, 06:40 PM   #15
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Try avidemux or WinFF video decoder for a GUI. The first should be available on Fedora, not sure about the second one, though.
 
  


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
How to convert flv files? fireblade_spark Linux - Software 14 05-25-2013 02:22 AM
convert flv file to be played in XP ufmale Linux - Newbie 1 09-13-2008 08:13 PM
Trying to convert from flv to mp4 (for iPod) using mencoder. alkos333 Slackware 6 11-03-2007 02:36 PM
How to convert flv to ipod format? depam Linux - Software 1 10-25-2006 08:21 AM
how do i convert wmv to flv using ffmpeg? farmerjoe Linux - Software 0 11-15-2005 02:20 PM


All times are GMT -5. The time now is 05:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration