Saturday, 10 August 2013

Getting troubles when I generate rtsp stream as an output with ffmpeg from static images as an input

Getting troubles when I generate rtsp stream as an output with ffmpeg from
static images as an input

I'm trying to start the rtsp stream via feeding ffmpeg with static images
and feeding ffserver with ffmpeg output.
The first problem appears from the ffserver.config:
Port 12345
RTSPPort 8544
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog /var/log/ffserver-access.log
<Feed videofeed.ffm>
File /tmp/videofeed.ffm
FileMaxSize 3M
#Launch ffmpeg -s 640x480 -f video4linux2 -i /dev/video0
#Launch ffmpeg http://localhost:8090/videofeed.ffm
Launch ffmpeg -loop 1 -f image2 -r 20 -b 9600 -i Janalif.jpg -t 30
http://127.0.0.1:8090/videofeed.ffm -report
ACL allow 127.0.0.1
</Feed>
<Stream test1-rtsp.mpg>
Format rtsp
#rtsp://localhost:5454/test1-rtsp.mpg
Feed videofeed.ffm
#webcam.ffm
Format flv
VideoCodec flv
VideoFrameRate 30
VideoBufferSize 80000
VideoBitRate 200
VideoQMin 1
VideoQMax 5
VideoSize 640x480
PreRoll 1
NoAudio
</Stream>
<Stream index.html>
Format status
</Stream>
Please ignore codecs etc in stream part. The problem appears for RTSPPort,
after starting the server nmap shows no binding to 8544, only 12345 port
is used.
8090/tcp open unknown
12345/tcp open netbus
I can download mpeg stream through http from
http://localhost:12345/test1-rtsp.mpg. How can I setup 8544 port working?
and another question is about Launch part of the stream. Am I right, that
ffserver executes the content of Launch line? If so, how can i configure
ffserver to wait the stream in some particular port, but start streaming
at the moment I desire?
P.S. The solution looks like Säkkijärven polkka, hoowever the idea behind
this construct is to provide the controlled rtsp stream to the camera
output. In future I plan to substitute the command line for ffmpeg with
some java bindings for it to produce the program-controlled images to the
camera input to test the computer vision.

No comments:

Post a Comment