WALALA.....為何有這個指令被收錄在 ubuntu 和 rhel EPEL 的套件內勒!!!
安裝 youtube-dl 工具
mtchang@ ~$ sudo apt-get install youtube-dl
[sudo] password for mtchang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libav-tools libavdevice53 libavfilter3 libbs2b0 libgif4 libquvi-scripts libquvi7 libvdpau1
mplayer2 rtmpdump
Suggested packages:
frei0r-plugins nvidia-vdpau-driver vdpau-driver ffmpeg mplayer
The following NEW packages will be installed:
libav-tools libavdevice53 libavfilter3 libbs2b0 libgif4 libquvi-scripts libquvi7 libvdpau1
mplayer2 rtmpdump youtube-dl
0 upgraded, 11 newly installed, 0 to remove and 36 not upgraded.
Need to get 4,766 kB of archives.
After this operation, 14.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
執行擷取某個影音檔
mtchang@~/Videos$ youtube-dl http://www.youtube.com/watch?v=iV8JDbtXZm4
[youtube] Setting language
[youtube] iV8JDbtXZm4: Downloading webpage
[youtube] iV8JDbtXZm4: Downloading video info webpage
[youtube] iV8JDbtXZm4: Extracting video information
[download] Destination: 〈島嶼天光〉(Island's Sunrise)藝術計劃 太陽花學運歌曲-iV8JDbtXZm4.mp4
[download] 100% of 81.57MiB in 00:09
裡面有個功能是可以將抓下來的影片直接透過後製的轉換程式直接轉換成為 mp3
Post-processing Options:
-x, --extract-audio convert video files to audio-only files
(requires ffmpeg or avconv and ffprobe or
avprobe)
--audio-format FORMAT "best", "aac", "vorbis", "mp3", "m4a",
"opus", or "wav"; best by default
--audio-quality QUALITY ffmpeg/avconv audio quality specification,
insert a value between 0 (better) and 9
(worse) for VBR or a specific bitrate like
128K (default 5)
--recode-video FORMAT Encode the video to another format if
necessary (currently supported:
mp4|flv|ogg|webm)
-k, --keep-video keeps the video file on disk after the
post-processing; the video is erased by
default
--no-post-overwrites do not overwrite post-processed files; the
post-processed files are overwritten by
default
--embed-subs embed subtitles in the video (only for mp4
videos)
--add-metadata write metadata to the video file
--xattrs write metadata to the video file's xattrs
(using dublin core and xdg standards)
--prefer-avconv Prefer avconv over ffmpeg for running the
postprocessors (default)
--prefer-ffmpeg Prefer ffmpeg over avconv for running the
postprocessors
作者的網站:http://rg3.github.io/youtube-dl/
詳細的文件請參考這裡:http://rg3.github.io/youtube-dl/documentation.html#d1
沒有留言:
張貼留言