issue with insertplaylistitem for live

issue with insertplaylistitem for live

Support ForumCategory: Usage and Featuresissue with insertplaylistitem for live
lux asked 9 years ago
Dear EMS Support, I am facing some issue with insertplaylistitem. I have a Playlist “stream.lst” which is used todo an a/b Switching between 2 Streams (same content from 2 Encoders, via 2 Networks). Encoder1 => localstreamname=streamA Encoder2 => localstreamname=streamB Playlist file: /etc/evostreamms/media/stream.lst # sourceoffset, duration, localstreamname -1,-2,streamA A1. When stream is started first time I can switch to “streamB” by “insertplaylistitem playlistname=stream.lst localstreamname=streamB insertPoint=-1000 sourceOffset=-1000 duration=-2000 I see that this goes fine, when testing with different Content on both encoder. When I like to switch back to streamA this is not working/switching “insertplaylistitem playlistname=stream.lst localstreamname=streamA insertPoint=-1000 sourceOffset=-1000 duration=-2000 #—- A2. When stream is started I can switch to “streamB” by “insertplaylistitem playlistname=stream.lst localstreamname=streamB insertPoint=-1000 sourceOffset=-1000 duration=-2000 I see that this going fine, when testing with different Content on both encoder. When I cut the Ingest of “streamB” and immediatly Switch the Playlist, the playlist is switching. “insertplaylistitem playlistname=stream.lst localstreamname=streamA insertPoint=-1000 sourceOffset=-1000 duration=-2000 #——- When doing same as A1, A2 above with a given duration>0 then I see the behaivor of playlist as I understand. B1. Playlistfile still unchanged /etc/evostreamms/media/stream.lst # sourceoffset, duration, localstreamname -1,-2,streamA When stream is started I can switch to “streamB” by “insertplaylistitem playlistname=stream.lst localstreamname=streamB insertPoint=-1000 sourceOffset=-1000 duration=15000 I see that this going fine, when testing with different Content on both encoder and/or checking the Event “ouStreamCreated” which shows the change, too. After 15 seconds the Playlist is switching back to streamA automaticily, as it should. I am able to switch again to streamB “insertplaylistitem playlistname=stream.lst localstreamname=streamA insertPoint=-1000 sourceOffset=-1000 duration=15000 After 15 seconds the Playlist switch back to streamA,as it should I am as well able to switch to streamB and switch back to streamA before duration is over “insertplaylistitem playlistname=stream.lst localstreamname=streamB insertPoint=-1000 sourceOffset=-1000 duration=15000 Playlist switch to streamB waiting 5 seconds…. “insertplaylistitem playlistname=stream.lst localstreamname=streamA insertPoint=-1000 sourceOffset=-1000 duration=15000 Playlist switch to streamA #—- In summary, I am able to change a playlist, if a live stream is played (duration=-2000), only once. 2nd and more insertplaylist are not accepted/working When Playduration is changed to a value bigger than “0”, then the immediatly switching is possible as needed and understood. I like to ask you a. is my understanding and API command above (A1, A2) correct or is the issue on my side that I send bad command or missunderstand the function ? b. if you agree with my concern, can you reproduce this issue? What is the timeline to get this fixed? Kind Regards, Uwe



2 Answers
Don answered 9 years ago
Hi Uwe,

Can you play each stream source using VLC and get the codec info for each?
To get codec info while a stream is playing in VLC, click Tools > Codec information.
If possible, please encode all streams with the same video resolution (width & height).

Cheers,
Don
Don answered 9 years ago
Hi Uwe, Please refer to insertPlaylistItem API command for details about its parameters.
> If insertPoint = -1000, it means that the EMS will start playing the stream being inserted the very next frame.
> If sourceOffset = -1000, it means that the localStreamName is explicitly a live stream.
> If duration = -2000, it is the same as duration = -1000 which means that the EMS will play a live stream (or a media file) until it is no longer available (or it has ended).
Have you tried cutting off the live stream using the shutdownStream (or the removeConfig) API command to force the switch?

Cheers,
Don



Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.