LoginSignup
4
3

More than 5 years have passed since last update.

youtubeのダウンローダー使い方メモ

Posted at

これ系は昔から色々ありましたが、
やっぱりモダンなソフトウェアはわかりやすくて便利ですね。

これをつかいます

youtube-dl: https://github.com/rg3/youtube-dl
pythonで実装されたyoutubeから動画をダウンロードするためのソフトです

インストール

macなら普通にbrewで入ります

$ brew install youtube-dl

使い方

URLを引数に渡して実行するとダウンロードされます

$ youtube-dl https://www.youtube.com/watch?v=fdLKVMCrzN

よしなに名前をつけてダウンロードできます

  • %(autonumber)s: 連番をつけてくれる
  • %(title)s: 動画タイトル
  • %(ext)s: 拡張子
$ youtube-dl -o '%(autonumber)s-%(title)s.%(ext)s'\
  https://www.youtube.com/watch?v=fdLKVMCrzN

その他にもいろいろなテンプレート変数があります
https://github.com/rg3/youtube-dl#filesystem-options

ダウンロードしたいリストから落とせます

URLのリストが入っているファイル名を渡すと、上から順番にダウンロードしてくれます

$ youtube-dl \
  -a /tmp/youtube-file-urls.txt \
  -o '%(autonumber)s-%(title)s.%(ext)s'
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3