Opened 2 years ago
Last modified 20 months ago
#9700 new enhancement
"451 Unavailable For Legal Reasons" instead of just HTTP_OTHER_4XX error
Reported by: | Owyn | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avutil |
Version: | git-master | Keywords: | error |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
HTTP error code for 451 is currently missing from FFPROBE so it just returns HTTP_OTHER_4XX error for it mixing things up and making it impossible to detect when a server is returning 451 for geo-blocked content and not the old-fashioned 403 forbidden
How to reproduce:
ffprobe a geo-blocked iptv channel ( for example - https://strm.yandex.ru/kal/rbc/rbc0.m3u8 )
Expected result:
"Server returned 451 Unavailable For Legal Reasons"
Actual result:
"Server returned 4XX Client Error, but not one of 40{0,1,3,4}"
Change History (5)
comment:1 by , 2 years ago
comment:2 by , 2 years ago
Usecase is sorting online IPTV streams into online \ offline \ geoblocked categories and then making playlists for users based on status,
currently it counts these geoblocked streams as offline due to 4xx error incorrectly so endusers don't get those streams included into their playlists and don't get to play those iptv channels even thought they should be able to:
( https://github.com/iptv-org/iptv/blob/master/scripts/commands/playlist/cleaner.js#L85 )
follow-up: 4 comment:3 by , 2 years ago
So, if you are using it in a script I guess you are parsing the error code:
$ ./ffprobe https://strm.yandex.ru/kal/rbc/rbc0.m3u8 -show_format -show_error ffprobe version N-106634-gbb6ef6d314 Copyright (c) 2007-2022 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) configuration: --enable-openssl libavutil 57. 24.101 / 57. 24.101 libavcodec 59. 26.100 / 59. 26.100 libavformat 59. 22.100 / 59. 22.100 libavdevice 59. 6.100 / 59. 6.100 libavfilter 8. 33.100 / 8. 33.100 libswscale 6. 6.100 / 6. 6.100 libswresample 4. 6.100 / 4. 6.100 [https @ 0x5573b693f640] HTTP error 451 Unavailable For Legal Reasons https://strm.yandex.ru/kal/rbc/rbc0.m3u8: Server returned 4XX Client Error, but not one of 40{0,1,3,4} [ERROR] code=-1482175736 string=Server returned 4XX Client Error, but not one of 40{0,1,3,4} [/ERROR]
But then the only solution would be to add a specific error code for the 451 error.
Do you confirm?
comment:4 by , 2 years ago
Replying to Stefano Sabatini:
But then the only solution would be to add a specific error code for the 451 error.
Do you confirm?
Yes, the result from ffprobe is being used and it doesn't give a specific error for 451, it gives 4xx instead currently.
I came here to propose to add a specific error code for the 451 error.
I confirm.
comment:5 by , 20 months ago
Component: | ffprobe → avutil |
---|---|
Keywords: | 451 4XX removed |
Priority: | normal → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
The result is technically correct:
since at the end this is a 4XX error (and there is no more specific error code for HTTP 451 error, although the log from the HTTPS implementation will show the error.
What is your use case?