Closed mbeacom closed 8 years ago
@winlinvip I didn't mean for my PR to seem crude! I just noticed the random adjustments as I was looking through your code, while I try to add to the HLS functionality. I'm very eager to see how this project evolves.
I means it's really good PR.
I have merge it to go-oryx and I will merge to SRS. Thanks~ 😄
@mbeacom Do not support HLS in go-oryx, because I find it's possible to support HLS+, which remux the RTMP to HLS on edge(while HLS is remux RTMP on origin).
@winlinvip So, you are transmuxing the RTMP to HLS on the edge? That's great.
Yep, we have done it in our private product, it's ok to transmux on the edge. And we have public the solution(without code), use 302 or variant HLS to redirect the original HLS request to a new url with id. For example, when user request http://server/app/stream.m3u8, redirect to http://server/app/stream.m3u8?id=xxx. And each ts in m3u8 will be suffixed with the query with the id. So we can create a logic stream for HLS, and we can serve it by the same http handle, which transmux the RTMP to HLS.
The HLS+ demo: https://notehub.org/s5qiw
For exmaple, for the first request of HLS:
winlin:srs-plus winlin$ curl http://ossrs.net:8083/show/livestream.m3u8
Redirect to http://ossrs.net:8083/show/livestream.m3u8?shp_uuid=eba98df08622f770e0dcfa9000afcb45&shp_ts=1461293515678&shp_cid=133048
&shp_pid=2465&shp_sip0=182.92.80.26&shp_sip1=182.92.80.26&domain=ossrs.net
We will 302 the request to a new url, then:
winlin:srs-plus winlin$ curl 'http://ossrs.net:8083/show/livestream.m3u8?shp_uuid=eba98df08622f770e0dcfa9000afcb45&shp_ts=1461293515678&shp_cid=133048
&shp_pid=2465&shp_sip0=182.92.80.26&shp_sip1=182.92.80.26&domain=ossrs.net'
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:2
#EXT-X-DISCONTINUITY
#EXTINF:1.527, no desc
livestream-0.ts?shp_uuid=eba98df08622f770e0dcfa9000afcb45&shp_ts=1461293515678&shp_cid=133048
&shp_pid=2465&shp_sip0=182.92.80.26&shp_sip1=182.92.80.26&domain=ossrs.net
&shp_seqno=0
When request the m3u8 with id, all ts suffixed with id, and the ts is generated dynamically for this logical connection
with small duration(1.5s).
Then the second piece:
winlin:srs-plus winlin$ curl 'http://ossrs.net:8083/show/livestream.m3u8?shp_uuid=eba98df08622f770e0dcfa9000afcb45&shp_ts=1461293515678&shp_cid=133048
&shp_pid=2465&shp_sip0=182.92.80.26&shp_sip1=182.92.80.26&domain=ossrs.net'
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:2
#EXT-X-DISCONTINUITY
#EXTINF:1.527, no desc
livestream-0.ts?shp_uuid=eba98df08622f770e0dcfa9000afcb45&shp_ts=1461293515678&shp_cid=133048
&shp_pid=2465&shp_sip0=182.92.80.26&shp_sip1=182.92.80.26&domain=ossrs.net
&shp_seqno=0
#EXTINF:1.530, no desc
livestream-1.ts?shp_uuid=eba98df08622f770e0dcfa9000afcb45&shp_ts=1461293515678&shp_cid=133048
&shp_pid=2465&shp_sip0=182.92.80.26&shp_sip1=182.92.80.26&domain=ossrs.net
&shp_seqno=1
HLS+ provides low latency and the same domain for RTMP and HLS+, it's very useful.
@winlinvip That is FANTASTIC! I just went through all of the documentation that you linked to and provided. Google's translator has come a long way!
Is there anything I can do to help contribute to the project? I don't want to start writing out something that doesn't align with your vision for go-oryx.
Thanks!
@mbeacom I think you can help to correct the English wiki of SRS, which writen by my broken English... You can contact with me by Skype winterserver, and you will know the direction of SRS/oryx. What's about this advise?
@winlinvip That sounds good! Let me know when will work best for you and we can discuss it! Are there any specific sections you'd like me to review in the meantime?
Let's talk on Skype
My Skype is winterserver
Appreciate for your work, thanks and give lots of confidence to me. I hope to improve my English if possible~