Stream Playlists on Twitch, Youtube or any RTMP Endpoint Smoothly #6158
Replies: 2 comments 8 replies
-
I tried this and for some reason when I look at twitch it just shows a black screen instead of the actual video is there any fix to this? |
Beta Was this translation helpful? Give feedback.
-
Hey there, the stream runs smoothly but after a couple of hours the stream becomes jittery and shakey. I am streaming to Twitch. Here is a little preview of how it looks. I assume this is because it is broadcasting at 0.69x but I am not sure why this would be happening. Any help on this matter would be greatly appreciated.
|
Beta Was this translation helpful? Give feedback.
-
Hi Guys,
As shared previously, there are instructions how to have a smooth playlist playback experience (without freezes) on Ant Media Server. To learn these instructions, check this post: Seamless Playlist Experience in Ant Media Server. You can also check this discussion: Basic PlayList Guide From Zero to Hero
Today, we're going to provide a workaround solution to Stream PlayLists on Twitch Smoothly because when we directly add RTMP endpoint to the playlist, streaming has restarted on Twitch whenever playlist switches items. I think this is an important topic because there are multiple discussions(Playist always start a new stream..., Stream Playlist VOD on Twitch) and issues(Streaming a playlist to twitch does not work correctly, The playlist freezes and .ts files are missing for uploaded VODs.) around this problem.
Here is the step by step instructions.
How to Stream Playlist on Twitch Smoothly
Tune the settings for having a smooth playlist experience
Step 1: Configure Ant Media Server for Better Playlist Experience
If you know how to configure Ant Media Server for smooth playlist experience, you can skip to next section.
Login to your Ant Media Server Web Panel in. The url is like this
https://YOUR_ANT_MEDIA_SERVER:5443/
Click the LiveApp on the left
Click the
Settings
tab and scroll bottomUncheck the
Delete HLS files after the stream is finished
Scroll bottom and Click
Save
buttonScroll top and Choose the mode from
Basic
toAdvanced
Find
hlsflags
and change its value todelete_segments+append_list+omit_endlist
Step 2: Upload Some VoD Files and Create Your Playlist
If you know how to upload VoD files and create playlist, you can skip to next section.
Upload VoD Files
Click the
VoD
Tab for LiveApp and then click theUpload VoD
buttonUpload some MP4 VoD Files from your computer
We've added 3 VoD files
Copy the VoD Urls through context menu. We'll use them below.
So my VoDs are accessible through this links and I'll use them below.
http://localhost:5080/LiveApp/streams/243170266880429550645296.mp4
http://localhost:5080/LiveApp/streams/794333965265876491918328.mp4
http://localhost:5080/LiveApp/streams/823913410113173360449884.mp4
Create Playlist
Live Streams
Tab and then ClickNew Live Stream > Playlist
as shown below2. Add the VoD files to your PlayList and Click the `Create` button. We've entered `myplaylist` as `streamId`
3. Click the "Start Broadcast" button to let the playlist start
Step 3: Stream Playlist on Twitch Smoothly
We've created our playlist with
myplaylist
id and it means that the stream is playable directly with the following url:http://{YOUR_ANT_MEDIA_SERVER}:5080/LiveApp/streams/myplaylist.m3u8
Stream Source
2. Use the playlist as Stream Source URL. We use `http://localhost:5080/LiveApp/streams/myplaylist.m3u8` as Stream Source URL because server can access it through local address.
3. Click `Edit RTMP Endpoints`
4. Add your Twitch Channel RTMP Endpoint. Use the RTMP server that is close to you from [ingest.twitch.tv/ingests](https://ingest.twitch.tv/ingests) and use your stream key from your account on twitch.
5. Last step "Click Start Broadcasting" and check that Stream is playing without any interruption on Twitch. I've used one of my colleagues 7 seconds video(@burak-58 ) to check if any interruptions occurs between switches and the synchronization
Please try and let me know if it works for you.
Bonus: Twitch reports that Live stream is unstable. It's expected because of nature of HLS streaming. I think it will be resolved if we create the Stream Source as VoD for HLS stream programmatically. I've not tried yet. If anyone try and let me know it will perfect or I can try in one of my convenient time
Beta Was this translation helpful? Give feedback.
All reactions