tech question
We have a CDN with live transcoding and are updating it to our own based on AWS instances. I have pretty good experiences with EMS but can’t solve one problem.
What we need to do is to have one input, that is being transcoded to 5-6 qualities depending on the input. Then, we need to generate a HLS playlist.
And here come the 2 problems.
1. when I setup the transcoding to load the stream via RTSP, it breaks down the picture – http://tinypic.com/r/f26142/9
2. When I use rtmp link for the transcoder, the HLS generated are not in sync and there is a visible delay on switching the sources.
I have it running on a AWS c3.4xlarge instance, that should be powerfull enough to handle this.
The commands I use:
transcode source=rtmp://localhost/live/input groupName=trans videoSizes=480×270,640×360,960×540,1280×720,1920×1080 videoBitrates=800k,1200k,2200k,3500k,6000k audioBitrates=96k,96k,96k,128k,128k targetStreamNames=trans-270,trans-360,trans-540,trans-720,trans-1080 destinations=trans-270,trans-360,trans-540,trans-720,trans-1080 videoAdvancedParamsProfiles=streamstar-60,streamstar-60,streamstar-60,streamstar-60,streamstar-60
transcoding setup, custom avconv preset:
g=60
preset=superfast
profile=main
level=31
HLS creation:
createHLSStream localstreamnames=trans-270,trans-360,trans-540,trans-720,trans-1080 bandwidths=800000,1200000,2200000,3500000,6000000 targetfolder=/var/evo-webroot/hls/ groupname=trans playlisttype=appending chunkLength=10 hlsResume=1 chunkOnIDR=1
I need to solve this really quickly or I will have to find for another solution.
And we are talking about a big usage and a CDN serving several instances at one time.
1 Answers
Hi.
- On the RTSP source, it seems data lost is the culprit. If the RTSP source supports sending of RTP over TCP, please try the pullstream with forceTCP set to 1. This should mitigate the data loss
- It might be possible that the CPU that runs the transcode command is overloaded while the other cores aren’t. I suggest splitting the transcode command and let the OS handle load balancing among its cores.