Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I would like to extract the audio from a youtube (.flv) file without re-encoding it. When I play the video with mplayer and watch the console (text) output I see that the audio is in mp3 form. Despite this, I cannot extract that to an mp3 file (attempts using mencoder and also with transcode). I can use transcode to extract the audio but only in a way converts it to PCM ... which is not what I want.
By the way, extracting just the video part (no sound) in copy-mode (not-re-encoding) is easy:
mencoder -of avi -nosound -ovc copy in.flv -o out_just_vid.avi
[chris@localhost tmp]$ mplayer -dumpaudio video.flv
MPlayer 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (Family: 15, Model: 43, Stepping: 1)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [FLV1] 320x240 0bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
Core dumped ;)
Exiting... (End of file)
Dumping only the video has worked, but that's not what I want. Please help.
Fakie_Flip: The video you posted is an mp4 file and not a flash video. It uses aac codec rather than mp3.
I was able to extract the audio easily with: ffmpeg -i Ultimate_Car_Sounds__Part_II.mp4 -vn -acodec copy ucs.m4a
I could have transcoded it to another audio format/codec.
Generally I will first play the source with "ffmpeg -identify <video_file>" and study the text output for what make up the video and audio streams. You can't go by the extension. It just indicates the container.