[FFmpeg-user] Creating a Simulated HLS Streaming Server with FFmpeg...HOW??

Norm Kaiser norm_kaiser at hotmail.com
Sat Jul 29 07:31:39 EEST 2023


Hello all:

I'm new to this list, and I sure hope someone can help me. I have been working on this for MONTHS and have not been able to get it to work.

What I'm trying to do seems like it should be fairly simple or common with FFmpeg. I'm trying to set up a simulated HLS live video streaming server using FFmpeg. What I'm doing is sort of like creating a TV broadcast system where you provide the software a list of MP4 files and the software streams each MP4 one-by-one, back-to-back. To create this software I've written a Python script that takes a list of MP4 video files to play and then it iterates through the list, attempting to call FFmpeg over and over, once for each MP4 file.

In other words, call FFmpeg to stream the first video. Let's call it video1.mp4. When it's done, call FFmpeg again to stream video2.mp4, and so on.

I'm using HLS and I've signaled FFMpeg to append to the playlist, which it appears to be doing correctly. But for some reason, the media player (either VLC or MPV) will not play the whole stream. It just plays the first file and then stops playing, even though FFmpeg is dutifully generating new .TS segment files and updating the M3U8 playlist accordingly.

I cannot for the life of me figure out why the media players stop playing. What is signaling them to stop? I can't see any indication in the M3U8 that would tell them to stop.

Does anyone have any ideas? Has anyone done this before?

Any assistance would be tremendously appreciated!

Thank you so much!
Norm


More information about the ffmpeg-user mailing list