View Full Version : How to play sound from .flv video?

2007-09-26, 13:25
I have .flv video (downloaded from YouTube) that I'd like to play the sound of with my Squeezebox, but I don't have a conversion target for .flv in convert.conf.

What should I add there to convert the file to something that can be played?

2007-09-26, 14:02
An alternative would be to extract the audio into a separate file. Use something like:

mplayer -dumpaudio -dumpfile file.mp3 file.flv

Note that this literally just dumps the audio track, so if some other audio encoding x is used, you would get an audio file encoded as x.


2007-09-26, 23:56
That doesn't work, since mplayer dumps core on me when I try your method. This is even more annoying since just running mplayer on the flv file shows the video with sound playing OK.

When mplayer dies, it says "libavformat file format detected", then prints a line about video (size, bpp, fps, kbps, etc -- it's on a different computer so I can't easily cut'n'paste), and then dumps core.

MPlayer 2:1.0-rc1-0ubuntu9

2007-09-27, 00:18
Are you sure about mplayer not finishing the task - if there is a smiley (i.e. "Core dumped :)" ) after the message then it means it succeeded. It's was an mplaye "joke" as you asked to dump a file.

If mplayer has really crashed then as long an mplayer can play the flv you could try this. It will output a 2 channel WAV file called output.wav. This can be converted using Flac ro Lame to a compressed form.

mplayer -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=output.wav input.flv

2007-09-27, 00:44
Ah, indeed. That's one of the least useful messages I've seen from a program in a good while...