From 8a48a277edbe4002460899bcca28896eea3feeca Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 30 Jun 2019 17:07:08 +0200 Subject: demux: enable --stream-record for things using timeline Although this is not useful in general, it makes --stream-record work with a certain video streaming service by a large dystopian company. In the general case, this fails because normal muxing can, quite obviously, not handle the segmented metadata in the packets. (There isn't even a file format which could handle these, except possibly mp4.) On the other hand, ytdl merely uses timeline/EDL to emulate DASH streaming (unfortunately), which does not use the segmented stuff, and stream recording will actually work. --- demux/demux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demux/demux.c b/demux/demux.c index 7025d95161..f646158e22 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -3099,6 +3099,7 @@ static struct demuxer *open_given_type(struct mpv_global *global, struct demuxer_params params2 = {0}; params2.timeline = tl; params2.is_top_level = params && params->is_top_level; + params2.stream_record = params && params->stream_record; sub = open_given_type(global, log, &demuxer_desc_timeline, NULL, sinfo, ¶ms2, DEMUX_CHECK_FORCE); @@ -3111,6 +3112,7 @@ static struct demuxer *open_given_type(struct mpv_global *global, in->seekable_cache = false; in->min_secs = 0; in->max_bytes = 1; + in->enable_recording = false; } if (in->seekable_cache && opts->disk_cache) { -- cgit v1.2.3