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):
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?
Question
Barretto
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
Link to comment
Share on other sites
Top Posters For This Question
1
Popular Days
May 24
1
Top Posters For This Question
Barretto 1 post
Popular Days
May 24 2020
1 post
0 answers to this question
Recommended Posts