Jump to content
  • 0

Streaming a video playlist using FFmpeg but AMS stops streaming when playing next video




I'm trying to stream a sequence of videos that are inside a folder to an Ant Media Server (hosted on digital ocean) throught RTMP, but the streaming stops between first and second video, forcing me to reload the page or the stream. Just to let you know I've tested with daCast and YouTube and everything goes just fine over there.

Here is my bash that reads all mp4 video files from folder and plays them (consider it a video playlist, if you will):

for file in *.mp4; do ffmpeg -re -i "$file" -c:v libx264 -b:v 1600k -preset ultrafast -b:v 900k -c:a aac -b:a 128k -s 1920x1080 -x264opts keyint=50 -g 25 -pix_fmt yuv420p -f flv -strict -2 "rtmp://myip/Test/xxx"; done

So, just want to make it clear that it doesn't seem at all to be a problem with FFmpeg since all videos are played smoothly at youtube and dacast. I've also conducted another test using live-playlist-radio (https://github.com/torch2424/live-stream-radio) and the live stream stalls between first and second song even though FFmpeg presents no error at all (keeps streaming). My feeling is like if connection drops when first video (or song) ends and AMS considers stream is over and when it begins to stream the next video the AMS doesn't re-start the streaming.

Any hints on what might be going on and how could I solve it?

Link to comment
Share on other sites

  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet


  • Create New...