Dante4

  • Posts

    40
  • Joined

  • Last visited

Posts posted by Dante4

  1. 7 hours ago, Nao said:

    yes, the USB-C port on NanoPi M4 is for the power supply

    But the M4 has 4 other USB3.0 ports which are used for data transfer and I guess USB-C type connection can be made with a USB-C to USB-A adapter.

    How do you think about this?

    If screen is fine with 5V as Power source - you will be fine in terms of power. But you will need to look does Ubuntu have drivers to send video signal over USB (short answer - most likely no, since GPU is not connected to USB as far as i remember and you will get heavy lags on screen that will go thought USB since it will render itself via CPU, which is not great for this job at all)

  2. 1 minute ago, martinayotte said:

    Maybe their U-Boot check for presence of SDCard and give it a new priority, but the Rockchip SoC itself looks in this specific order is SPIFlash, eMMC, and then SDCard ...

    So, if their U-Boot is erased/replaced by Armbian one, the order will be the one I've mentioned.

    Yes, i understand that much, just to clarify from where mitag got idea of this behavior

  3. On armbian there is problem with HDMI. That what i have in terminal (kinda hard to see on video, but symbols tremble a bit)

    P.S. Also

    On 2/1/2019 at 11:36 PM, martinayotte said:

    By default, RK3399 boot order is SPIFlash, eMMC, and then SDCard ...

    If you wish to boot the SDCard, you need to stop U-Boot with <spacebar> before it try to load kernel stuff, then you can do the following commands :

    default Radxa image have other boot priority. I.e. microsd is the first one to boot.

  4. 12 minutes ago, JMCC said:

    Glamor does vsync by default, meaning that it adjusts the maximum frame rate to the screen refresh rate. That's the reason why you are getting scores of approximately 60fps.

     

    You can disable vsync just for testing, by editing /etc/X11/xorg.conf.d/01-armbian-defaults.conf (there may be a typo, I am on the go now)

    The problem is - i don't get 60fps (or 30, or anything that could possible be my screen update rate). Logs says that everything is on, but benchmark shows otherwise. I get around 40 fps for most tests.

    And for off-screen it shouldn't even matter, but NanoPi T4 gets ~500 score (at least that what i was told) and 59-60 fps in normal test (from screenshot on Friendlyelec wiki). So, i'm getting lost and starting to think that maybe i did something wrong. That's why i need to see results of other rk3399 boards

  5. 17 hours ago, danboid said:

    You recommend fullscreen playback for videos but it seems that both gst-launch-1.0 and gst-play-1.0 don't support proper fullscreen playback so we need to get something like totem working. I just tried running totem with the armsoc driver and this scripts gstreamer packages and when I try to start totem I get the error:

     

    libGL error: unable to load driver: rockchip_dri.so

     

    I have tried running totem prefixing it like so:

     

    LD_LIBRARY_PATH=/opt/libmali-gbm:$LD_LIBRARY_PATH totem

     

    but that didn't help, nor did creating a symbolic link from rockchip_dri.so to libmali.so

    libGL error happens because application require OpenGL that Mali don't have. It have nothing to do with gbm. To fix it you need to do 

    LD_LIBRARY_PATH=/opt/gl4es <application>

  6. Wanna add about ubuntu-server that was minimized to xfce4 with minimize && apt-get install xfve4 xfce4-goodies,  startx used from sudo su.

    Under this conditions i installed all *.deb from libraries + xserver + kodi + did all changes that was inside .sh script (i.e. edit file inside xorg.init.d) with command dpkg --unpack *.deb (yes, in right folders) and apt-get install -f -y.

    After this, Chromium and es2gears see Mali driver, but...Chromium (with h264ify) can't play 1080p60fps (which he can with pure software) (Chromium 32bit fails here too) and after I use command kodi-gbm-wrapper and click enter I may not move mouse or click keyboard for a bit and then everything back to normal, but Kodi still doesn't start up. 

    gl4es working, i.e. vcmi (heroes 3) is working with it, but performance is the same as for software, maybe a little bit better 

  7. 43 minutes ago, JMCC said:

    Sorry, I didn't understand your question either. Can you rephrase it?

     

    [EDIT:] If your question is whether the script will work on a server image, with no Desktop installed, the answer is probably not. You can test, but don't expect to get support for it here.

     

    22 hours ago, Dante4 said:

    under just Ubuntu Bionic (that was unminimized from server version)

    I.e. Is it possible to use this script with "just" Ubuntu Bionic?

    I.e.  Why "Armbian Ubuntu Bionic" and not just "Ubuntu Bionic"?

    With technical point, not advertise 

  8. 10 hours ago, balbes150 said:

    All software (mpv gstreamer KODI) are collected using system libraries from Ubuntu. Therefore, Ubuntu packages will not work in Debian. We need to rebuild all the components for Debian. I came across this when building KODI versions with HW for AML.

    ???

    I wasn't asking about Debian at all in my post. 

    18 hours ago, Dante4 said:

    run under just Ubuntu Bionic (that was unminimized from server version)

    Only about ubuntu bionic (server edition).

  9. On 1/15/2019 at 3:00 AM, JMCC said:

    If you notice, that download is Armbian with Debian Stretch desktop. The script requires Armbian with Ubuntu Bionic desktop. We (the Armbian project) has not released an official image for Rockpi 4 yet, so you will have to build it yourself using Raxda fork of Armbian (in case it is publicly available), or ask them to build it.

     

    My recommendation would be that you ask in the Raxda forums how to get a ubuntu bionic desktop Armbian image for Rockpi.

    About this, your script should be possible to run under just Ubuntu Bionic (that was unminimized from servef version) in theory there shouldn't be any problems if kernel is the last version, right?

  10. 51 minutes ago, JMCC said:

    Yes, it runs fulscreen with no mouse support. You can control it with a remote control via LIRC, or with the keyboard. Arrows, space, Q for quit and shift-Q for save position and quit. "man mpv" will give you the whole list of controls.

    Isn't it possible to build desktop link that will open terminal? With this it should have mouse support?

     

  11. Thanks @chwe for your posts!

     

     

    8 hours ago, JMCC said:

     

    RK3399 media testing script released, in case someone makes the board work and wants to give it a try:

     

     

    Well. Official Armbian not really ready yet and Radxa Armbian is Debian Stretch,  but thanks for it, that's really helpful for just user 

     

     

     

  12. 11 minutes ago, chwe said:

     

    you can start with testing: https://github.com/armbian/testings

    maybe not yet for the RockPi 4b but for other boards you have?

    That i can do for sure for renegade-default (if i understand correctly it's my roc-cc aka Renegade)

     

    11 minutes ago, chwe said:

    google is a good helper which I quite often use. :)

     

    If you want to dive into this it might be worth to start with some basics in device tree. The kernel comes with docs, docs are great to understand what a *random devicetree node* does. Combine this stuff try to build images, get errors on building or that the DT doesn't work, use google (or ask here), build again and learn step by step. :)

     

    You need a virtual machine with ubuntu on it and some spare-time. You may file a few times until you get something working but that's fine. Happens to all of us.

    I do agree with this, but i know difference between "let google this and this" and "google what the hell is this?" right now i'm more about 2nd. But wanna to become closer to first.

    Thanks for your advice :), since I do have alot of spare-time for now i will dive in.  (would prefer to not fry anything... -_-'''')

  13. 8 minutes ago, TonyMac32 said:

    This early on that is a tough one, most of the work is basic board support, so device tree/etc.

    Sent from my Pixel using Tapatalk
     

    yeah...that require to understanding what you need to find without google all the time.  

  14. 4 hours ago, JMCC said:

    Correct, there is no way to use windowed accelerated mpv. Gstreamer uses a hack to simulate X11 windowed playing.

     

    Thank you, that's interesting! That's interesting information. So that's why gstreamer is on 0 layers always. Is it possible to do something like this to get HW acceleration in browser?

  15. FFmpeg+mpv

    For a reason (which i don't know) mpv can't work in pseudo-gui-mode (it just crash desktop) and always opens fullscreen, maybe it can be fixed with custom x11 server, but that's already beyond my limited knowledge. So gstreamer can work in windowed and fullscreen. Mpv only fullscreen. That guide about how to build ffmpeg (with alot of stuff) and mpv to make it work with hw acceleration.

     

    1. Switch to night builds using armbian-config (sudo armbian-config --> Install --> Nightly)
    2. This "guide" contains a lot of sudo so it will be better to do sudo su before using it.
      sudo su

       

    3. Delete any mpv and ffmpeg you have in system
      apt-get remove mpv ffmpeg

       

    4. This will download necessary libs and FFmpeg with custom mpv (and mpv-build contains all necessary dependencies for usual mpv) that's made for rockchip

      mkdir build && \
      git clone -b master https://github.com/rockchip-linux/libmali && \
      git clone -b master https://github.com/FFmpeg/FFmpeg && \
      git clone -b master https://github.com/LongChair/mpv && \
      git clone -b master https://github.com/mpv-player/mpv-build

       

    5. Do 
      apt-get install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev mc locate libghc-bzlib-dev libfdk-aac-dev fdkaac aac-enc libfdk-aac1 libass-dev libdrm2 libva-drm2 xterm
      
      cd ./mpv-build && mk-build-deps -s -i && apt-get install -f -y && cd ../

       

    6. Patch drm_fourcc.h with this (just in case, this lines to add 10bit video, i will test later does they affect ffmpeg)
      find /usr/include/drm -name drm_fourcc.h -exec sed -i "143 i #define DRM_FORMAT_NV12_10\      fourcc_code('N', 'A', '1', '2') /* 2x2 subsampled Cr:Cb plane */\n#define DRM_FORMAT_NV21_10      fourcc_code('N', 'A', '2', '1') /* 2x2 subsampled Cb:Cr plane */\n#define DRM_FORMAT_NV16_10      fourcc_code('N', 'A', '1', '6') /* 2x1 subsampled Cr:Cb plane */\n#define DRM_FORMAT_NV61_10      fourcc_code('N', 'A', '6', '1') /* 2x1 subsampled Cb:Cr plane */\n#define DRM_FORMAT_NV24_10      fourcc_code('N', 'A', '2', '4') /* non-subsampled Cr:Cb plane */\n#define DRM_FORMAT_NV42_10      fourcc_code('N', 'A', '4', '2') /* non-subsampled Cb:Cr plane */" {} +
      
      find /usr/include/libdrm -name drm_fourcc.h -exec sed -i "143 i #define DRM_FORMAT_NV12_10\      fourcc_code('N', 'A', '1', '2') /* 2x2 subsampled Cr:Cb plane */\n#define DRM_FORMAT_NV21_10      fourcc_code('N', 'A', '2', '1') /* 2x2 subsampled Cb:Cr plane */\n#define DRM_FORMAT_NV16_10      fourcc_code('N', 'A', '1', '6') /* 2x1 subsampled Cr:Cb plane */\n#define DRM_FORMAT_NV61_10      fourcc_code('N', 'A', '6', '1') /* 2x1 subsampled Cb:Cr plane */\n#define DRM_FORMAT_NV24_10      fourcc_code('N', 'A', '2', '4') /* non-subsampled Cr:Cb plane */\n#define DRM_FORMAT_NV42_10      fourcc_code('N', 'A', '4', '2') /* non-subsampled Cb:Cr plane */" {} +

       

    7.  

      Now we need to build this all. To do this do

      cd libmali && cmake CMakeLists.txt && make -j4 && make install && ldconfig && \
      cd ../FFmpeg && \
      ./configure \
      --cpu="cortex-a53" \
      --arch="aarch64" \
      --extra-libs="-Lpthread -Lm"\
      --extra-cflags="-I\home\dante4\video\include" \
      --extra-ldflags="-L\home\dante4\video\lib" \
      --disable-debug \
      --enable-libaom \
      --enable-stripping \
      --enable-gpl \
      --enable-nonfree \
      --enable-logging \
      --disable-doc \
      --enable-pic \
      --enable-optimizations \
      --enable-ffmpeg \
      --enable-avdevice \
      --enable-avcodec \
      --enable-avformat \
      --enable-swscale \
      --enable-postproc \
      --enable-avfilter \
      --disable-devices \
      --enable-pthreads \
      --disable-w32threads \
      --enable-network \
      --disable-gnutls \
      --disable-gray \
      --enable-swscale-alpha \
      --disable-small \
      --enable-dct \
      --enable-fft \
      --enable-mdct \
      --enable-rdft \
      --disable-crystalhd \
      --disable-vaapi \
      --disable-vdpau \
      --enable-rkmpp \
      --enable-libdrm \
      --enable-version3 \
      --enable-runtime-cpudetect \
      --enable-hardcoded-tables \
      --enable-encoder=ac3 \
      --enable-encoder=aac \
      --enable-encoder=wmav2 \
      --enable-encoder=mjpe \
      --enable-encoder=png \
      --enable-hwaccels \
      --enable-muxer=spdif \
      --enable-muxer=adts \
      --enable-muxer=asf \
      --enable-muxer=ipod \
      --enable-muxer=mpegts \
      --enable-demuxers \
      --enable-parsers \
      --enable-bsfs \
      --enable-filters \
      --enable-bzlib \
      --enable-libspeex \
      --enable-libx264 \
      --enable-libx265 \
      --enable-zlib \
      --enable-asm \
      --enable-neon \
      --enable-libass \
      --enable-libfdk-aac \
      --enable-libfreetype \
      --enable-libmp3lame \
      --enable-libopus \
      --enable-libvorbis \
      --enable-libvpx 
      make -j4 && make install && ldconfig && \ 
      cd ../mpv && wget -q --show-progress --no-use-server-timestamps http://www.freehackers.org/~tnagy/release/waf-2.0.13 && \
      mv waf-* waf && \
      chmod u+x waf && \
      ./waf configure && \
      ./waf build -j4 && ./waf install && ldconfig

       

    8. Now copy necessary libs for mpv with this command 

      cd ../ && cp libmali/lib/aarch64-linux-gnu/libmali-utgard-450-r7p0-gbm.so /usr/lib/aarch64-linux-gnu/gbm/libmali-utgard-450-r7p0-gbm.so && \ 
      ln -sf /usr/lib/aarch64-linux-gnu/gbm/libmali-utgard-450-r7p0-gbm.so /usr/lib/aarch64-linux-gnu/gbm/libMali.so && \
      ln -sf /usr/lib/aarch64-linux-gnu/gbm/libmali-utgard-450-r7p0-gbm.so /usr/lib/aarch64-linux-gnu/gbm/libgbm.so && \
      ln -sf /usr/lib/aarch64-linux-gnu/gbm/libmali-utgard-450-r7p0-gbm.so /usr/lib/aarch64-linux-gnu/gbm/libgbm.so.1 && \
      ln -sf /usr/lib/aarch64-linux-gnu/gbm/libmali-utgard-450-r7p0-gbm.so /usr/lib/aarch64-linux-gnu/gbm/libgbm.so.1.0.0

       

    9. To start mpv you need command 

      LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/gbm sudo mpv --hwdec=rkmpp --vo=gpu --gpu-api=opengl --gpu-context=drm <videofile>

       

    10. To use mpv with shortcut you need to add mpv to sudo list with this commands 

      sudo visudo
      
      At the end of file add this lines, where USERNAME is your username
      
      USERNAME ALL=(ALL) NOPASSWD: /usr/local/bin/mpv
      USERNAME ALL=(ALL) NOPASSWD: /usr/local/etc/mpv
      
      then click ctrl+x and press y
      
      

       

    11. Now to create shortcut do this

      echo "[Desktop Entry]
      Type=Application
      Name=MPV
      Icon=mpv
      Exec=env LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/gbm sudo mpv --hwdec=rkmpp --vo=gpu --gpu-api=opengl --gpu-context=drm -- %f
      Icon=/usr/share/icons/gnome/48x48/categories/applications-multimedia.png
      Terminal=true
      Categories=Qt;AudioVideo;Player;Video;
      MimeType=application/ogg;application/x-ogg;application/mxf;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/aiff;audio/x-aiff;audio/m4a;audio/x-m4a;application/x-extension-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/mpeg2;audio/mpeg3;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/musepack;audio/x-musepack;audio/ogg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/x-m4v;video/mp4;application/x-extension-mp4;video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;audio/x-ms-asf;application/vnd.ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/avi;video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;video/x-matroska;video/mkv;audio/x-matroska;application/x-matroska;video/webm;audio/webm;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;video/x-ogm;video/x-ogm+ogg;application/x-ogm;application/x-ogm-audio;application/x-ogm-video;application/x-shorten;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;audio/eac3;audio/amr-wb;video/mp2t;audio/flac;audio/mp4;application/x-mpegurl;video/vnd.mpegurl;application/vnd.apple.mpegurl;audio/x-pn-au;video/3gp;video/3gpp;video/3gpp2;audio/3gpp;audio/3gpp2;video/dv;audio/dv;audio/opus;audio/vnd.dts;audio/vnd.dts.hd;audio/x-adpcm;application/x-cue;audio/m3u;" > /usr/share/applications/demo-player.desktop
       

       

  16. On 1/5/2019 at 2:45 AM, xorro said:

    @JMCC I would very much be interested in the script you've mentioned,  do you have a n idea on the timeframe you are looking at for it's release? I have an roc-rk3328-cc device,  and believe I could benefit from your research and code,  as many others with this SBC. 

     

    thank you both @JMCC and @Dante4, and others on this thread. it has been very informative! 

    Your pings a bit broken, not sure why...

    As for his script, maybe you can ask about this in PM last information was this