Ephzent
Ephzent

Reputation: 11

how to push a video list to rtmp server and keep connect

Current methods

ffmpeg -re -i 1.mp4 -f flv "rtmp://example.com/live"
ffmpeg -re -i 2.mp4 -f flv "rtmp://example.com/live"
ffmpeg -re -i 3.mp4 -f flv "rtmp://example.com/live"
...

but 1.mp4 push done later , client and server will be disconnected. i hope keep connect.

Upvotes: 0

Views: 2037

Answers (1)

Gyan
Gyan

Reputation: 93231

Try concat demuxer.

Create a list (myfiles.txt):

file '1.mp4'
file '2.mp4'
file '3.mp4'
...

Then

ffmpeg -f concat -i myfiles.txt -f flv "rtmp://example.com/live"

Upvotes: 2

Related Questions