-
encoding live stream
Hello I’m facing troubles when encoding live streams. I would like to stream from IP cam (rtsp h264 1600×1200) to websites via rtmp. So I am using some rtmp server (crtmpserver exactly) which can handle rtsp2rtmp. But I need to encode the stream to several other streams (smaller, resolution, smaller bitrate) to allow user to choose desired quality. So I’m taking the output rtmp stream from the server and trzing to encode it and push back to server.
Everything is working when I simply do “-vcodec copy -acodec copy”, but everytime i try to downscale resolution or change bitrate, the output is very weird.
When something is moving, sometimes it has a pixelate ghost (trace) – and sometimes it looks like the picture is going back the start of the ghost (trace) and back to normal again (this frame jump occurs multiple times), after that it continues. This occurs very often.I’m using command:
ffmpeg -i rtmp://localhost/live/cam1_original -f flv -vcodec libx264 -an -vpre ultrafast -s vga tcp://localhost:6666
I tried a lot of parameters (vpre, threads, r, re, b, bufsize, rtbufsize, etc..) But every time the same, sometimes little better, sometimes worse.
Could it be because of that the server is virtual?
Can you help me with better parameters, please?
Thak you very much