-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Live streaming #3250
Live streaming #3250
Conversation
d78ea0e
to
8ecbab8
Compare
3e279dc
to
1a98020
Compare
hls.js seems to not correctly handle audio gaps with fragmented mp4 (but can with a ts playlist)
Description updated. |
@Chocobozzz hi. been waiting for the PR but the screenshot does not show "unlimited" in duration. does this mean we cannot have like the nasa livestream yet which is 24x7 live and does not require saving ?. |
Yes there is an unlimited option for every constraint field (lives per instance/user and duration) |
@Chocobozzz max live duration does not show unlimited in the label like it does for two inputs above it. maybe that text was missed ? |
Because it's a select that has the unlimited option, whereas the previous inputs are number fields. Merging to avoid package.json/yarn.lock conflicts. Feel free to comment even if this PR is closed. |
Hi @Chocobozzz thanks and congrats for all the work and this well documented PR. As I understand, the live use HLS player and transcoder. So we can't have an audio only live ?
I think it could be a good thing, since live can be very expensive for the server when transcoding is enabled.
It could also be an interesting feature, we may want to have multiple type of creators (streamers, podcaster, vlogger...)
It may be a good idea for a next PeerTube version ? If the live feature has new sub-features I think, we need take that path. |
@kimsible it is possible, HLS being already usable for audio-only videos anyway. I guess it has more to do with the fact we consider PeerTube to be for streaming videos first and foremost, and thus didn't consider radios at all in our interviews. |
Thanks for the details @rigelk.
This is hard to receive this argument though PeerTube can upload audio files (mp3, wav, ogg, ...). Even if audio files are put in a MP4 container, there is no video track or just a small 480p for video with cover. This option should be available because, the live is something that requires lots of resources, some instances might limit the live for only audio and a cover for example. But maybe, I didn't use the right term it's more podcast than « radio », I didn't meant a constant feed like we see on YouTube, just a short live but audio only, with eventually a cover. |
Hello, awesome work! How effective is the P2P media sharing? I imagine that the more delayed the stream is, the more effective it is because more peers will have the media but no one wants a delayed "live" stream, so availability of media is concentrated on the PeerTube instance which means the effectiveness of P2P media sharing is much worse. Is that correct? Does PeerTube intentionally delay viewers for more P2P media sharing effectiveness? I think for more effectiveness one must create another protocol for P2P streaming (not RTMP, multicast RTMP over WebRTC?) and use multiple times the bandwidth on the recorder side to push media to several viewers at the same time which can then use their own bandwidth to push further. PeerTube instance being one of these "viewer" peers. To sum up, the ordered nature of live streaming kills P2P data sharing effectiveness. Thank you |
Unfortunately no, until we manage to play a mp4 without video stream in hls.js. I created an issue: #3281
The second live will be rejected: https://github.com/Chocobozzz/PeerTube/blob/develop/server/tests/api/check-params/live.ts#L404
We don't really know for now. And it depends on many things: amount of segments in the playlist, segments size, how many segments are ahead (depends on the live lag) etc. We need to make some tests to adjust these parameters.
Yes and yes :) I think in the future we'll add a live attribute for uploaders so they decide the "live profile": aggressive (not that much lag but P2P not very effective) or the opposite (some lag but P2P effective). |
This is amazing! 🎉 If I can suggest a potential TODO / discussion that I haven't found yet... What will it take to have pause and rewind support for live streams? |
Pause&rewind requires server-side buffering. |
Hey, I was thinking. If there is a possible limit on the amount of subsequent livestreams, might it be a good idea for an instance to have a reservation system? Right now, it's not really possible to communicate with other people on the same instance through peertube itself, and because livestreams often need to be planned out, it seems not unlikely that people would want to avoid scheduling conflicts. So, the ability to have a calendar, and to select a timespan on it for streaming (and to see who else is streaming at that moment), seems wise to me? Should I make a proper ticket for this? |
Filed the ticket for OBS integration: https://ideas.obsproject.com/posts/1202/peertube-livestream-support |
Really amazing work so far! I tested this out for the first time today. My only real concern is that the live player on my PeerTube instance was restricted to 480p, but OBS is broadcasting at 1080p. Was I missing a configuration setting somewhere? I enabled transcoding for the 1080p resolution in the admin settings, but haven't had any luck getting a higher resolution for my stream. |
Hey, sorry about that, false alarm - this was 100% user error on my part. I was not aware of the video output setting in OBS being lower than my input setting. PeerTube works perfectly as expected! :) |
When we are publishing a live stream to PeerTube from restream, it (randomly) gets disconnected and there are no logs that we can see/find to troubleshoot this error. Would really appreciate any help/ideas to fix this. |
@prophpgeek Please open a new issue. |
note: no particular code review is expected due to the amount of changes brought in this PR.
Common
UX to create a live:
Admin config
Architecture:
isLive
totrue
in DB. Then, the same API is used to fetch/update/delete a live video as a vod videoPOST /videos/live
to create a live (same parameter as to create a vod video + some additional params likesaveReplay
)GET /videos/live/:videoId
to fetch specific live info (rtmp URL, stream key, save replay)PUT /videos/live/:videoId
to update specific live info (save replay)ffmpeg
command to mux or to transcode RTMP stream into HLS playlistts
segments into a fragmentedmp4
file of all available live resolutions (depending on live transcoding resolutions enabled by the admin)/live-videos
TODO (to discuss)
User documentationhttps://framagit.org/framasoft/peertube/documentation/-/merge_requests/76