Skip to main content
Participating Frequently
February 19, 2012
Question

multiple RTMP sources streaming to FMS without stop?

  • February 19, 2012
  • 1 reply
  • 2643 views

I have some .mov files want to stream to Flash media server by ffmpeg.

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 as one source, 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 i have to refresh the web 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?

Sorry have for asking a lot recently... but this is urgent to me... thank you

This topic has been closed for replies.

1 reply

Adobe Employee
February 20, 2012

I have never used ffmpeg but then if there is explicit stop of the publish from ffmpeg then there is nothing much FMS can do about it. It would stop recording first stream and then append new publishing if streamname is same but between this two things there would be stop on client.

However there is one way one can do it - create single stream on server-side, use that stream object to play incoming stream and record it - so your livestream would be continious. However again when you switch from one file to another from FFMPEG side either you would have frozen frame or black frame - i dont know what would be expected behaviour as i have not tried it personally.

paymokAuthor
Participating Frequently
February 23, 2012

i am trying to prevent fms pause the publishing the video after publisher stop.
i tried to comment out all the codes in this 3 method in main.asc 

application.onUnpublish = function(clientObj, streamObj)

Client.prototype.FCUnpublish = function( streamname )

Client.prototype.releaseStream = function(streamname)

but still when publisher stop, the client side player stop imeediately.

Also i am can fms receive the stream as soon as possible, and let the video play until the end?

for example

i have a video have 5mins length, my publisher software can fast enough deliver the video

within 30 secs, so that fms should already have 5mins content for broadcasting, can fms

keep on the broadcasting even the connection from publisher to fms is finish?