Streaming video using stream of images
I have a stream of images to make a .flv video. I can make video using those stre开发者_StackOverflowams using ffmpeg but video is to be streamed live simultaneously.
I have already installed red5 for streaming.
I think this thread may be of help
http://ubuntuforums.org/showthread.php?t=665607
It explains how to use ffmpeg
and ffserver
for live streaming while the converted video is generated. This works even for infinite streams.
when you stream your video using ffserver
, you may want to set a reverse-proxy on your main webserver so that your users do not need to type a port number for the video.
ffmpeg
can read from image sequences, use %d
to represent the incrementing number. Just use the sequence as your input and the ffserver
stream as your output
If you want to stream video, images will be too heavy. Just create an .asx file with notepad that contains your video URL. It's easy and it can be played with many players, even with Windows Media Player. Here is simple ASX example:
<ASX>
<Entry>
<ref HREF="YourFilePath.mp4"/>
</Entry>
</ASX>
Good luck.
I'm doing exactly this using this command:
ffmpeg.exe -vcodec bmp -framerate 1 -i \\.\pipe\input_pipe -r 25 -c:v libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p -f rtsp rtsp://wowza.server.com:1935/app/stream
I'm generating the images in a c# app and writting as bmp to input_pipe, where ffmpeg will read them. My images get generated each second, so note the -framerate 1 in the input, and -r 25 in the output to generate a video at 25fps.
It is working almost perfect but I'm having an issue where the video takes about 20 seconds to be accessible from the wowza server.
精彩评论