1

I have some .mov files want to stream to Flash media server. i have already tried to stream a single .mov by FFMPEG command in terminal and it works, the FMS can display the thing i streaming in live.

ffmpeg -re -i file1.mov -vcodec libx264 -f flv rtmp://localhost/livepkgr/livestream

Now i want to stream multiple files, i tried to use above command one by one, but it seems Flash media server stop the streaming when file1 is finished, then start the stream with file2. It makes the stream player stopped when file1 is finish, and have to refresh the page in order to continue on file2.

i am calling the FFMPEG command by a C program in linux, i wonder is there any method that i can prevent the FMS stopped when i switch the file source in FFMPEG? or is that possible to let FFMPEG constantly deliver the stream by multiple files source without stopped when a file finish?

Luis Mok
  • 161
  • 3
  • 10

2 Answers2

0

Reformat your source file to a TS or MPEG or other "concatable" file. Then you can either use ffmpeg's concat protocol or just "cat" by yourself.

Sergey K.
  • 24,894
  • 13
  • 106
  • 174
Harry
  • 1
0

I found something like this it will be useful for you :

I managed to stream a static playlist of videos by using for each video a pipe (ex vid1.mp4 -> pipe1, vid2.mp4 -> pipe2 etc). Then i write into a single stream named pipe "stream" this way cat pipe1 pipe2 pipe3 > stream, and i use the stream pipe as input in FFMPEG to publish my stream

sword1st
  • 525
  • 3
  • 7
  • 21