[FFmpeg-devel] Decoding performance -f rawvideo pipe:1 vs BMP images output

Clément Péron peron.clem at gmail.com
Sun Dec 8 14:53:17 EET 2024


Hi,

On Sun, 8 Dec 2024 at 12:09, Clément Péron <peron.clem at gmail.com> wrote:
>
> Hi,
>
> On Sat, 7 Dec 2024 at 17:43, Leo Izen <leo.izen at gmail.com> wrote:
> >
> > On 12/6/24 1:30 PM, Clément Péron wrote:
> > > Hi,
> > >
> > > On Fri, 6 Dec 2024 at 18:55, Clément Péron <peron.clem at gmail.com> wrote:
> > >>
> > >> Hi,
> > >>
> > >> I am trying to convert a RTSP stream to a series of frames that I send
> > >> to a stdout PIPE with a low latency .
> > >>
> > >> I first tried this command.
> > >>
> >
> > In general, user issues are for the ffmpeg-user mailing list, rather
> > than ffmpeg-devel. However, you did bring up an issue with the codebase
> > after further investigation.
> >
> > What happens if you use -thread_queue_size 0 before the output?
>
> Unfortunately the same issue :(
>
> >>>>>
> $> ./ffmpeg -allowed_media_types video -hwaccel cuda -loglevel info
> -flags +low_delay -fflags +nobuffer -debug_ts -max_port 65000
> -min_port 5000 -nostats -re -rtsp_flags prefer_tcp -rtsp_transport tcp
> -i RTSP_STREAM -fps_mode passthrough -f rawvideo -pix_fmt rgb24
> -thread_queue_size 0 pipe:1 > /dev/null 2> latency.log
> $> grep -ro "latency(.*)" latency.log
> latency(total:114.746ms, decode 3.7ms/3%, decode-filter: 9.804ms/8%,
> filter 3.543ms/3%, filter-encode: 1.583ms/1%, encode 96.08ms/83%)
> latency(total:69.574ms, decode 1.157ms/1%, decode-filter: 1.635ms/2%,
> filter 3.429ms/4%, encode 63.295ms/90%)
> latency(total:141.911ms, decode 1.194ms/0%, decode-filter: 0.744ms/0%,
> filter 1.074ms/0%, encode 138.797ms/97%)
> latency(total:68.283ms, decode 1.195ms/1%, decode-filter: 0.655ms/0%,
> filter 1.237ms/1%, encode 65.144ms/95%)
> latency(total:138.438ms, decode 1.255ms/0%, decode-filter: 0.87ms/0%,
> filter 1.081ms/0%, encode 135.118ms/97%)
> latency(total:72.512ms, demux-decode: 0.117ms/0%, decode 1.225ms/1%,
> decode-filter: 0.975ms/1%, filter 0.861ms/1%, encode 69.302ms/95%)
> latency(total:139.057ms, decode 4.971ms/3%, decode-filter: 0.868ms/0%,
> filter 1.577ms/1%, encode 131.572ms/94%)
> latency(total:69.479ms, decode 1.143ms/1%, decode-filter: 0.956ms/1%,
> filter 1.921ms/2%, encode 65.315ms/94%)
> latency(total:149.823ms, decode 1.262ms/0%, decode-filter: 0.762ms/0%,
> filter 2.256ms/1%, encode 145.436ms/97%)
> latency(total:79.051ms, demux-decode: 0.084ms/0%, decode 1.223ms/1%,
> decode-filter: 0.668ms/0%, filter 0.904ms/1%, filter-encode:
> 0.138ms/0%, encode 76.02ms/96%)
> latency(total:116.629ms, decode 3.299ms/2%, decode-filter: 0.591ms/0%,
> filter 0.898ms/0%, encode 111.763ms/95%)
> latency(total:68.378ms, decode 1.14ms/1%, decode-filter: 0.957ms/1%,
> filter 0.935ms/1%, encode 65.287ms/95%)
> latency(total:138.234ms, decode 1.229ms/0%, decode-filter: 0.745ms/0%,
> filter 0.908ms/0%, encode 135.225ms/97%)
> latency(total:68.714ms, decode 1.15ms/1%, decode-filter: 0.916ms/1%,
> filter 0.961ms/1%, encode 65.591ms/95%)
> latency(total:138.556ms, decode 1.337ms/0%, decode-filter: 1.182ms/0%,
> filter 0.972ms/0%, encode 134.991ms/97%)
> latency(total:67.964ms, decode 1.385ms/2%, decode-filter: 0.719ms/1%,
> filter 1.328ms/1%, encode 64.44ms/94%)
> latency(total:138.237ms, decode 1.224ms/0%, decode-filter: 0.75ms/0%,
> filter 0.931ms/0%, encode 135.283ms/97%)
> latency(total:68.255ms, decode 1.234ms/1%, decode-filter: 1.079ms/1%,
> filter 0.873ms/1%, encode 65.016ms/95%)
> latency(total:149.837ms, decode 1.287ms/0%, decode-filter: 0.619ms/0%,
> filter 1.234ms/0%, encode 146.642ms/97%)
> latency(total:80.012ms, decode 1.196ms/1%, decode-filter: 0.83ms/1%,
> filter 0.92ms/1%, encode 77ms/96%)
> latency(total:116.61ms, decode 3.518ms/3%, decode-filter: 0.762ms/0%,
> filter 1.511ms/1%, encode 110.698ms/94%)
> latency(total:65.107ms, decode 1.159ms/1%, decode-filter: 0.833ms/1%,
> filter 1.001ms/1%, encode 62.053ms/95%)
> latency(total:141.841ms, decode 1.261ms/0%, decode-filter: 1.075ms/0%,
> filter 0.897ms/0%, encode 138.518ms/97%)
> latency(total:68.732ms, decode 1.197ms/1%, decode-filter: 1.004ms/1%,
> filter 0.874ms/1%, encode 65.607ms/95%)
> latency(total:133.049ms, decode 2.111ms/1%, decode-filter: 0.635ms/0%,
> filter 0.872ms/0%, encode 129.287ms/97%)
> latency(total:72.451ms, decode 1.212ms/1%, decode-filter: 0.639ms/0%,
> filter 1.014ms/1%, encode 69.513ms/95%)
> <<<<

Just to be sure, have redo it on top of release/7.1 and with all latency stages.
>>>>>
latency(total:76.843ms, demux-decode: 0.019ms/0%, decode 3.548ms/4%,
decode-filter: 10.32ms/13%, filter 3.06ms/3%, filter-encode:
1.072ms/1%, encode 58.807ms/76%, encode-mux: 0.017ms/0%)
latency(total:148.132ms, demux-decode: 0.015ms/0%, decode 4.752ms/3%,
decode-filter: 2.934ms/1%, filter 3.855ms/2%, filter-encode:
0.02ms/0%, encode 134.515ms/90%, encode-mux: 2.041ms/1%)
latency(total:67.8ms, demux-decode: 0.066ms/0%, decode 7.769ms/11%,
decode-filter: 0.736ms/1%, filter 2.055ms/3%, filter-encode:
0.056ms/0%, encode 57.045ms/84%, encode-mux: 0.073ms/0%)
latency(total:132.012ms, demux-decode: 0.019ms/0%, decode 1.363ms/1%,
decode-filter: 0.611ms/0%, filter 0.981ms/0%, filter-encode:
0.076ms/0%, encode 128.946ms/97%, encode-mux: 0.016ms/0%)
latency(total:70.344ms, demux-decode: 0.019ms/0%, decode 1.185ms/1%,
decode-filter: 0.567ms/0%, filter 0.858ms/1%, filter-encode:
0.015ms/0%, encode 67.62ms/96%, encode-mux: 0.08ms/0%)
latency(total:140.329ms, demux-decode: 0.018ms/0%, decode 1.427ms/1%,
decode-filter: 0.85ms/0%, filter 1.535ms/1%, filter-encode: 0.02ms/0%,
encode 136.431ms/97%, encode-mux: 0.048ms/0%)
latency(total:69.551ms, demux-decode: 0.1ms/0%, decode 1.737ms/2%,
decode-filter: 1.772ms/2%, filter 2.853ms/4%, filter-encode:
0.058ms/0%, encode 63.016ms/90%, encode-mux: 0.015ms/0%)
latency(total:142.267ms, demux-decode: 0.019ms/0%, decode 1.418ms/0%,
decode-filter: 0.98ms/0%, filter 0.885ms/0%, filter-encode:
0.021ms/0%, encode 138.929ms/97%, encode-mux: 0.015ms/0%)
latency(total:96.216ms, demux-decode: 0.056ms/0%, decode 1.252ms/1%,
decode-filter: 0.718ms/0%, filter 0.874ms/0%, filter-encode:
0.017ms/0%, encode 93.282ms/96%, encode-mux: 0.017ms/0%)
latency(total:121.185ms, demux-decode: 0.017ms/0%, decode 8.165ms/6%,
decode-filter: 1.171ms/0%, filter 3.69ms/3%, filter-encode:
0.018ms/0%, encode 108.109ms/89%, encode-mux: 0.015ms/0%)
latency(total:69.833ms, demux-decode: 0.017ms/0%, decode 3.108ms/4%,
decode-filter: 0.891ms/1%, filter 1.593ms/2%, filter-encode:
0.016ms/0%, encode 64.193ms/91%, encode-mux: 0.015ms/0%)
latency(total:132.302ms, demux-decode: 0.014ms/0%, decode 1.287ms/0%,
decode-filter: 0.941ms/0%, filter 1.153ms/0%, filter-encode:
0.018ms/0%, encode 128.875ms/97%, encode-mux: 0.014ms/0%)
latency(total:74.534ms, demux-decode: 0.033ms/0%, decode 1.202ms/1%,
decode-filter: 0.619ms/0%, filter 0.884ms/1%, filter-encode:
0.017ms/0%, encode 71.762ms/96%, encode-mux: 0.017ms/0%)
latency(total:146.561ms, demux-decode: 0.018ms/0%, decode 1.534ms/1%,
decode-filter: 1.26ms/0%, filter 1.297ms/0%, filter-encode:
0.016ms/0%, encode 141.882ms/96%, encode-mux: 0.554ms/0%)
latency(total:67.928ms, demux-decode: 0.05ms/0%, decode 3.64ms/5%,
decode-filter: 2.134ms/3%, filter 4.876ms/7%, filter-encode:
0.063ms/0%, encode 57.152ms/84%, encode-mux: 0.013ms/0%)
latency(total:138.995ms, demux-decode: 0.022ms/0%, decode 1.401ms/1%,
decode-filter: 0.616ms/0%, filter 0.844ms/0%, filter-encode:
0.015ms/0%, encode 136.075ms/97%, encode-mux: 0.022ms/0%)
latency(total:68.325ms, demux-decode: 0.034ms/0%, decode 1.271ms/1%,
decode-filter: 0.838ms/1%, filter 1.734ms/2%, filter-encode:
0.021ms/0%, encode 64.411ms/94%, encode-mux: 0.016ms/0%)
latency(total:144.948ms, demux-decode: 0.015ms/0%, decode 1.352ms/0%,
decode-filter: 0.956ms/0%, filter 1.043ms/0%, filter-encode:
0.013ms/0%, encode 141.539ms/97%, encode-mux: 0.03ms/0%)
latency(total:92.217ms, demux-decode: 0.071ms/0%, decode 5.097ms/5%,
decode-filter: 1.093ms/1%, filter 6.911ms/7%, filter-encode:
0.036ms/0%, encode 78.992ms/85%, encode-mux: 0.017ms/0%)
latency(total:121.037ms, demux-decode: 0.021ms/0%, decode 4.41ms/3%,
decode-filter: 0.964ms/0%, filter 1.521ms/1%, filter-encode:
0.029ms/0%, encode 114.074ms/94%, encode-mux: 0.018ms/0%)
latency(total:73.827ms, demux-decode: 0.017ms/0%, decode 3.202ms/4%,
decode-filter: 0.834ms/1%, filter 0.942ms/1%, filter-encode:
0.021ms/0%, encode 68.783ms/93%, encode-mux: 0.028ms/0%)
latency(total:135.119ms, demux-decode: 0.013ms/0%, decode 3.964ms/2%,
decode-filter: 0.846ms/0%, filter 1.993ms/1%, filter-encode:
0.049ms/0%, encode 128.235ms/94%, encode-mux: 0.019ms/0%)
latency(total:66.451ms, demux-decode: 0.017ms/0%, decode 2.233ms/3%,
decode-filter: 1.075ms/1%, filter 2.193ms/3%, filter-encode:
0.038ms/0%, encode 60.868ms/91%, encode-mux: 0.027ms/0%)
<<<<<<

>
> >
> > - Leo Izen (Traneptora)
> >
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list