unable to extract audio from .flv
Hi,
Well, I don't know if this falls within the purview of this forum. However here it is - I have downloaded a video from youtube which is saved as a .flv file. I am trying to extract the soundtrack as follows - $ mplayer -dumpaudio infile.flv -dumpfile infile.mp3 However, the dumpfile doesn't seem to be an mp3 file as is evident from the output of - $ file infile.mp3 which gives - infile.mp3: \012- Assembler source and this doesn't play in mplayer or any other audio player. How can I set right this? Awaiting your valuable suggestions, |
Is it really an mp3 file? Use mplayer -identify file.flv to check. Does mplayer play the flv file on its own?
Try - mplayer -vo null -vc null -ao pcm:fast:file=audio.wav file.flv This doesn't dump the stream, but decodes it to pcm wav file. |
I use the following 'flash2avi' script:
!#/bin/sh if [ -z "$1" ]; then echo "Usage: $0 {-divx|-xvid} list_of_flv_files" exit 1 fi # video encoding bit rate V_BITRATE=1000 while [ "$1" ]; do case "$1" in -divx) MENC_OPTS="-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect" ;; -xvid) MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect" ;; *) if file "$1" | grep -q "Macromedia Flash Video"; then mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame -lameopts fast:preset=standard -o "`basename $1 .flv`.avi" else echo "$1 is not Flash Video. Skipping" fi ;; esac shift done |
Nice little script!
|
Hi,
Thanks for the prompt reply! Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
Quote:
|
The script posted above wasn't wrapped in code tags and had bbcode enabled.
It should read - Code:
mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame -lameopts fast:preset=standard -o "`basename $1 .flv`.avi" http://slackbuilds.org/repository/12.2/audio/faad2/ I find it quite strange that mplayer can play the original flv file with sound, but can not do a simple dump. As using dumpaudio, and -ao pcm:fast:file=audio.wav is actually no different than playing the file back. Playing the file back it has to be decoded, dumpaudio demuxes without decoding, -ao pcm:$ dumps the decoded stream. If mplayer can play the file, it should be able to dump it. |
Why not just grab video downloader helper for FF from this link -> https://addons.mozilla.org/en-US/firefox/addon/3006 This will download and convert files from youtube with a couple of mouse clicks
|
from MPlayer.SlackBuild
"The Slackware package is built with "USE_PATENTS=NO" i.e. without using the lame mp3, faac, AMR and dvdcss libraries." |
Maybe you could use this:
Code:
$ ffmpeg -i infile.flv outfile.wav |
When the old -dumpaudio failed to work for the .mp4 files, I started using the following script to extract their audio; it seems to work for .flv files as well:
Code:
mplayer -quiet $1 -ao pcm:fast:file=$2 -vc dummy -vo null -channels 2 |
Quote:
Ok! Now this command works and I am getting mplayer-playable .mp3 files. That's a major achievement. Thanks Ilgar! However, I want to upload these mp3s to my Samsung Ultra Touch S8300 mobile. When I do this, and try to play them using the music player app in my mobile, I get the following message - Quote:
|
I'm pretty sure mplayer outputs audio to raw pcm format. I've ripped audio from flv like that. I then use some mp3 encoder to turn it into an mp3.
|
Quote:
Quote:
Quote:
|
Oops yes, I forgot to add, you'll get a wav file that way (as you'll notice from the file size).
|
All times are GMT -5. The time now is 08:56 PM. |