[Libav-user] Real time camera IP RTSP H264
renaud.bobin at subsea-tech.com
Tue Feb 10 09:28:43 CET 2015
That's it !!!!
Just before avcodec_open2(),
I add the context->thread_type = 0 and no more latency !
Really Thank you very much,
I was getting desperate about this latency !
De : libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] De
la part de Camera Man
Envoyé : mardi 10 février 2015 09:07
À : This list is about using libavcodec, libavformat, libavutil, libavdevice
Objet : Re: [Libav-user] Real time camera IP RTSP H264
On 02/09/2015 10:54 AM, Renaud BOBIN wrote:
> I have a problem to get the video of my IP camera in real time or
> almost no latency.
> The camera stream an H264 full HD video (with no audio) on a rtsp
> On the embedded web server in Internet Explorer with the ActiveX
> provided by the camera, I got not latency.
> On mplayer I got no latency (so I know it is possible).
> But with my own program I got 300-400ms of latency.
> I tried many things but is always the same results.
At a minimum, you have to actively disable multithreaded decoding, because
each decoding thread guarantees one frame of latency (so, if you have 4
cores, you have at least 4 frames of latency).
After allocating the context with avcodec_alloc_context3(), but before
opening it with avcodec_open2(), set the context->thread_type = 0; I suppose
this should be better documented somewhere.
Libav-user mailing list
Libav-user at ffmpeg.org
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
More information about the Libav-user