[FFmpeg-user] Best/fastest Decoder for MJPG or YUYV

Gerhard Dorner gdorner.gd at gmail.com
Wed Mar 25 11:43:20 EET 2020


Hello,

I need help too chose the right decoder an codecs.
I want to streamwith an SBC, with  Quad-core ARM Cortex-A35CPU,  a video
from an USB Cam in the local network.
With maximum resolution an max framrate and as less CPU consummation as
possible.

I know too encode  YUYV instead of   MJPG, needs less CPU, but the frame
rate  higher resolution is low.
on an RPI i use :

> ffmpeg -input_format yuyv422 -f video4linux2 -s 1280x720 -r 10 -i
> /dev/video0 -c:v h264_omx -r 10 -b:v 2M -an -f rtsp
> rtsp://localhost:80/live/stream



but im not so happy within the frame rate:

What codecs and encoders would you suggest?
for maximum frame rate resolution and performens?


I installed ffmpeg via apt:

> sudo apt-get install ffmpeg libavcodec-extra -y


these are the supported formats from the camera:

> pi at rockpis:~$ v4l2-ctl -d /dev/video0 --list-formats-ext
> ioctl: VIDIOC_ENUM_FMT
>         Index       : 0
>         Type        : Video Capture
>         Pixel Format: 'MJPG' (compressed)
>         Name        : Motion-JPEG
>                 Size: Discrete 3264x2448
>                         Interval: Discrete 0.050s (20.000 fps)
>                 Size: Discrete 2592x1944
>                         Interval: Discrete 0.050s (20.000 fps)
>                 Size: Discrete 2048x1536
>                         Interval: Discrete 0.050s (20.000 fps)
>                 Size: Discrete 1600x1200
>                         Interval: Discrete 0.050s (20.000 fps)
>                 Size: Discrete 1920x1080
>                         Interval: Discrete 0.050s (20.000 fps)
>                 Size: Discrete 1280x720
>                         Interval: Discrete 0.033s (30.000 fps)
>                 Size: Discrete 1280x960
>                         Interval: Discrete 0.033s (30.000 fps)
>                 Size: Discrete 800x600
>                         Interval: Discrete 0.033s (30.000 fps)
>                 Size: Discrete 640x480
>                         Interval: Discrete 0.033s (30.000 fps)
>         Index       : 1
>         Type        : Video Capture
>         Pixel Format: 'YUYV'
>         Name        : YUYV 4:2:2
>                 Size: Discrete 3264x2448
>                         Interval: Discrete 1.000s (1.000 fps)
>                 Size: Discrete 2592x1944
>                         Interval: Discrete 0.500s (2.000 fps)
>                 Size: Discrete 2048x1536
>                         Interval: Discrete 0.500s (2.000 fps)
>                 Size: Discrete 1600x1200
>                         Interval: Discrete 0.200s (5.000 fps)
>                 Size: Discrete 1920x1080
>                         Interval: Discrete 0.200s (5.000 fps)
>                 Size: Discrete 1280x720
>                         Interval: Discrete 0.100s (10.000 fps)
>                 Size: Discrete 1280x960
>                         Interval: Discrete 0.200s (5.000 fps)
>                 Size: Discrete 640x480
>                         Interval: Discrete 0.033s (30.000 fps)
>                 Size: Discrete 800x600
>                         Interval: Discrete 0.050s (20.000 fps)


ffmpeg installation:

> pi at rockpis:~$ ffmpeg
> ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg
> developers
>   built with gcc 7 (Ubuntu/Linaro 7.3.0-16ubuntu3)
>   configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1
> --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu
> --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping
> --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
> --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
> --enable-libcdio --enable-libflite --enable-libfontconfig
> --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
> --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
> --enable-libopenmpt --enable-libopus --enable-libpulse
> --enable-librubberband --enable-librsvg --enable-libshine
> --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh
> --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2
> --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx
> --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394
> --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r
> --enable-libopencv --enable-libx264 --enable-shared
>   WARNING: library configuration mismatch
>   avcodec     configuration: --prefix=/usr
> --extra-version=0ubuntu0.18.04.1 --toolchain=hardened
> --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu
> --enable-gpl --disable-stripping --enable-avresample --enable-avisynth
> --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray
> --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite
> --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa
> --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse
> --enable-librubberband --enable-librsvg --enable-libshine
> --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh
> --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2
> --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx
> --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394
> --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r
> --enable-libopencv --enable-libx264 --enable-shared --enable-version3
> --disable-doc --disable-programs --enable-libopencore_amrnb
> --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
>   libavutil      55. 78.100 / 55. 78.100
>   libavcodec     57.107.100 / 57.107.100
>   libavformat    57. 83.100 / 57. 83.100
>   libavdevice    57. 10.100 / 57. 10.100
>   libavfilter     6.107.100 /  6.107.100
>   libavresample   3.  7.  0 /  3.  7.  0
>   libswscale      4.  8.100 /  4.  8.100
>   libswresample   2.  9.100 /  2.  9.100
>   libpostproc    54.  7.100 / 54.  7.100
> Hyper fast Audio and Video encoder
> usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
> outfile}...



-- 
greetings

*Pumuckll aka Gerhard*


More information about the ffmpeg-user mailing list