Jump to content

FGuerzoni

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by FGuerzoni

  1. Thank you, 'your' was for shortness I hoped it could support at least main profile. I have to encode 1080p streams and baseline profile it's not well suited. Regards F
  2. Hi @Ubobrov, thank you very much for all the infos. Very very interesting. About H.264 encoding, what profile types your driver supports? (base, main, high, ...)
  3. After a fresh new complete rebuild and reinstall following a clean procedure I got the same troubles. Giving up for now until I get some grip on the issue. Currently it's just a black box for me. @jernej Thank you for all your support and patience.
  4. I was not aware of that option. My bad. I only had to left out --enable-libopencv because even if installed it cannot be seen. Don't know why. Anyway, after ffmpeg and mpv rebuilt anything changed. > ffmpeg ffmpeg version n4.0.4-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-v4l2-request --enable-libudev libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... The reason is here: [vd] Trying hardware decoding via h264_v4l2m2m-v4l2m2m-copy. [vd] Using underlying hw-decoder 'h264_v4l2m2m' [ffmpeg] h264_v4l2m2m: Could not find a valid device [ffmpeg] h264_v4l2m2m: can't configure decoder [vd] Could not open codec. [vd] Falling back to software decoding. Please check the attached log for details mpv_log_201909251312
  5. Thank you, I did a first quick attempt because of little time available, but I was not able to build ffmpeg with so many options. I got troubles installing so many libraries and make them available to ffmpeg. I'll retry later.
  6. After complete rebuild and reinstall of everything it's still not working. It falls back to software decoding with cpu over 350% The file to decode is the standard Big Bucket Bunny at 1080p > whereis libdrm libdrm: /usr/lib/arm-linux-gnueabihf/libdrm.so /usr/include/libdrm /usr/share/libdrm > whereis libudev libudev: /lib/arm-linux-gnueabihf/libudev.so /usr/include/libudev.h /usr/share/man/man3/libudev.3.gz > ls /usr/src/linux-headers-5.3.1-sunxi/ Documentation Makefile arch certs drivers include ipc lib net scripts sound usr Kconfig Module.symvers block crypto fs init kernel mm samples security tools virt and mpv log of > mpv --vo=null --hwdec=auto -v bbb_1080p.mp4 is in the attached file. mpv_log_201909241048
  7. I checked the armbian config-default.conf where the option is empty instead of "yes" INSTALL_HEADERS="" # install kernel headers package Tomorrow I'll rebuild everything and I'll let you know if it's working Thanks and regards
  8. Maybe I have problems on kernel headers. Please confirm me that this is the right way to search for them > whereis libdrm libdrm: /usr/lib/arm-linux-gnueabihf/libdrm.so /usr/include/libdrm /usr/share/libdrm > whereis libudev libudev: /lib/arm-linux-gnueabihf/libudev.so /usr/include/libudev.h /usr/share/man/man3/libudev.3.gz > sudo ls /usr/src/kernels/$(uname -r) ls: cannot access '/usr/src/kernels/5.3.0-sunxi': No such file or directory
  9. You are right, even if I don't understand why because I've explicitly set '--enable-v4l2-request' > ffmpeg ffmpeg version n4.0.4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) configuration: --enable-v4l2-request --enable-libudev --enable-libdrm libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... > ffmpeg -decoders | grep h264 ffmpeg version n4.0.4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) configuration: --enable-v4l2-request --enable-libudev --enable-libdrm libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 VFS..D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 V..... h264_v4l2m2m V4L2 mem2mem H.264 decoder wrapper (codec h264) > ffmpeg -hwaccels ffmpeg version n4.0.4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) configuration: --enable-v4l2-request --enable-libudev --enable-libdrm libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 Hardware acceleration methods: vdpau vaapi drm
  10. I had some progresses using 'null'. But it's logging that it's using software decoding. From that the fact the cpu is very high. > mpv --vo=null --hwdec=auto -v bbb_1080p.mp4 [cplayer] Command line options: '--vo=null' '--hwdec=auto' '-v' 'bbb_1080p.mp4' [cplayer] mpv 0.28.2 (C) 2000-2017 mpv/MPlayer/mplayer2 projects [cplayer] built on Sun Sep 22 11:14:34 UTC 2019 [cplayer] ffmpeg library versions: [cplayer] libavutil 56.14.100 [cplayer] libavcodec 58.18.100 [cplayer] libavformat 58.12.100 [cplayer] libswscale 5.1.100 [cplayer] libavfilter 7.16.100 [cplayer] libswresample 3.1.100 [cplayer] ffmpeg version: n4.0.4 [cplayer] [cplayer] Configuration: ./waf configure [cplayer] List of enabled features: alsa asm atomics build-date cplayer cplugins cuda-hwaccel debug-build drm drmprime egl-drm egl-helpers egl-x11 encoding fchmod ffmpeg gbm gbm.h gl gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv libaf libass libass-osd libav-any libavcodec libavdevice libdl libm librt linux-fstatfs optimize oss-audio posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse stdatomic vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h x11 xv zlib [cplayer] Reading config file /usr/local/etc/mpv/encoding-profiles.conf [cplayer] Playing: bbb_1080p.mp4 [file] Opening bbb_1080p.mp4 [demux] Trying demuxers for level=normal. [lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048. [demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat) [cplayer] Opening done: bbb_1080p.mp4 [find_files] Loading external files in . [lavf] select track 0 [lavf] select track 1 [cplayer] (+) Video --vid=1 (*) (h264 1920x1080 30.002fps) [cplayer] (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz) [vd] Container reported FPS: 30.001577 [vd] Codec list: [vd] h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [vd] h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper [vd] Opening video decoder h264 [vd] Looking at hwdec h264-vdpau... [vd] Could not create device. [vd] Looking at hwdec h264-vaapi... [vd] Could not create device. [vd] Looking at hwdec h264-vdpau-copy... [vd] Could not create device. [vd] Looking at hwdec h264-vaapi-copy... [vaapi] libva: VA-API version 1.1.0 [vaapi] libva: va_getDriverName() returns -1 [vaapi] libva: va_getDriverName() failed with unknown libva error,driver_name=(null) [vd] Could not create device. [vd] Looking at hwdec h264_v4l2m2m-v4l2m2m-copy... [vd] Trying hardware decoding via h264_v4l2m2m-v4l2m2m-copy. [vd] Using underlying hw-decoder 'h264_v4l2m2m' [ffmpeg] h264_v4l2m2m: driver 'cedrus' on card 'cedrus' [ffmpeg] h264_v4l2m2m: Could not find a valid device [ffmpeg] h264_v4l2m2m: can't configure decoder [vd] Could not open codec. [vd] Falling back to software decoding. [vd] Detected 4 logical cores. [vd] Requesting 5 threads for decoding. [vd] Selected video codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) [ad] Codec list: [ad] aac - AAC (Advanced Audio Coding) [ad] aac_fixed (aac) - AAC (Advanced Audio Coding) [ad] Opening audio decoder aac [ad] Requesting 1 threads for decoding. [ad] Selected audio codec: aac (AAC (Advanced Audio Coding)) [cplayer] Starting playback... [af] Audio filter chain: [af] [in] 44100Hz stereo 2ch floatp [af] [out] 44100Hz stereo 2ch floatp [af] [ao] 44100Hz stereo 2ch floatp [ao] Trying audio driver 'pulse' [ao/pulse] requested format: 44100 Hz, stereo channels, floatp [ao/pulse] Library version: 11.1.0 [ao/pulse] Proto: 32 [ao/pulse] Server proto: 4294967295 [ao] Trying audio driver 'alsa' [ao/alsa] requested format: 44100 Hz, stereo channels, floatp [ao/alsa] using ALSA version: 1.1.3 [ao/alsa] opening device 'default' ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default [ao/alsa] Playback open error: No such file or directory [ao] Trying audio driver 'oss' [ao/oss] requested format: 44100 Hz, stereo channels, floatp [ao/oss] using '/dev/mixer' mixer device [ao/oss] using 'pcm' mixer channel [ao/oss] using '/dev/dsp' dsp device [ao/oss] Can't open audio device /dev/dsp: No such file or directory [ao] Failed to initialize audio driver 'oss' [cplayer] Could not open/initialize audio device -> no sound. [ad] Uninit audio decoder. [lavf] deselect track 1 [cplayer] Audio: no audio [vd] Using software decoding. [vd] Decoder format: 1920x1080 yuv420p auto/auto/auto/auto CL=mpeg2/4/h264 (auto 0.000000/0.000000/0.000000) [vd] Using container aspect ratio. [vf] Video filter chain: [vf] [in] 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited SP=1.000000 CL=mpeg2/4/h264 [vf] [out] 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited SP=1.000000 CL=mpeg2/4/h264 [cplayer] VO: [null] 1920x1080 yuv420p [cplayer] VO: Description: Null video output [cplayer] first video frame after restart shown [cplayer] playback restart complete [statusline] V: 00:05:08 / 00:10:34 (48%) Dropped: 508 [cplayer] EOF code: 6 [vd] Uninit video. [cplayer] finished playback, success (reason 3) [cplayer] [cplayer] [cplayer] Exiting... (Quit) > top - 21:39:21 up 1:33, 2 users, load average: 3.12, 1.37, 0.56 Tasks: 109 total, 1 running, 61 sleeping, 0 stopped, 0 zombie %Cpu(s): 65.7 us, 1.0 sy, 0.0 ni, 33.2 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st KiB Mem : 502912 total, 6120 free, 117948 used, 378844 buff/cache KiB Swap: 251452 total, 250172 free, 1280 used. 373080 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1721 armbi 20 0 179360 74832 11708 S 265.3 14.9 6:05.28 mpv 1439 armbi 20 0 4680 2200 1732 R 0.7 0.4 0:08.04 top 1720 root 20 0 0 0 0 I 0.3 0.0 0:00.05 kworker/0:2-eve
  11. Yes I have /dev/dri/card0 > ls /dev/dri/card0 /dev/dri/card0 but I don't have any monitor connected. NanoPiNeo doesn't have any HDMI output. Sorry, I wasn't aware that the physical monitor is mandatory. So with my device the only way is to dig into ffmpeg and understand why it's apparently not using the hw accels. I'll post results in case I'll get them. Thank you again Regards F
  12. Thank you jernej, there's no desktop environment at all and I'm running command from the command line. I'm using just the standard megous DEV branch patched with the kernel patches you suggested. I'm already able to run on the same device the VAAPI stack, which is quite limited because it's able to correctly decode only the base profile. From previous posts I got the fact that the ffmpeg way could decode any h264 profiles. Is it right? If so I'm very interested to make it work, because I don't have any idea when the VAAPI stack will be fully implemented. Regards F
  13. Digging a bit more Calling v4l2-ctl --log-status I'm getting the same 'Inappropriate ioctl for device' seen before > v4l2-ctl --list-devices --verbose cedrus (platform:cedrus): /dev/video0 VIDIOC_QUERYCAP: ok > v4l2-ctl --log-status --verbose VIDIOC_QUERYCAP: ok VIDIOC_LOG_STATUS: failed: Inappropriate ioctl for device
  14. Sure, thank you. Read below. What is not clear to me is if your patches still use VAAPI. In that case I've not yet installed (because of compilation errors to solve) libva-v4l2-request as suggested by https://linux-sunxi.org/Sunxi-cedrus libva-v4l2-request The main userspace component that supports the Cedrus VPU driver is the libva-v4l2-request VAAPI backend. It is available at: Repository: https://github.com/bootlin/libva-v4l2-request In the very same page it's also suggested for VLC, but could be the same for FFMPEG, to export LIBVA_DRIVER_NAME=v4l2_request Here's the output by MPV: sudo mpv -v --hwdec=auto --vo=drm ipc47_seq01.mp4 [sudo] password for armbi: [cplayer] Command line options: '-v' '--hwdec=auto' '--vo=drm' 'ipc47_seq01.mp4' [cplayer] mpv 0.28.2 (C) 2000-2017 mpv/MPlayer/mplayer2 projects [cplayer] built on Sun Sep 22 11:14:34 UTC 2019 [cplayer] ffmpeg library versions: [cplayer] libavutil 56.14.100 [cplayer] libavcodec 58.18.100 [cplayer] libavformat 58.12.100Aout [cplayer] libswscale 5.1.100 [cplayer] libavfilter 7.16.100 [cplayer] libswresample 3.1.100 [cplayer] ffmpeg version: n4.0.4 [cplayer] [cplayer] Configuration: ./waf configure [cplayer] List of enabled features: alsa asm atomics build-date cplayer cplugins cuda-hwaccel debug-build drm drmprime egl-drm egl-helpers egl-x11 encoding fchmod ffmpeg gbm gbm.h gl gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv libaf libass libass-osd libav-any libavcodec libavdevice libdl libm librt linux-fstatfs optimize oss-audio posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse stdatomic vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h x11 xv zlib [cplayer] Reading config file /usr/local/etc/mpv/encoding-profiles.conf [cplayer] Playing: ipc47_seq01.mp4 [file] Opening ipc47_seq01.mp4 [demux] Trying demuxers for level=normal. [lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048. [demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat) [cplayer] Opening done: ipc47_seq01.mp4 [find_files] Loading external files in . [lavf] select track 0 [cplayer] (+) Video --vid=1 (*) (h264 1920x1088 9.939fps) [vo/drm] VT_GETMODE failed: Inappropriate ioctl for device [vo/drm] Failed to set up VT switcher. Terminal switching will be unavailable. [vo/drm] Cannot retrieve DRM resources: Operation not supported [vo/drm] Failed to create KMS. [cplayer] Error opening/initializing the selected video_out (--vo) device. [lavf] deselect track 0 [cplayer] Video: no video [cplayer] No video or audio streams selected. [cplayer] finished playback, no audio or video data played (reason 4) [cplayer] [cplayer] [cplayer] Exiting... (Errors when loading file) The issue is in 'bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log)' in drm_common.c where: if (ioctl(s->tty_fd, VT_SETMODE, &vt_mode) < 0) { MP_ERR(s, "VT_SETMODE failed: %s\n", mp_strerror(errno)); return false; }
  15. Thank you for quick reply. That was first attempt I made but I got troubles: > mpv --hwdec=auto --vo=drm ipc47_seq01.mp4 Playing: ipc47_seq01.mp4 (+) Video --vid=1 (*) (h264 1920x1088 9.939fps) [vo/drm] VT_GETMODE failed: Inappropriate ioctl for device [vo/drm] Failed to set up VT switcher. Terminal switching will be unavailable. [vo/drm] Cannot retrieve DRM resources: Operation not supported [vo/drm] Failed to create KMS. Error opening/initializing the selected video_out (--vo) device. Video: no video No video or audio streams selected. Exiting... (Errors when loading file)
  16. Thank you jernej for the detailed instructions. I successfully built 5.3 kernel with cedrus driver enabled and the patched ffmpeg 4.0.4 on a NanoPiNeo I'm interested in processing streams from ip cameras on headless devices and I don't require mpv. I tried to directly run ffmpeg to test hardware decoding but it doesn't seem to take advantage of the hardware acceleration. CPU is still very high. I piped the output to a named pipe in order to discard it to remove any writing overhead to SD disk. Have you got any hints to take advantage of the hw accel? > cat outpipe > /dev/null > ffmpeg -i ipc47_seq03.h264 -c:v rawvideo -pix_fmt yuv420p -f rawvideo pipe:1 > outpipe ffmpeg version n4.0.4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) configuration: --enable-v4l2-request --enable-libudev --enable-libdrm libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 Input #0, h264, from 'ipc47_seq03.h264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)) Press [q] to stop, [?] for help Output #0, rawvideo, to 'pipe:1': 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A Metadata: encoder : Lavf58.12.100 Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, q=2-31, 622080 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.18.100 rawvideo av_interleaved_write_frame(): Broken pipeB time=00:00:53.28 bitrate=605734.1kbits/s speed=0.911x Error writing trailer of pipe:1: Broken pipe frame= 1305 fps= 22 q=-0.0 Lsize= 3960900kB time=00:00:53.60 bitrate=605367.4kbits/s speed=0.911x video:3963938kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown > armbianmonitor -m 11:57:25: 1368MHz 2.62 94% 16% 77% 0% 0% 0% 59.3°C 0/8 11:57:31: 1368MHz 2.73 94% 16% 77% 0% 0% 0% 59.3°C 0/8 11:57:36: 1368MHz 2.75 94% 16% 77% 0% 0% 0% 60.9°C 0/8 > top top - 11:57:01 up 3:49, 3 users, load average: 2.35, 0.96, 0.66 Tasks: 112 total, 2 running, 64 sleeping, 0 stopped, 0 zombie %Cpu(s): 78.7 us, 16.0 sy, 0.0 ni, 5.2 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st KiB Mem : 502912 total, 238052 free, 100316 used, 164544 buff/cache KiB Swap: 251452 total, 238472 free, 12980 used. 391764 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 31161 armbi 20 0 157540 52764 8760 R 350.2 10.5 0:43.71 ffmpeg 31162 armbi 20 0 1548 336 292 S 29.2 0.1 0:03.13 cat 31158 armbi 20 0 4680 2096 1680 R 1.6 0.4 0:00.74 top 373 root -51 0 0 0 0 S 0.3 0.0 0:03.28 irq/54-ths 1009 root 20 0 4680 552 484 S 0.3 0.1 0:00.16 cron
  17. I really have poor experience with libva-v4l2-request library. Maybe you could find useful that Sunxi-Cedrus linux release-2019.03 is a patched version of 5.0.7 kernel release About libva-v4l2-request library, I tried to compile it. And yes I too had to disable version check. And I found that the version from github master was easier to compile (less issues) that the one suggested by the sunxi wiki, which was the release-2019.03
  18. Thank you very much. I missed CONFIG_VIDEO_SUNXI_CEDRUS. After doing the image rebuild I tried the v4l2-request-test. And both MPEG2 and H.264 baseline decoding work fine. Just for reference, with nanopi neo (H3) and 864*480 slices, H.264 I frame is decoded in 6ms and B frames are decoded in less than 2ms. The only issue I found is about video_buffers data arrays utilization. With 16 frames (the default) it seems that only the first frame of 16 is correctly stored in arrays. It seems that arrays with index>0 contain either dirty or no data at all. Need further investigations. But setting frames count to 1 in the preset file, which is currently not a limit because operations are serialized, output data are always stored in buffer [0] and I then can save them to disk file. And the Bunny is displayed in the decoded frames. :-) To make the test the quickest as possible I've sent to file only the Y channel. UV channels are available but I've not not currently checked them.
  19. @drice how did you manage to get /dev/video0 working as required by v4l2-request-test? Without it's impossible to have the buffers source. regards F
  20. Thank you very much for the tip. I built the image without any particular issue and did the boot: Welcome to Ubuntu Bionic with Armbian Linux 5.3.0-rc3-sunxi System load: 0.14 0.24 0.11 Up time: 3 min Memory usage: 14 % of 491MB IP: 192.168.1.187 CPU temp: 42°C Usage of /: 6% of 15G I can start to check if h.264 baseline decoder is working with the current image Regards F
  21. I tried to do same thing some months ago without success working with nanopi neo. I had problems applying the patches (manually derived from https://github.com/bootlin/linux-cedrus [release-2019.03] ) to armbian dev because I'm quite new to armbian and kernel stuff. But recently I noticed that both mainline next and 5.3-rc3 added h.264 decoding (baseline profile): I really cannot manage to point armbian build system to either 5.3-rc3 or next-20190808. I think also that should be important to check (from https://linux-sunxi.org/Sunxi-cedrus): So if anyone could make armbian build system points to either 5.3-rc3 or next-20190808, I think it could work. Any help would be appreciated. BR F
  22. I managed to boot ARMBIAN 5.83 and kernel 5.0.9 patched with cedrus stuff. It has been quite tricky because cedrus march release referred to kernel 5.0.1 and I didn't find any source related to latest kernel to diff and patch. Then I flashed a SD card with full image Armbian_5.83_Nanopineo_Ubuntu_bionic_dev_5.0.9.img I don't know if it's ok because I still have to move to userspace and build the test app. Anyway: what sounds strange to me is that on the target device I still have linux header dev files that seem not patched. For exampe videodev2.h does not contain V4L2_PIX_FMT_H264_SLICE, which clearly appears in the patch I applied. I tried to manually copy on the target nanopi neo the linux-headers-dev-sunxi_5.83_armhf.deb and sudo dpkg -i linux-headers-dev-sunxi_5.83_armhf.deb with no results. Extracting the archive the updated videodev2.h seems to be there. Regards F
  23. Thank you very much for the hint. I'll try it and I'll update the post with results. Regards F.
  24. Thank you for quick reply. I didn't want to build with armbian build system because my final goal is to have sunxi-cedrus 5.0.0 image working on nanopi neo. So I downloaded latest 4.19.36 kernel release and build it to test the my build procedure. I'm not aware of standard patches. Regards F
  25. Hi, I have a nanopi neo SBC and my final goal is to get Sunxi-cedrus 2019.03_Release (patched kernel 5.0.0 release) installed on device to test cedrus driver. Did a manual kernel build and tried to dpkg -i *.deb files on the board but the kernel hangs on boot. I read also but that didn't help me so much So I tried same procedure to replace the armbian standard 4.19.20 kernel with an official mainline 4.19.36 version. I found same exact issue so I think I'm missing something. Please have a quick read at the procedure I followed and put any advice to help me going through. 1) touch default kernel .config to have: - allwinner cpus enabled - VFP enabled (to make armhf output) - ealryprintk enabled 2) after kernel build up, copy to a fresh new armbian install on SD 3 deb files - linux-headers-4.19.36_4.19.36-1_armhf.deb - linux-image-4.19.36_4.19.36-1_armhf.deb - linux-libc-dev_4.19.36-1_armhf.deb 3) dpkg -i *.deb on target SBC 4) working directly on SD on native x86 host pc: - did not modify dtb link wich still points to original dtb-4.19.20 release - created new zImage link to vmlinuz-4.19.36 (it was still pointing to original vmlinuz-4.19.20-sunxi) - modified boot.cmd to: - setenv load_addr "0x46000000" - added earlyprintk=serial,ttyS0,115200 to bootargs - mkimage -C none -A arm -T script -d boot.cmd boot.scr 5) finally booting nanopi neo sbc with updated SD I get kernel hang (both for 4.19.36 and 5.0.0) U-Boot SPL 2018.11-armbian (Feb 08 2019 - 11:04:44 +0100) DRAM: 512 MiB Trying to boot from MMC1 U-Boot 2018.11-armbian (Feb 08 2019 - 11:04:44 +0100) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: FriendlyARM NanoPi NEO DRAM: 512 MiB MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1 Loading Environment from EXT4... ** File not found /boot/boot.env ** ** Unable to read "/boot/boot.env" from mmc0:1 ** In: serial Out: serial Err: serial Net: phy interface0 Error: ethernet@1c30000 address not set. eth-1: ethernet@1c30000 230454 bytes read in 30 ms (7.3 MiB/s) Unknown command 'bmp' - try 'help' starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 USB2: USB EHCI 1.00 USB3: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 2 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop => printenv arch=arm baudrate=115200 board=sunxi board_name=sunxi boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr} boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf boot_net_usb_start=usb start boot_prefixes=/ /boot/ boot_script_dhcp=boot.scr.uimg boot_scripts=boot.scr.uimg boot.scr boot_targets=fel mmc_auto usb0 pxe dhcp bootcmd=run distro_bootcmd bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci; bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi bootcmd_mmc0=setenv devnum 0; run mmc_boot bootcmd_mmc1=setenv devnum 1; run mmc_boot bootcmd_mmc_auto=if test ${mmc_bootdev} -eq 1; then run bootcmd_mmc1; run bootcmd_mmc0; elif test ${mmc_bootdev} -eq 0; then run bootcmd_mmc0; run bootcmd_mmc1; fi bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi bootcmd_usb0=setenv devnum 0; run usb_boot bootdelay=1 bootm_size=0xa000000 console=ttyS0,115200 cpu=armv7 dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000 distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done efi_dtb_prefixes=/ /dtb/ /dtb/current/ fdt_addr_r=0x43000000 fdtcontroladdr=5bf513a0 fdtfile=sun8i-h3-nanopi-neo.dtb fileaddr=66000000 filesize=38436 kernel_addr_r=0x42000000 load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile} loadsplash= for prefix in ${boot_prefixes}; do if test -e mmc 0 ${prefix}boot.bmp; then load mmc 0 ${splashimage} ${prefix}boot.bmp; bmp d ${splashimage}; fi; done mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi mmc_bootdev=0 partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system}; preboot=run loadsplash; usb start pxefile_addr_r=0x43200000 ramdisk_addr_r=0x43300000 scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done scriptaddr=0x43100000 serial#=02c00081786888cd soc=sunxi splashimage=66000000 splashpos=m,m stderr=serial stdin=serial,usbkbd stdout=serial usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3 Environment size: 4811/131068 bytes => boot switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3830 bytes read in 12 ms (311.5 KiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 230 bytes read in 10 ms (22.5 KiB/s) 28177527 bytes read in 2169 ms (12.4 MiB/s) 6824448 bytes read in 539 ms (12.1 MiB/s) Found mainline kernel configuration 28450 bytes read in 46 ms (603.5 KiB/s) 504 bytes read in 55 ms (8.8 KiB/s) Applying kernel provided DT overlay sun8i-h3-usbhost1.dtbo 504 bytes read in 56 ms (8.8 KiB/s) Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo 4155 bytes read in 49 ms (82 KiB/s) Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) ## Executing script at 46000000 ## Loading init Ramdisk from Legacy Image at 43300000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 28177463 Bytes = 26.9 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 EHCI failed to shut down host controller. EHCI failed to shut down host controller. Loading Ramdisk to 48520000, end 49fff437 ... OK reserving fdt memory region: addr=43000000 size=6d000 Loading Device Tree to 484b0000, end 4851ffff ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.19.36 (filippo@filippo) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #1 SMP Mon Apr 22 09:24:25 CEST 2019 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: FriendlyARM NanoPi NEO [ 0.000000] bootconsole [earlycon0] enabled This is the point where boot hangs Thanks F
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines