-
Notifications
You must be signed in to change notification settings - Fork 464
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
Quotation marks in VIDEO-RANGE property #289
Comments
Hello @vevv thank your for reporting the problem. |
I think the library currently does the right thing. There's an example playlist with You can see from this snippet that the In [5]: from m3u8 import loads as m3u8_loads
In [6]: m3u8_loads('''#EXTM3U
...: #EXT-X-VERSION:7
...: #EXT-X-INDEPENDENT-SEGMENTS
...: #EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=2778321,BANDWIDTH=3971374,VIDEO-RANGE=SDR,CODECS="hvc1.2.4.L123.B0",RESO
...: LUTION=1280x720,FRAME-RATE=23.976,CLOSED-CAPTIONS=NONE,HDCP-LEVEL=NONE
...: sdr_720/prog_index.m3u8''')
Out[6]: <m3u8.model.M3U8 at 0x7fbe33975850>
In [7]: print(_.dumps())
#EXTM3U
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-VERSION:7
#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,BANDWIDTH=3971374,AVERAGE-BANDWIDTH=2778321,RESOLUTION=1280x720,FRAME-RATE=23.976,CODECS="hvc1.2.4.L123.B0",VIDEO-RANGE=SDR,HDCP-LEVEL=NONE
sdr_720/prog_index.m3u8 |
These playlists in the test suite do seem to have strange trailing quotes; those should probably be removed. |
Thank you @bbayles removed and pushed to master already |
May I close this issue @vevv ? |
Example playlist I've ran into:
SDR is quoted, I suppose this is a faulty playlist then. Still, would be nice to strip it in the library for those cases. |
@vevv cool! I added the |
Greetings, https://github.com/globocom/m3u8/blob/master/m3u8/parser.py#L328 adds I can open a new issue if that's preferred. |
@dlarrick please do it. Thank you! |
According to the specification, this is an enumerated-string property, with SDR, HDR and PQ as valid values. Enumerated strings should not contain quotes, see #285 for string type definitions.
Video range definition:
Easy to fix:
video_range
needs to be added the params passed toremove_quotes_parser
here.The text was updated successfully, but these errors were encountered: