Reputation: 51
I'm working on a server side re-streaming service for some IP Cameras. I'm using ffserver on Linux to serve the streams and ffmpeg on Windows to feed. I'm getting the cameras video (H264) using rtsp.
My ffserver config example is as follows
<Feed test.ffm>
File ./test.ffm
</Feed>
<Stream test.mjpg>
Feed test.ffm
Format mpjpeg
VideoFrameRate 3
VideoSize 704x480
NoAudio
FileMaxSize 100k
VideoHighQuality
</Stream>
and the way ffmpeg is feeding:
ffmpeg -rtsp_transport tcp -i "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -vcodec copy -acodec copy "http://192.168.1.101:8090/test.ffm"
Resulting video is Very pixelated and it differs from the real image.
Cameras' configuration are as follows:
Resolution: D1 (704*480)
FrameRate: 3
BitRate: 256k
BitRateType: Variable
Is there anything i'm missing or doing wrong?
Thanks in advance for any help
Upvotes: 1
Views: 3676
Reputation: 51
For anyone out there having the same issue. I solved with this:
<Feed test.ffm>
File ./test.ffm
</Feed>
<Stream test.mjpg>
Feed test.ffm
Format mpjpeg
VideoFrameRate 3
VideoBufferSize 80000
VideoBitRate 512
VideoQMin 1
VideoQMax 10
VideoSize 1280x720
PreRoll 0
</Stream>
Streamed video is now the same quality as the source.
Upvotes: 2
Reputation: 2359
I think the problem is at the source camera streaming, in my opinion 256 Kb/s is a poor bitrate for a D1 resolution.
If you can do it and it doesn't affect to your network bandwidth you could to try to increase camera bitrate to 768 or 1024 Kb/s to view the difference.
Also FrameRate of 3 is maybe a little framerate. Depending of what are you capturing with your camera (a static image like a landscape or a very dynamic image like a traffic road) in a dynamic capture stream 10 or 15 frames/s are more realistic values.
Upvotes: 0