- 下載影片檔
- 分離聲音
[email protected] $ emerge -pv youtube-dlThese are the packages that would be merged, in order:Calculating dependencies… done! [ebuild R ] net-misc/youtube-dl-2008.03.08 0 kBTotal: 1 package (1 reinstall), Size of downloads: 0 kB
[email protected] ~ $ youtube-dl -o d845.flv http://www.youtube.com/watch?v=BZCPXIJFx0I Retrieving video webpage… done. Extracting URL "t" parameter… done. Requesting video file… done. Video data found at http://ash-v68.ash.youtube.com/get_video?video_id=BZCPXIJFx0I&signature=27D3BCAEC641F06E98A39CEC8A429D4BEAEBC5E7.1AF526B637EF1BD00232E50D2900D9B15823FB8E&ip=220.130.11.7&ipbits=16&expire=1206142302&key=yt1&sver=2 Retrieving video data: 100.0% ( 8.89M of 8.89M) at 158.31k/s ETA 00:00 done. Video data saved to d845.flv [email protected] ~ $ ffmpeg -i d845.flv d845.mp3 .... Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001) Input #0, flv, from 'd845.flv': Duration: 00:03:48.3, start: 0.000000, bitrate: 8 kb/s Stream #0.0: Video: flv, yuv420p, 320x240, 29.97 fps(r) Stream #0.1: Audio: mp3, 22050 Hz, mono, 8 kb/s Output #0, mp3, to 'd845.mp3': Stream #0.0: Audio: libmp3lame, 22050 Hz, mono, 64 kb/s Stream mapping: Stream #0.1 -> #0.0 Press [q] to stop encoding size= 1785kB time=228.4 bitrate= 64.0kbits/s video:0kB audio:1784kB global headers:0kB muxing overhead 0.001751%
[email protected] ~ $ mplayer -dumpaudio -dumpfile mplayer.mp3 d845.flv
[email protected] ~ $ ls -al *.mp3 -rw-r--r-- 1 ada users 1827349 2008-03-22 01:40 d845.mp3 -rw-r--r-- 1 ada users 1694539 2008-03-22 01:41 mplayer.mp3 [email protected] ~ $ file d845.mp3 d845.mp3: Audio file with ID3 version 24.0 tag, MP3 encoding [email protected] ~ $ file mplayer.mp3 mplayer.mp3: MPEG ADTS, layer III, v2, 8 kBits, 22.05 kHz, Monaural