New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Broken] HLS: acodec of video+audio format not detected correctly (rai livestream) #887
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
the problem seems to be that the server block the request if you request 2 formats at the same time: bestvideo+bestaudio fails as reported. If you only request one: bestvideo or bestaudio it works. The video stream contains audio as well so bestvideo+bestaudio is not necessary. Just do bestvideo and you get the best video stream available. |
yt-dlp seems to think that there is no single format with audio+ video. Can you show me the output of @rgabbo Please confirm whether you can work around the issue by simply using |
yup, for some reason doing |
|
Can you attach the m3u8 manifest? so that I can check if there is any indication in it that the video file has an audio stream as well. If there isn't, we'll need to modify the extractor to identify that information. PS: Actually, it would be helpful if you could also attach the other dumps from |
@pukkandan put the 3 files on gist relinker, manifest and json... https://gist.github.com/nixxo |
This is the code that causes the acodec to be not detected. cb25208#diff-e6b715b175e7a7cdb8d0e39768a0053464cd32ab39166c5eccd24b831f111021R1460-R1479 I don't quite understand it, so not sure how to fix the issue PS: Test with this URL to be not geo-blocked https://gist.githubusercontent.com/nixxo/35bcf438c904df7492f5a38e69a23828/raw/2a721ef52b5859b8909dc134382ce3a19cc1bffe/rai1_https_-_raiuno1-live.akamaized.net_hls_live_598308_raiuno1_raiuno1_playlist_ma.m3u8 |
@pukkandan the problem is this line: yt-dlp/yt_dlp/extractor/common.py Line 2207 in 6993f78
It basically removes the written by @shirt-dev in this commit 310c2ed and the lines before are:
but this check is still to be written and so it erases the removing this line fixes the problem, but of course it will create it in other m3u8 manifest I guess... |
Same issue in #1931 |
…anifest - fixes yt-dlp#887 A+V stream getting recognized as only V - fixes yt-dlp#2918 and ytdl-org/youtube-dl#27830 only V stream getting recognized as A+V - added tests in test_InfoExtractor with the 2 manifest from the issues
I wrote this script to work around this issue, until it is fixed. Also related to #9154
|
Reposting my comment from the previous issue #9154 when using the updated Using Nightly I can confirm the same problem where yt-dlp only results in the video stream. @nixxo is it possible to update Some example logs of previously working videos if you need them: Example 1
Example 2
|
I can confirm that with #5924 , yt-dlp correctly identifies this malformed? m3u8 as video only and therefore the merge works. yt-dlp -F https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html yt-dlp -g -f hls-1800+hls-aac-Italiano https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html undo: |
Reading through this PR, I don't see any reasons not to merge this. At the very least, we can add it only to the RAI extractor if you're concerned about it inadvertently breaking any other the extractors. |
as @nixxo suggests, it would be better to use a regex, in rai.py, that search like |
@nixxo, what do you think, can you add that regex to rai.py? As it currently stands the rai.py extractor is effectively broken without it. |
This weekend I'll give it a look and see what is possible to do. |
That is because the fix is done in the RAI extractor and not in the common extractor. |
@maxcanna that's what #5924 tries to do. The solution to this problem in both #9291 and #5924 is to assume video- or audio-only formats based on URL patterns (rather than any sort of HLS spec). This is fine to do with a single extractor like rai, which is why #9291 was merged, but IMO it is too risky to do so with every m3u8 |
you can use the #5924 branch |
yt-dlp --update-to bashonly/yt-dlp@malformed |
Closes yt-dlp#887 Authored by: nixxo
Checklist
Verbose log
Description
Trying to download a livestream using yt-dlp on raiplay.it but error occurs. VOD links work as intended.
The text was updated successfully, but these errors were encountered: