-
Notifications
You must be signed in to change notification settings - Fork 77
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
Standardized m3u8 formatting #229
Conversation
Is there any way I can get the file size for each torrent? |
What do you mean? Through http API? Must be in one of the stats endpoints, /torrents/id/stats/v1 if I remember correctly (on phone) |
the |
Build playlist content is called from the iterator iter_filenames_and_lengths, the second item there is length in bytes |
That's not what it is though, it's not HTTP live streaming streaming, just a playlist with links . See https://en.m.wikipedia.org/wiki/M3U So at best you can add #EXTBYT There's no length in seconds, rqbit doesn't understand video/audio formats and their details. Streaming is done through range header (bytes) and a lot of clients are fine with this. So not sure what is it breaking, it's just probably not what you think it is? |
My bad! I got the file size and video length mixed up. Currently it still breaks Hls.js which is a fairly popular HLS player on the web. |
Got it. It's not HLS though which afaik needs specially crafted input, full files aren't enough |
It is possible to split each file into segments relatively easily. Segments consist of .ts files which afaik are quite literally just chunked mpeg files (would be basically the same as what you're already doing just with a different file extension). I'll try to implement this in another PR if I can get some help |
Actually this is might be more complicated and require FFmpeg. Which might add extra bloat. Probably should make this a feature flag called "pure-hls" or something |
Currently you're breaking the m3u8 standard and it breaks some media players. Adding the
#EXTM3U
tag should fix it.There is more information that would be best practice to add but I don't know how to add it. Please read the m3u8 spec or the wiki for more information.