Open Lieta2 opened 6 months ago
A manifest (like the m3u8 here) may not be downloadable outside the context of the site from which it was captured. It may be time-limited, or require additional HTTP headers, such as Referer, Origin, Authorization or cookies. Ideally, some one would write an extractor for replay.lsm.lv.
But in this case, there seems to be a problem with the manifest itself, or with our parsing of it. It looks like yt-dl thinks the video formats are actually combined (hence the (best)
label in the format listing.
I think that the replay.lsm.lv videos may be geo-restricted so I can't easily test this.
Please install the the nightly build, which should improve your yt-dl experience in other ways. List the formats for a new m3u8. If you now get the video formats marked video only
, try your original command with the new manifest.
Otherwise (if the result is the same) try
-f best+bestaudio
to merge the video and audio.-f best,bestaudio
and then merge the resulting video and audio manually.Substitute specific format IDs to get other than best...
And do let us know what happened either way.
-f best+bestaudio
works as expected. Thanks.
I think "... as hoped" would be more like it.
If you could save the text of one of these manifests with video-only formats that weren't tagged video only
and attach it to the issue, we could investigate why the video formats weren't tagged video only
(combined is the default).
The manifest looks like this:
#EXTM3U
#EXT-X-VERSION:4
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="grp2",LANGUAGE="lav",NAME="Latvian",DEFAULT=NO,AUTOSELECT=NO,URI="chunklist_b384000_ao_sllav_t64TGF0dmlhbg==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="grp1",LANGUAGE="lav",NAME="Latvian",DEFAULT=NO,AUTOSELECT=NO,URI="chunklist_b192000_ao_sllav_t64TGF0dmlhbg==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="grp0",LANGUAGE="lav",NAME="Latvian",DEFAULT=NO,AUTOSELECT=NO,URI="chunklist_b96000_ao_sllav_t64TGF0dmlhbg==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="grp2",LANGUAGE="eng",NAME="English",DEFAULT=NO,AUTOSELECT=NO,URI="chunklist_b384000_ao_sleng_t64RW5nbGlzaA==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="grp1",LANGUAGE="eng",NAME="English",DEFAULT=NO,AUTOSELECT=NO,URI="chunklist_b192000_ao_sleng_t64RW5nbGlzaA==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="grp0",LANGUAGE="eng",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="chunklist_b96000_ao_sleng_t64RW5nbGlzaA==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc"
#EXT-X-STREAM-INF:BANDWIDTH=4550000,NAME="HD_5000",RESOLUTION=1920x1080,AUDIO="grp2"
chunklist_b4550000_vo_sleng_t64SERfNTAwMA==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc
#EXT-X-STREAM-INF:BANDWIDTH=2200000,NAME="HD_2500",RESOLUTION=1280x720,AUDIO="grp1"
chunklist_b2200000_vo_sleng_t64SERfMjUwMA==.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc
#EXT-X-STREAM-INF:BANDWIDTH=950000,NAME="SD",RESOLUTION=640x360,AUDIO="grp0"
chunklist_b950000_vo_sleng_t64U0Q=.m3u8?RUBRor5Op2vBCO3wtfMAwQfOvF4ivoe9Bpsu_uoHwImm1H35G32AlN3a3k2bR1zZ4xMObtqVq6VXoIYsPSHyiGKMIXqH9Mb5KEqd5MbstrcmPLfPbEgOk8wBe-m5tXRU2x50Uyy_ee6pc5oLQpscXK4qGcKYXJ51A0yjukcfySFbs7K-8vIaeTqTw1ADZEx7dZ0ZugofCEFoFkZVKaLUxbEgYdCU7ORwBTarEroc
Where can I download nightly builds from?
For nightly builds, see #30839, but https://github.com/ytdl-org/yt-dl-nightly/releases.
Thanks for the manifest, which is very helpful. I've documented the problem below. You could unsubscribe the issue if you don't care about these details.
Logically, if a stream described by an #EXT-STREAM-INF
line has an AUDIO
attribute that references the GROUP-ID
of an #EXT-X-MEDIA:TYPE=AUDIO
line, the stream should be video-only, but according to the specification (quoted below) there must also be a CODECS
attribute, missing in the problem manifest.
From dstftw's comment in the _parse_m3u8_formats()
code, there was a deliberate choice to ignore the AUDIO
group in the #EXT-STREAM-INF
lines because we can't be sure whether a non-conforming line defines a combined or video-only format ([2]
is #12211):
# As per [1, 4.3.4.1.1] any EXT-X-STREAM-INF tag which
# references a rendition group MUST have a CODECS attribute.
# However, this is not always respected, for example, [2]
# contains EXT-X-STREAM-INF tag which references AUDIO
# rendition group but does not have CODECS and despite
# referencing an audio group it represents a complete
# (with audio and video) format. So, for such cases we will
# ignore references to rendition groups and treat them
# as complete formats.
Apparently there's no way to process such degenerate lines (with no CODECS
) that would work for this manifest and also handle the case in #12211. But that site no longer exists in the same form (toggle.sg became mewatch.sg, and if I recall correctly it uses a different video host) and perhaps they've fixed the manifests. It might be safe to change the work-around to favour the more likely case here. Or, we could make the code that should set video-only depend on a flag set on the extractor class so that an extractor for a broken site can force the existing behaviour (or add a new kwarg).
This code is the same in yt-dlp, attributed to inactive (?) devs shirt-dev and Lesmiscore: @pukkandan, @bashonly.
Related: https://github.com/yt-dlp/yt-dlp/pull/5924 and linked issues
attributed to inactive (?) devs shirt-dev and Lesmiscore:
If you are looking at git-blame, it's just the code being moved around
I assumed so and did not @ them. But does anyone have a view about which hack would be better in future?
Verbose log
Description
The downloaded file contains only video, no audio. If the link times out, please, take m3u8 from here