Answer the question
In order to leave comments, you need to log in
ffmpeg + rtmp + nginx continuous stream implementation with looping playback, automatic transitions. What am I doing wrong?
What you need to come up with:
Implement a continuous streaming ffmpeg that will take clips from a folder and spin them in a circle. It is important that the delay is minimal, the transitions between different videos in the same stream are automatic.
What was the problem:
I can catch the rtmp stream through VLC, but transitions work very poorly, high latency (frames are processed, but VLC catches the stream only after 10-20 seconds, and sometimes even freezes). To put it mildly, the broadcast works crookedly.
My configs:
1. Script to run ffmpeg + stream generation in rmtp:
cd /root/cnv_video
while [ true ]; do
for video in $( ls -1 --hide=`ls -d` ); do
while [ `fuser $video` ]; do
sleep 10
done
/usr/bin/ffmpeg -re -i $video -acodec copy -vcodec copy -tune zerolatency -strict experimental -f flv rtmp://xxxx/live/stream
done
done
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
}
}
}
Answer the question
In order to leave comments, you need to log in
Your files are most likely shrunk by a two-pass algorithm that delivered I-frames (google what it is) too infrequently.
The playback of the broadcast can only be started from an I-frame, so the player has to wait until such a frame arrives.
Since you have static content, you don't need any RTMP streaming at all - convert your files to mp4 format and embed them in the browser using the tag, without any flash.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question