The state of mainline hardware decoding
(11-17-2021, 01:32 PM)gusarg81 Wrote: If someone have and idea to avoid the encoding part, please let me know (because I am kind new to the world of decoding/encoding and all related video processing stuff).

You can avoid both the encoding and decoding part if you stream-copy, though whether the MJPEG stream coming from the webcam is suitable for this is an entirely different question.

Here's an example:

ffmpeg -input_format mjpeg -framerate 30 -video_size 1280x720 -i /dev/video0 -c:v copy -f rtsp rtsp://localhost:8554/live

the -input_format mjpeg -framerate 30 -video_size 1280x720 before the -i /dev/video0 set up some options for our input, namely that we ask video4linux2 for the mjpeg stream of the camera, at a framerate of 30 frames per second, with a video size of 1280x720. -i /dev/video0 sets our input device; in this case /dev/video0 (replace with 1 or 2 if there are other cameras on the system).

-c:v copy tells ffmpeg to stream-copy the video stream, meaning it will not decode or encode it. -f rtsp sets the output format to rtsp, and what follows is the URL for this.

In this case, you won't be needing any hardware decoding or encoding, and your CPU won't be stressing too much as it's essentially doing not much at all.

Back to the topic at hand though: there currently is no mainline driver implementation of the hardware encoder for this particular SoC, as far as I'm aware. But that shouldn't be too big of an issue for mjpeg encoding if you end up having to reencode, as it should be very fast either way.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux

Messages In This Thread
RE: The state of mainline hardware decoding - by CounterPillow - 11-17-2021, 02:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information Linux Mainline ayufan 63 94,692 05-14-2021, 10:41 AM
Last Post: Wizzard
  Hardware acceleration using FFmpeg gusarg81 0 2,905 08-21-2020, 01:36 PM
Last Post: gusarg81
  mainline kernel sound support Openwrt lucize 2 4,146 05-01-2020, 05:09 PM
Last Post: PakoSt
  Hardware Status Monitoring? Leapo 7 15,339 03-15-2020, 08:44 AM
Last Post: bendem
  Any advantages to using the mainline kernel dkebler 0 2,155 11-16-2019, 12:17 PM
Last Post: dkebler
  Does anybody run the mainline kernel? CameronNemo 3 4,741 09-09-2019, 07:56 PM
Last Post: CameronNemo
  hardware-accelerated video transcoding (Plex) on Rock64 mdr 2 7,456 02-07-2019, 03:42 PM
Last Post: mdr
  Updates on Mainline Linux Support? hnaguski 0 2,512 09-11-2018, 08:16 PM
Last Post: hnaguski
  How to do hardware decoding of video? SuperSaiyanCaleb 9 15,902 08-28-2018, 01:39 PM
Last Post: mcerveny
  H264 hardware encoder not work sueshieh 3 6,627 11-02-2017, 03:57 AM
Last Post: dalmate

Forum Jump:

Users browsing this thread: 1 Guest(s)