Jump to content

schunckt

Members
  • Posts

    31
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Ryzer There is no "ffmpeg -hwaccel drm-copy" option. Looks like this is mpv only, which - as said - doen't work with framebuffer. glxgears also can't work because i have no OpenGL. But in general that's a good hint. I'll create some small videos with different resolutions and compressions and measure the fps. Maybe that helps to nail down the issue. btw. I've not yet tested VLC. Need to figure out if this is a ffmpeg issue or something else inside the kernel, i.e. v4l2request related ... @robertoj Trying another image doesn't make much sense for me for several other reasons. T.
  2. Thanks for your feedback. But as I wrote, it looks like hw accel works in general when checking the much lower CPU load vs. the fps. CPU 4x100% => ~10fps HW 1x20% => ~6fps Thats why I think the VPU really gets used but not optimal. btw. I did not yet get mpv to work with frambebuffer. T.
  3. No, I did not compile this time. I used the downloaded image (need to double check exactly which one). Before trying this path (have to update my build env first😀) I'd try to get a better understanding about the root cause of the slowness. I think next I'll play around with mpv instead of ffmpeg. I'd prefer ffmpeg for other reasons, but testing mpv is worth to spend some time. T.
  4. @robertoj right, that worked for me as well But the remaining issue is the slowness. Meanwhile I also tested ffmpeg unscaled and no rgb conversion to /dev/null outputt but still slow. Maybe there is some pre/postprocessing done which cloud be tuned further. If i remember right there are some v4l2* features which may impact the processing but I'm not sure if this was camera capture related. Another idea: It seems the VPU clock source is configurable (inside DT) maybe that's not quite right? T.
  5. Great, thanks for the links! Meanwhile it works partially. The DT tweaking was not needed. I made a mistake by specifying the armbian extraargs. I added a second line to armbianEnv.txt but realized all args must be one line. I had to increase cma=256M (Yes, really, tested all lower values). Then it works, BUT ... Fun fact, will further investigate: Decoding with "-hwaccel drm" results in lower fps (about 6..8) whereas software decoder goes up to 10 😀 Decoding has been verified with htop. CPU only => 4 cores 100%. hwaccel one core about 20% which is likely th e yuv to rgb and scaling. Maybe this is still an issue caused by DT, at least when reading https://gregdavill.com/posts/allwinner-s3-videoencoders/ It specifies memory-region = <&cma_pool>; which is missing in my decompiled DT, also the referenced reserved-memory section. Maybe that's not needed if it's coded inside the driver or specified elswhere. T.
  6. Hi all! On NanoPi Duo2 I'm trying to use the builtin video hw processor. ffmpeg already works with -hwaccel v4l2request but throws errors: Press [q] to stop, [?] for help [h264 @ 0x11645f0] Using V4L2 media driver cedrus (6.12.35) for S264 [V4L2RequestContext @ 0xae5f0db0] Failed to create buffer of type 1: Cannot allocate memory (12) [h264 @ 0x11645f0] Failed setup for format drm_prime: hwaccel initialisation returned error. dmesg [ 8906.864389] cma: __cma_alloc: reserved: alloc failed, req-size: 3038 pages, ret: -12 [ 8906.872255] cma: number of available pages: 42@86+128@384+34@3550+34@6622+34@9694+34@12766+34@15838+34@18910+34@21982+1570@25054=> 1978 free of 26624 total pages [ 8906.886783] cedrus 1c0e000.video-codec: dma alloc of size 12443648 failed root@nanopiduo2:~# I already did play around with armbianEnv tweaking extraargs cma but no success. I found a link talking about VPU device tree dma limitations https://git.sec.in.tum.de/croemheld/linux/-/blob/v5.1-rc5/Documentation/devicetree/bindings/media/cedrus.txt I already decompiled the DT and verified there are is no such "reserved-memory" section. Is this the root cause? Maybe someone can provide some hints or ideas confirming that I'm on the right track? If yes I'd give it a try adjusting the DT. T.
  7. Hi guys, Since I'm out of GPIOs I would like to reuse the Debug UART0 RX/TX in "release" if no serial module is attached. I'm using a nanopi Duo2 but that question applies to the general strategy. The NanoPi UART0 RX can be used as PA5, PWM output. I did already play successfully with overlay files for other purposes so I know a little how that works. Can I create a overlay with shared usage, and depending on the loaded module (tty*) the RS232 is operating, or when this is stopped i can use the PWM out? Is this "Shared overlay" in general the right approach? If yes could someone point me to some hints how to craft such a sharing overlay? Sure I need to figure out in general how to setup PWM but thats a different story i think. Thilo
  8. Hi all! I may need some pointers. I'm using a 2.4" LCD at spi1 which works as /dev/fb0 on armbian bookworm (6.1.63) Meanwhile I've learned frambuffer is deprecated and to be replaced by drm., but ... - I could not find enough details to understand the drm architecture in general - there is a linux/drivers/gpu/drm/tiny/ili9341.c how is that used at all? - How to use drm in armbian? For my case any acceleration is not necessary (and likely not possible even if the H3 has Mali Hardware) but I want to avoid further changes if /fbX is really gone. btw. I want to add touch with shared SPI soon, work in progress. Of course that should also work then later on with drm - I'm thinking of any possible conflicts inside the Device Tree which then may need further tweaking. It's all nice but sooooooo time consuming... T.
  9. I can confirm 6.1.47 now works! One caveat: Highest resolution 2592x1944 still has the cma/dma memory error like 6.4.x. But as of now I don't mind. I'll focus next on the harware encoding and other hardware resting, Thilo
  10. Great! I'll give it a try, likely next weekend. Thilo
  11. @going "Maybe it's a hardware limitation?" this can't be true because highest resolution works with the "original" friendlyCore 4.14 image/kernel. @Gunjan Gupta im quite sure 2592x1944 worked in Armbian_21.08.1_Nanopiduo2_focal_current_5.10.60 but i can retry using the prepared SD card (I hope this still is there 🙂) About 6.1: I don't mind if it only works on the latest 6.4x series, I'm fine staying there and proceed with other development like hwaccell and other stuff, like spi display retest and the like. FYI using the "friendly" I already was able to capture and playback on fbi / spi display, other i2c sensors are working, ola DMX output works, .net6 works with swagger UI ... Goal is have this all working in latest armbian plus hwaccel (if possible) btw. if you really find the root cause in 6.1 don't hesitate to share the source code of the problematic area. I'm curious... Thanks! Thilo
  12. @going it seems the higest resolution 2592x1944 fails because of this: [ 593.498632] cma: cma_alloc: reserved: alloc failed, req-size: 1846 pages, ret: -16 [ 593.498684] sun6i-csi 1cb0000.camera: dma alloc of size 7561216 failed already increased cma to 256M but doesnt help. Anyway. Will proceed next with the encoder/decoder and fullhd 1920x1080 (works), that's more important for me. Thilo
  13. Did further play around with ffmpeg and v4l pipeline. This now WORKS also 6.4.8-sunxi (Armbian_23.08.0-trunk_Nanopiduo2_jammy_edge_6.4.8_minimal build from 07-Aug) v4l2-ctl --device /dev/video1 --set-fmt-video=width=1280,height=720,pixelformat=YUYV media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/1280x720]' ffmpeg -i /dev/video1 -q 10 -pix_fmt yuv420p -video_size 1280x720 -r 5 -listen 1 -f avi http://192.168.179.55:8080/stream VLC http://192.168.179.55:8080/stream ffmpeg is version 4.4.2-0ubuntu0.22.04.1 This means, there was a problem "behind the scenes" in 6.1x which is now fixed. Other parameters which did work in the past and now failing might be a side effect of internal improvments. I'll figure out anyway because this kernel now also contains the cedrus video engine and I want to use that for encoding and decoding. So from my point of view the issue is solved. @going the highest resolution 2592x1944 did work in friendlycore xenial 4.14 so the driver WAS able to do so. Don't know yet if something is now broken - but as said above need to play around anyways. Thanks @all! Thilo
  14. Progress still on nanopiduo2 6.4.8-sunxi Meaniwhile i tried ustreamer which now WORKS at least with 640x480 like so: v4l2-ctl --device /dev/video1 --set-fmt-video=width=640,height=480,pixelformat=YUYV media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/640x480]' ./ustreamer -d /dev/video1 --host 192.168.179.55 -r 640x480 and VLC plays http://192.168.179.55:8080/stream will now go ahead trying ffmpeg and will test ustreamer on 6.1.x (But I'd prefer using latest build anyway!) Thanks! Thilo
  15. Did build 'edge' have now Linux nanopiduo2 6.4.8-sunxi #1 SMP Thu Aug 3 08:26:15 UTC 2023 armv7l armv7l armv7l GNU/Linux No more crashes 😀 but now no video🙄. mjpg_streamer says "cant enable video" dmesg shows sun6i-csi 1cb0000.camera: invalid input/output format combination tried sveral params which did work in the past, no luck as yet. Will do further testing later on. v4l2-ctl -d /dev/video1 --all Driver Info: Driver name : sun6i-csi Card type : sun6i-csi-capture Bus info : platform:1cb0000.camera Driver version : 6.4.8 Capabilities : 0xa4200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x24200001 Video Capture Streaming Extended Pix Format Media Driver Info: Driver name : sun6i-csi Model : Allwinner A31 CSI Device Serial : Bus info : platform:1cb0000.camera Media version : 6.4.8 Hardware revision: 0x00000000 (0) Driver version : 6.4.8 Interface Info: ID : 0x0300000e Type : V4L Video Entity Info: ID : 0x0000000c (12) Name : sun6i-csi-capture Function : V4L2 I/O Pad 0x0100000d : 0: Sink, Must Connect Link 0x02000010: from remote pad 0x1000003 of entity 'sun6i-csi-bridge' (Video Interface Bridge): Data, Enabled, Immutable Priority: 2 Video input : 0 (sun6i-csi-capture: ok) Format Video Capture: Width/Height : 640/480 Pixel Format : 'YUYV' (YUYV 4:2:2) Field : None Bytes per Line : 1280 Size Image : 614400 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Limited Range) Flags : looks good but that "sun6i-csi-bridge" seems to be different!?! also i have spi-spidev overlay enabled but there is no /dev/spi* Maybe I made something wrong when building the image!?!? ov5640 load shows root@nanopiduo2:~# dmesg | grep ov5640 [ 8.767826] ov5640 2-003c: supply DOVDD not found, using dummy regulator [ 8.768164] ov5640 2-003c: supply AVDD not found, using dummy regulator [ 8.768320] ov5640 2-003c: supply DVDD not found, using dummy regulator [ 8.775980] ov5640 2-003c: Consider updating driver ov5640 to match on endpoints The last line is new i think. Need to figure out what that means... Thilo
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines