Multiple mp4 files (adding more in regular intervals) to RTMP stream

Multiple mp4 files (adding more in regular intervals) to RTMP stream

Support ForumCategory: Usage and FeaturesMultiple mp4 files (adding more in regular intervals) to RTMP stream
admin asked 8 years ago
Hello. I have a broadcasting system that need to generate an RTMP stream from multiple sequential mp4 files, that are constantly added to. So the stream has to start for example from file test-0001.mp4 and continue to test-0002.mp4, to test-0003.mp4 and so on. In regular intervals new files will be added and the stream has to continue reading the new files and broadcasting them. We will always be ahead of the stream playing time or have a default video file to broadcast in case there is no new file to stream. Can this scenario be done with EMS.
Thank you very much.



2 Answers
ian Staff answered 8 years ago

Hi sotiris, Yes, it can be done using generateServerPlaylist and insertPlaylistItem API. You might want to create an initial playlist then insert items as the playlist progresses. The playback URI will be rtmp://ip/vod/playlist.lst. Please check the links for API usage.

admin answered 8 years ago
Thank you very much ian. That helped a lot. I have another question to ask. Is there a way to know the length of the list after I have added a bunch of new files, so that I can input the correct sourceOffset(to be at the end of the list) of every new file I add? I do not see anything in the EMS API documentation.

Offcanvas

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