「Yt-dlp」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(言語間リンクを追加)
(→‎インストール: 記事を追加(英語版より))
13行目: 13行目:
 
== インストール ==
 
== インストール ==
   
{{Pkg|youtube-dl}} パッケージを[[インストール]]してください。もしくは {{AUR|youtube-dl-git}} で開発版をインストールできます。
+
{{Pkg|youtube-dl}} パッケージを[[インストール]]してください。もしくは {{AUR|youtube-dl-git}} で開発版をインストールできます。It is recommended to also install [[FFmpeg]] as it is used for muxing for some sites. See the optional dependencies.
  +
  +
Various [https://www.reddit.com/r/youtubedl/wiki/info-forks forks] of youtube-dl also exist and may contain additional features, in particular {{AUR|youtube-dlp}} adds support for more sites, downloading comments, improvements to format preferences, and other changes. {{AUR|youtube-dlc}} is another fork with many of the aforementioned new features. There are also various [https://www.reddit.com/r/youtubedl/wiki/info-guis graphical frontends] to youtube-dl and/or its forks, such as {{AUR|tartube}} and [https://github.com/oleksis/youtube-dl-gui yt-dlg] ({{AUR|youtube-dl-gui-git}}).
   
 
== 使用方法 ==
 
== 使用方法 ==

2021年10月13日 (水) 11:39時点における版

関連記事

youtube-dl は1000以上のウェブサイトから動画・音声を簡単にダウンロードできるコマンドラインプログラムです。詳しくは サポートされているサイト一覧 を参照。

インストール

youtube-dl パッケージをインストールしてください。もしくは youtube-dl-gitAUR で開発版をインストールできます。It is recommended to also install FFmpeg as it is used for muxing for some sites. See the optional dependencies.

Various forks of youtube-dl also exist and may contain additional features, in particular youtube-dlpAUR adds support for more sites, downloading comments, improvements to format preferences, and other changes. youtube-dlcAUR is another fork with many of the aforementioned new features. There are also various graphical frontends to youtube-dl and/or its forks, such as tartubeAUR and yt-dlg (youtube-dl-gui-gitAUR).

使用方法

youtube-dl(1)man ページを見てください。例:

$ youtube-dl [OPTIONS] URL

フォーマットの選択

複数のフォーマットが選択できる場合、youtube-dl はデフォルトで一番良いフォーマットをダウンロードします。ダウンロードするフォーマットを指定したい場合、まず利用可能なフォーマットを確認してください:

$ youtube-dl -F URL

ダウンロードしたいフォーマットのコードを覚えたら、以下のコマンドを実行:

$ youtube-dl -f format URL

上記の方法で音声のみ・動画のみフォーマットでダウンロードすることもできます。FFmpeg をインストールしていれば、動画のみ・音声のみフォーマットをダウンロードしてから、ひとつのファイルにまとめることができます:

$ youtube-dl -f video_format+audio_format URL

音声の抽出

音声のみをダウンロードしたい場合は -x を使います (FFmpeg が必要):

$ youtube-dl -x -f bestaudio URL

設定

システム全体の設定ファイルは /etc/youtube-dl.conf で、ユーザー個別の設定ファイルは ~/.config/youtube-dl/config です。

構文はシンプルで1行ずつコマンドラインオプションを指定します。使用できるオプションについては youtube-dl(1)man ページを参照してください。設定例:

~/.config/youtube-dl/config
# Save in ~/Videos
-o ~/Videos/%(title)s.%(ext)s

# Prefer 1080p or lower resolutions
-f (bestvideo[height<=1080]/bestvideo)+bestaudio/best[height<=1080]/best

ヒントとテクニック

ダウンロード速度の改善

一部のウェブサイトはダウンロード速度を制限しています。マルチ接続ダウンロードをサポートしている外部ダウンローダ、Aria2 を使うことでダウンロード速度を向上させることができます。例:

$ youtube-dl --external-downloader aria2c --external-downloader-args '-c -x 5 -k 2M' URL

トリミング

DASH 動画の一部を youtube-dl -g -f format URL の出力を使って ffmpeg-ss, -t, -c copy オプション で入力することでダウンロードできます。

参照