The state of mainline hardware decoding
#11
Hi!

Thanks for reply. Seems I have decoding working with ffmpeg, following steeps here https://github.com/blakeblackshear/friga...-939294837:

sudo ffmpeg -f v4l2 -input_format mjpeg -video_size 1920x1080 -hwaccel drm -loglevel debug -i /dev/video1 -c:v copy output.mp4


Quote:...
Splitting the commandline.

Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'mjpeg'.
Reading option '-video_size' ... matched as AVOption 'video_size' with argument '1920x1080'.
Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW accelerated decoding) with argument 'drm'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument '/dev/video1'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'output.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url /dev/video1.
Applying option f (force format) with argument v4l2.
Applying option hwaccel (use HW accelerated decoding) with argument drm.
Successfully parsed a group of options.
Opening an input file: /dev/video1.
[video4linux2,v4l2 @ 0xaaaadf294d50] fd:3 capabilities:84a00001
[video4linux2,v4l2 @ 0xaaaadf294d50] Current input_channel: 0, input_name: Camera 1, input_std: 0
[mjpeg @ 0xaaaadf2960a0] marker=d8 avail_size_in_buf=182990
[mjpeg @ 0xaaaadf2960a0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0xaaaadf2960a0] marker=c0 avail_size_in_buf=182988
[mjpeg @ 0xaaaadf2960a0] Changing bps from 0 to 8
[mjpeg @ 0xaaaadf2960a0] sof0: picture: 1920x1080
[mjpeg @ 0xaaaadf2960a0] component 0 2:1 id: 0 quant:0
[mjpeg @ 0xaaaadf2960a0] component 1 1:1 id: 1 quant:1
[mjpeg @ 0xaaaadf2960a0] component 2 1:1 id: 2 quant:1
[mjpeg @ 0xaaaadf2960a0] pix fmt id 21111100
[mjpeg @ 0xaaaadf2960a0] Format yuvj422p chosen by get_format().
[mjpeg @ 0xaaaadf2960a0] marker parser used 17 bytes (136 bits)
[mjpeg @ 0xaaaadf2960a0] marker=db avail_size_in_buf=182969
[mjpeg @ 0xaaaadf2960a0] index=0
[mjpeg @ 0xaaaadf2960a0] qscale[0]: 2
[mjpeg @ 0xaaaadf2960a0] index=1
[mjpeg @ 0xaaaadf2960a0] qscale[1]: 4
[mjpeg @ 0xaaaadf2960a0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0xaaaadf2960a0] marker=c4 avail_size_in_buf=182835
[mjpeg @ 0xaaaadf2960a0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0xaaaadf2960a0] escaping removed 398 bytes
[mjpeg @ 0xaaaadf2960a0] marker=da avail_size_in_buf=182415
[mjpeg @ 0xaaaadf2960a0] marker parser used 182017 bytes (1456136 bits)
[mjpeg @ 0xaaaadf2960a0] marker=d9 avail_size_in_buf=7
[mjpeg @ 0xaaaadf2960a0] decode frame unused 7 bytes
[video4linux2,v4l2 @ 0xaaaadf294d50] All info found
...


Still I am not sure if using hwaccel in decoding, but at least CPU use is close to 2-4%, but I don't know if this is because used copy on encoding. Is there a way to know if using hwaccel in decoding here? I don't know if this part of the debugs says so: "Applying option hwaccel (use HW accelerated decoding) with argument drm."

That being done, I need encoding or some way to stream RTSP with decoding only (I say this because my main idea is to use rtsp-simple-server but needs encoding too for that)

Any thoughts?
  Reply


Messages In This Thread
RE: The state of mainline hardware decoding - by gusarg81 - 11-02-2021, 10:54 AM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)