Downloading a youtube video and extracting only the audio
Chris Lemire
good_bye300 at yahoo.com
Thu May 1 07:33:42 UTC 2008
I succesfully downloaded a youtube video in .flv
format after lots of googling. However following
directions to extract the audio has not worked
for me with no obvious reasons to me why. I checked
the video I download with VLC. It does have
audio.
Here's what I've tried to extract the audio. On
other places on the net, I saw the same two
commands working for others. Here's the video.
http://www.youtube.com/watch?v=Ejb8QOyjz-E&
In order to get the video.flv, I did some tricky
stuff with wget I found from google that worked!
I just wished extracting the audio was as easy.
Here's how I did it.
http://www.go2linux.org/wget-to-download-youtube-videos
Attempt #1
[chris at 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.
Playing video.flv.
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)
[chris at localhost tmp]$
Attempt #2
[root at localhost tmp]# ffmpeg -i video.flv -f mp3
-vn -acodec copy carsounds2.mp3
FFmpeg version SVN-r10703, Copyright (c)
2000-2007 Fabrice Bellard, et al.
configuration: --prefix=/usr
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64
--shlibdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--extra-cflags=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic --enable-liba52
--enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libogg
--enable-libtheora --enable-libvorbis --enable-libxvid
--enable-libx264 --enable-pp --enable-pthreads
--disable-static --enable-shared --enable-gpl
--disable-debug --disable-opts --disable-strip
libavutil version: 49.5.0
libavcodec version: 51.45.0
libavformat version: 51.14.0
built on Oct 18 2007 03:18:27, gcc: 4.1.2
20070925 (Red Hat 4.1.2-31)
Seems stream 0 codec frame rate differs from
container frame rate: 1000.00 (1000/1) -> 25.00
(25/1)
Input #0, flv, from 'video.flv':
Duration: 00:09:58.7, start: 0.000000, bitrate:
56 kb/s
Stream #0.0: Video: flv, yuv420p, 320x240,
25.00 fps(r)
Stream #0.1: Audio: mp3, 22050 Hz, mono, 56
kb/s
Output #0, mp3, to 'carsounds2.mp3':
Stream #0.0: Audio: libmp3lame, 22050 Hz, mono,
56 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 4188kB time=598.8 bitrate= 57.3kbits/s
video:0kB audio:4188kB global headers:0kB muxing
overhead 0.000746%
[root at localhost tmp]#
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you.
Christopher Lemire <christopher.lemire at gmail.com>
SKYPE: fakie_flip
AIM: good bye300
IRC: linux_user400354
LQ FORUMS AND YIM: fakie_flip
GTALK, JABBER AND MSN: recursivequicksort at jabber.org
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080501/20767978/attachment.html>
More information about the ubuntu-users
mailing list