[FFmpeg-user] MJPEG encoding

Gerhard Dorner gdorner.gd at gmail.com
Thu Feb 27 20:12:50 EET 2020


Hello,

currently I stream  a h264 Video with an RPI3 Usb Camera, on my network.
This works well, but one of my clients need mjpeg.

this is command

> ffmpeg -nostdin -hide_banner -loglevel error -input_format yuyv422 -f
> video4linux2 -s 1280x720 -r 10 -i /dev/video0 -c:v h264_omx -r 10 -b:v 2M
> -vf
> "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text='%{localtime}:x=8:y=8:fontcolor=white:
> box=1: boxcolor=black" -an -f rtsp rtsp://localhost:80/live/stream
>

  How could  I add the mjpeg codec to my installation
the build:

> sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-omx
> --enable-omx-rpi --enable-nonfree --enable-libfreetype --enable-libx264
> --enable-libmp3lame --enable-mmal --enable-indev=alsa --enable-outdev=alsa
>
>


And how can I stream in mjpeg format with less cpu consummation.

Is hardware acceleration on the Pi with mjpeg possible?


My ffmpeg installation:

ffmpeg version git-2020-02-22-c116dd8 Copyright (c) 2000-2020 the FFmpeg
> developers
>   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
>   configuration: --arch=armel --target-os=linux --enable-gpl --enable-omx
> --enable-omx-rpi --enable-nonfree --enable-libfreetype --enable-libx264
> --enable-libmp3lame --enable-mmal --enable-indev=alsa --enable-outdev=alsa
>   libavutil      56. 41.100 / 56. 41.100
>   libavcodec     58. 72.100 / 58. 72.100
>   libavformat    58. 39.100 / 58. 39.100
>   libavdevice    58.  9.103 / 58.  9.103
>   libavfilter     7. 76.100 /  7. 76.100
>   libswscale      5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
>



greetings

*Gerhard*


More information about the ffmpeg-user mailing list