Forum

Play VOD file if RTMP not live

Shane 2019-10-26 22:05:12 UTC in Nimble Streamer

Is it possible to somehow have FFMPEG play a static MP4 file (looped) for a stream if that stream is not live?

For instance, I'd like a stream to play a looped file. However, if we start publishing via RTMP the stream will be live from that. Once there is no live RTMP, would go back to playing the file looped from ffmpeg.

Possible?

Shane 2019-10-26 22:28:07 UTC 

Forgot to add stream shouldn't be interrupted across live/playback events.

Essentially, trying to do this (Wowza example): [url]https//www.wowza.com/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive[/url]

Thanks!

Shane 2019-10-27 02:35:45 UTC 

To follow up, I learned about hot swapping source streams. I think I can do it with that.

I've been experimenting, and have a couple of questions about that:

1) I attempted to use Transcoder to make a new version of the incoming source stream, so that I could make sure the resolution and audio sample rate remain constant (in case something on the source encoder is changed). For instance, i transcoded "live" to "live1". Then I attempted to use "live1" as the source for another transcoding scenario that creates ABR versions for my final output. However, it seems that doesn't work. I can view live1 just fine, but transcoder doesn't seem to like to use it as a source for the ABR. In theory this should work, right?

2) I'm using an MP4 video for the source of the Fallback stream. It works fine...BUT, when it gets to the end of the video, it interrupts the stream on end players. If I reload the player, it starts playing fine. So something about when it gets to the end of the video causes an issue. I have tried putting a PNG overlay on to sort of "stabilize" it, but that didn't work. Any other way to get this to loop seamlessly?

3) Would there be any way to swap out that mp4 file (overwrite or something) to make the Fallback encoder start playing a new MP4 instead? Without interrupting end user stream player of course.

Thanks!

Post a reply


Post a new question

Categories:

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.