11-02-2021, 10:54 AM
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
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?
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?