给定MPEG DASH .mpd URL,是否可以通过youtube_dl压缩所有媒体片段? [英] Given a MPEG DASH .mpd URL, is that possible to down all media segments through youtube_dl?

查看:234
本文介绍了给定MPEG DASH .mpd URL,是否可以通过youtube_dl压缩所有媒体片段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找MPEG DASH下载器,而youtube_dl恰好击中了我。

I'm looking for a MPEG DASH downloader and youtube_dl just hit on me.

给出一个。mpd URL ,是否可以使用youtube_dl下载所有媒体片段?

Given a .mpd URL, is that possible to use youtube_dl to download all media segments then?

推荐答案

要下载所有视频和音频片段并将其复用到单个文件中,请调用 youtube-dl 因此:

To download all video and audio segments and mux them into a single file, call youtube-dl thus:

youtube-dl -f bestvideo+bestaudio http://URL/TO/manifest.mpd

选项 -f< id1> [,< id2>] ... 用于选择哪个流(或多个流) )保存的细分。在此示例中, -f bestvideo + bestaudio 使youtube-dl仅保存最佳的视频和音频流。有关详细信息和更高级的信息,请参见格式选择语法。格式选择器。为了发现可用的流,请使用 youtube-dl -F http://URL/TO/manifest.mpd

The option -f <id1>[,<id2>]... is used to select which stream (or streams) of segments to save. The -f bestvideo+bestaudio in this example makes youtube-dl save only the best video and audio streams. See format selection syntax for details and more advanced format selectors. In order to discover the available streams, use youtube-dl -F http://URL/TO/manifest.mpd.

为了将视频和音频流混合(合并)为一个文件,您必须具有 FFmpeg 或<系统中安装的href = https://libav.org/ rel = noreferrer> libav 。否则,youtube-dl将为每个流生成一个单独的文件(在我的示例中,一个用于音频,一个用于视频)。

In order to mux (merge) video and audio streams into a single file, you must have FFmpeg or libav installed in your system. Otherwise, youtube-dl will produce a separate file for each stream (in my example, one for audio and one for video).

如果未选择显式格式,则默认值为 -f bestvideo + bestaudio / best 。 Youtube-dl将自动选择最佳的视频和音频,如果没有单独的纯视频或纯音频流,则将选择同时包含视频和音频的最佳流。

Without explicit format selection, the default is -f bestvideo+bestaudio/best. Youtube-dl will automatically select the best video and audio, and if there are no separate video-only or audio-only streams, the best stream that contains both video and audio is selected.

youtube-dl http://URL/TO/manifest.mpd

此默认值自版本2015.04.26起使用。在此之前(或者如果指定了 -o-,从而使youtube-dl将输出写入stdout),则默认值为 -f best ,忽略仅视频和仅音频流。当单独的视频和音频的质量比同时具有两者的流的质量差时,您可能希望明确指定 -f best

This default is used since version 2015.04.26. Before that (or if -o - is specified, making youtube-dl write output to stdout), the default was -f best, ignoring the video-only and audio-only streams. You may want to specify -f best explicitly when separate video and audio have worse quality than a stream that has both.

这篇关于给定MPEG DASH .mpd URL,是否可以通过youtube_dl压缩所有媒体片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆