

robertoj
Members-
Posts
370 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Everything posted by robertoj
-
I have been unable to work on my armbian projects for a month... Has anybody made any progress about H264 decoding in H3? Thank you!
-
Open Media Vault will not install on bookworm
robertoj replied to Braccea's topic in Software, Applications, Userspace
if you install OpenMediaVault on an OS version that is not supported by them, you will see many errors. -
Try using the armbian build script to configure the Linux kernel the way you need it. One of the kernel configurations is "Add wireguard" Here are general instructions on how to recompile the kernel and rebuild the OS image in your PC https://github.com/robertojguerra/orangepi-zero-full-setup/blob/main/README2.md From the wireguard website: https://www.wireguard.com/compilation/ In the linux menuconfig, find: [*] Networking support --> Networking options --> [*] TCP/IP networking [*] IP: WireGuard secure network tunnel [ ] Debugging checks and verbose messages And select "M" for kernel module
-
I read your github readme, but I am not 100% that you read the instructions for armbian's first run script: https://github.com/armbian/build/blob/main/packages/bsp/armbian_first_run.txt.template Try following that, and maybe the SSH problems will not be an issue with Debian, even if they are an issue with Raspbian.
-
Dpkg and apt won’t work For you… since you are using an rpm/yum/dnf operating system 🤣 good point. Mesa may also need recompilation to match a patched kernel (analog video patch), and see whether LibreElec has done anything to Mesa. update: LibreElec patched the linux kernel to add analog video and there’s only one H file affected for this purpose: sun8i_mixer.h but I will still recompile mesa to see if it helps the gbm functionality Patch: https://github.com/LibreELEC/LibreELEC.tv/blob/d43e1a4d9222a949a346f23779c547f7e1208c43/projects/Allwinner/patches/linux/0036-wip-h3-h5-cvbs.patch#L4 instructions: https://github.com/robertojguerra/orangepi-zero-full-setup/blob/main/README2.md
-
Don’t give up yet. i found this discussion, where retroarch is recompiled, using a libgbm-dev installed just in time… so that Mesa’s (GPU library) gbm component matches exactly with the desired retroarch in that discussion. i have a feeling that we must do the same, but compiling ffmpeg and mpv with the latest available libgbm-dev in place… perhaps just mpv. Usualuser… can you share the mesa and libgbm version you are using? dpkg -l | grep libgbm or libOSmesa MAYBE there are some useful tips here: https://bbs.archlinux.org/viewtopic.php?id=278390
-
I am using allwinner h3, and you are using A64… I don’t know whether cedrus.ko is right for you. Look in this thread here, whether any kernel module has created a /dev/video device that can input h264, like cedrus can. Run libreeelec again and take note of the kernel version, the kernel modules, and the “.config”, and try to rebuild armbian with those options. https://github.com/robertojguerra/orangepi-zero-full-setup/blob/main/README2.md then you would be at the same spot where I am, with the kernel being unable to display the video due to some gbm missing functionality in my kernel.
-
Thank you… I will try with more LibreElec patches this week. but LibreElec’s windowing system is GBM, not X11… so that’s a thing that I need to follow… somehow.
-
what I meant is: I want to buy an orangepi H3 with HDMI port, so that I see if there's any difference in hardware decoding. But the ultimate goal is that I get hardware decoding in analog video... it is possible, because Kodi does it. I has been a very long time since I used RedHat... I used yum ... I will see whether "dnf builddeps" has an equivalent in Debian I found in this discussion that: if ffmpeg hardware decoding works with "-f null -", but fails to present the video (my situation), then the problem might be the display driver: https://forum.libreelec.tv/thread/25283-allwinner-h6-hevc/?postID=167090#post167090 Another important variable is the way mpv was configured before compile. Anyone who got it working, check the first few lines of running MPV. For example (something I found in the mpv github):
-
What would be the closest orange pi to orange pi zero? Ideally it would be H3, with both HDMI and analog video.
-
Yes. I have applied that drmprime patch also. I think it is a drm or gbm issue now.
-
When kodi starts playing an h264 file with hardware decoding, the debug log looks like this (I removed lines with mjpeg and [mov because they were 99% of the lines, making noise.) Kodi's ffmpeg is using function deint_v4l2m2m_destroy_context, which is part of another patch, which I didn't have: vf_deinterlace_v4l2m2m I am compiling it now Result: mpv takes the VAAPI route, then software decoding
-
The previous LibreElec+Kodi, and the latest LibreElec+Kodi, with the latest linux kernel version, with the LibreElec patches (for Linux, ffmpeg, etc) run on the OrangePiZero, and provides hardware H264, in the analog video output.
-
Thank you. I havent tried anything today, but tomorrow I will try a lower ffmpeg version. Maybe ffmpeg 6.0 is too new for mpv (although kodi is able to use it) update: I tried it with ffmpeg 5.1.3… and i am still getting the same error in mpv: hwdec not supported drm, and falling into software decoding. is there any need to “—enable-v4l2”?… (I can’t because my Debian does not have libv4l2-dev… only libv4l-dev) i will document this better today. I will poke around kodi once again (same orangepi zero model, with the same CVBS pal/ntsc output, does hardware h264 everyday)… I would need to know what the internal ffmpeg and gbm are doing together)
-
Thank you... This is what I get: (running from SSH worked the same way as running from the console, without Xserver or desktop) And when I run it from within the lxde desktop manager: In both cases, the CPU use is 200% i am using Debian bookworm’s default MPV 0.35.1… what ubuntu or debian did you build with armbian-build? When you built ffmpeg with the v4l2_request patch, did you add only "--enable-v4l2-request --enable-libdrm --enable-libudev".. can you share your ffmpeg banner (the text identifying itself and the ./configure options)? Did you install ffmpeg with these instructions? https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu The special part is that ffmpeg stays in ~/bin, and many other codecs are enabled.
-
Jernej, I am trying the ffmpeg with just the v4l2_request patch... while the other additional patch is compiling Running ffmpeg -loglevel debug -hwaccel drm -hwaccel_output_format drm_prime -i video.mkv -f null - It looks like some decoding is happening, I see that v4l2_request is being used: I will try it with mpv mpv --hwdec=drm --hwdec-codecs=all youtube720p.mp4 decodes with CPU mpv --hwdec=gpu --hwdec-codecs=all --drm-drmprime-videoplane=primary youtube720p.mp4 decodes with CPU ffmpeg -loglevel debug -hwaccel drm -hwaccel_output_format drm_prime -i youtube720p.mp4 -vcodec copy -acodec copy -f matroska - | ffplay -i - decodes with CPU ffmpeg -loglevel debug -hwaccel drm -hwaccel_output_format drm_prime -i youtube720p.mp4 -vcodec copy -acodec copy -f h264 - | ffplay -i - decodes with CPU ffmpeg -loglevel debug -hwaccel drm -hwaccel_output_format drm_prime -i youtube720p.mp4 -vcodec copy -acodec copy -f drm_prime - | ffplay -i - does not work I keep trying
-
Usual user… what do you get with “vainfo” … does it matter? Are there other components at play, more required Linux patches, libraries sandwiched between Linux and ffmpeg? installing Linux-headers (armbian sunxi edge deb) before repeating ./configure and make, for ffmpeg, did nothing for me… no difference. Should it make a difference? update: I am back home, and I checked that the "hwcontext_drm: do not require drm device" patch is already included in ffmpeg 6.0... so it was already in my ffmpeg last night. In the libreelec forum, someone has added this patch: https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-drmprime/ffmpeg-001-v4l2-drmprime.patch So, I am adding this patch and compiling again. He aims to make it work for Rockchip and still hasn't been successful yet, by the way.
-
Negative results Test: Run (both starting from SSH without X running): From the terminal in the CVBS console I was able to make an MPV log: Tomorrow I will try with jernej's and kiwiboo's github source update: jernejs code cant compile, because the compiler thinks there's no FPU But I see some people solving this problem: https://github.com/openssl/openssl/issues/18818
-
OH roberto@orangepizero:~$ ffmpeg -hide_banner -decoders|grep request ... returns NOTHING Also: checking linux headers, there's only these relevant available I didn't have them installed at all... this means I need to rebuild my ffmpeg+libreelec patch... to get the v4l2_request codec? I am currently rebuilding ffmpeg, after installing the kernel-headers. Do I need to set CMA=128M in bootargs? update: after I ran ./configure, I saw: While waiting that ffmpeg compiles, I check that the latest libreelec, with linux 6.1.19, runs great, using the cedrus driver, although not in module form, but incorporated in the kernel. LibreELEC:~ # uname -a Linux LibreELEC 6.1.19 #1 SMP PREEMPT Sat Mar 18 16:09:53 UTC 2023 armv7l GNU/Linux LibreELEC:~ # dmesg |grep cedrus [ 0.784939] cedrus 1c0e000.video-codec: Device registered as /dev/video0 Checking the libreelec patches... I see that these linux files are patched: https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/patches/linux/0061-media--cedrus--Don-t-CPU-map-source-buffers.patch https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/patches/linux/0020-media-cedrus-Add-callback-for-buffer-cleanup.patch https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/patches/linux/0021-media-cedrus-hevc-Improve-buffer-management.patch https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/patches/linux/0022-media-cedrus-h264-Improve-buffer-management.patch Are they needed?
-
I succeeded at compiling ffmpeg 6.0 with libreelec's patch: wget https://ffmpeg.org/releases/ffmpeg-6.0.tar.bz2 wget https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch unzip and go inside ffmpeg dir patch -p1 < ffmpeg-001-v4l2-request.patch ./configure, make and install as per https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu, plus --enable-v4l2-request --enable-libdrm --enable-libudev The compilation finished with no errors Tests: I checked that my ffmpeg source had the lines of code, so it is compatible with mpv: https://github.com/Kwiboo/FFmpeg/commit/c2a9396e0c1b302a88f82d6a420111c9d495c322 Then, to test it mpv --vo=gpu --gpu-context=drm --hwdec=auto video.mkv It fails like this: Next I disabled the lightdm window desktop manager. Then to play from ssh: export DISPLAY=:0.0 I tried the same mpv command, and it played, with CPU decoding, and these video errors: And just to be sure, I share my v4l2-compliance... and my linux is 6.1.15-sunxi, with updated Debian Bookworm Is this normal?
-
The patch correction is to replace the hunk: with: Then, h264_slice.c compiles, but the whole make process fails this way: Should I replace ioctl with something, and close with pclose? (it looks like ioctl gets used 30 times in this file, and close 6 times) I found that the other v4l2_*.c use this line, so I will add it and try again: #include <sys/ioctl.h> Also, the complaint about close(), was because it needed #include <unistd.h> After making the change in v4l2_request.c, I ran make again, then it restarted in that same file Update: the compilation failed in the last file linking: I am going to try other versions of ffmpeg
-
I have posted full instructions here: https://github.com/robertojguerra/orangepi-zero-full-setup It will be better for you, because when there are improvements, you can test it immediately.
-
Yesterday, I was able to build the unpatched source of ffmpeg (the snapshot available in this date), and it ran fine, with CPU H264 decoding. https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu Then, I downloaded this libreelec patch. https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch with: cd ffmpeg_sources/ffmpeg patch -p1 < ffmpeg-001-v4l2-request.patch There was only 1 hunk error. patching file libavcodec/h264_slice.c Hunk #1 FAILED at 808. Hunk #2 succeeded at 861 (offset 7 lines). 1 out of 2 hunks FAILED -- saving rejects to file libavcodec/h264_slice.c.rej I am working on fixing this patch correctly.
-
Update: I installed armbian-bookworm. The gstreamer in that distro has the same v4l2 codecs… but can’t play the h264 because of a dkms and drm issue… I was starting it from within Lterm in LXDE. then I tried turning off lightdm (the graphical desktop), and repeated, from SSH, with export display 0 the orangepi zero became unresponsive, as if it had crashed. I will do other tests tonight. I left it building vanilla ffmpeg, as a practice run to build the patched ffmpeg.