Coding Chase - Projects

My 3D Hub

Thank You For Donating:

Ikeeki (linux-sunxi@irc.freenode.net)
Computer Troubleshooters Brasil

Friday, 21 November 2014

QtAV

Hi,

I've been working on other projects recently, but while browsing around for all things video accelerated, I came accross QtAV.

QtAV seems to be what was missing in order to integrate Qt and hardware video acceleration on Cubieboard!

I haven't tested yet, don't know if it supports the libcedarx proprietary blobs and/or libvdpau-sunxi but if the youtube videos are anything to go on, it looks pretty promising...!

If you didn't know about it, here's the Github Project page, and if you have, add a comment below with your experiences with it!

... Would it be worth it for Qt5Box's next release?

Saturday, 18 October 2014

Gstreamer Hyperloop

So I've been trying to get Gstreamer and Qt to play nice with each other on Cubieboard, but so far, no go.

Distinct attempts so far have been as follows:
  1. Hacking QtMultimedia to specifically invoke the working vdpausink pipeline
    1. this seems to be handled by  qtmultimedia/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp on the Qt5 sources, on the VM host.
  2. Setting the default playbin2 pipeline on GStreamer to use the vdpau elements, with GST_RANK_PRIMARY + 1
    1. this seems to be handled by gst-plugins-bad-0.10.23/sys/vdpau/gstvdpau.c in the embedded rootfs (check the previous Gstreamer + libvpau-sunxi post)
Scenario #1 got me all the way to invoking VDPAU to a black screen from Qt and scenario #2 won't go all the way even from gst-launch on account of qtdemux:

playsink gstplaysink.c:2922:is_raw_pad:<playsink0:video_sink> Caps contains raw and non-raw structures:

video/x-vdpau-video, chroma-type=(int)0, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ];
video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ];
video/x-raw-yuv, format=(fourcc)YV12, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ];
video/x-raw-yuv, format=(fourcc)NV12, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ]


A third possibility is to go with qtgstreamer, an alternative to QtMultimedia - still working that angle as well!

Thursday, 16 October 2014

Qt5Box 0.3 - some issues

Just a quick update on v0.3:

I just noticed that the Cubieboard A10 SD Card images haven't been updated for the misconfigurations reported on the previous README:

  • Setting proper permissions on /opt (both framebuffer and X11)
  • Changing the automatic login user on /etc/slim.conf from "wickwire" to "cubie" (X11)

These fixes have been corrected on 0.3, towards 0.4 with hopefully I'll launch with Qt 5.4.x when it comes out.

I'll also attempt to include libvdpau+GStreamer on A10 X11 and Cubietruck X11, if I can!

Saturday, 11 October 2014

Qt5Box 0.3 - "Isaac"

Finally, Qt5Box 0.3 is out! 

This release includes a Jenkins CI setup, which I've been using to perform automated Qt5 cross-compile jobs, as well as accelerated GStreamer support using libvdpau-sunxi (only available on X11, and specifically to Qt5Box, only on the Cubieboard A20 X11 SD Card Image).

I didn't have time yet to reproduce the steps on Cubieboard A10 and Cubietruck, but basically everything's documented here in the blog, in previous posts.

Using Jenkins, I've been able to successfully include about 60 variations on Qt5, from all stable releases beginning on 5.0.0 all the way up to 5.3.2, for each Cubieboard device, and both X11 and Framebuffer.

Hopefully with Jenkins I'll be able to roll out the next Qt5Box versions faster - Qt 5.4 is just around the corner and there's always the possibility of including more devices than just the Cubieboard family!

Last but not least, a special thank you to Isaac Chavarria a.k.a. Ikeeki for lending me his working Cubieboard A10, which was vital to get things going for this release...!

Wednesday, 3 September 2014

Cubieboard: GStreamer 0.10 + libvdpau-sunxi

It's been a while since I've posted in the blog, but while I'm still to release any new versions of Qt5Box, there's still some exploring to be done with hardware accelerated video on Cubieboard.

Using X11 and libvdpau-sunxi, it's possible to have hardware accelerated video on Cubieboard, and confirm it with mplayer - just check the sunxi wiki steps for that.

But what about GStreamer? Read on...

Step 1: libvdpau-sunxi and mplayer

- based on Cubian images for Cubieboard
- add sunxi_cedar_mod to /etc/modules

sudo apt-get install libvdpau-dev vdpauinfo libvdpau-sunxi

http://linux-sunxi.org/Cedrus

- set permissions in udev rules
- reserve memory for the VPU
- add VDPAU_DRIVER=sunxi to /etc/environment

sudo apt-get install mplayer2

wget sintel mp4 trailers

DISPLAY=:0 mplayer -ao alsa:device=hw=1.0 -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, sintel_trailer-480p.mp4


(at this point, 480p, 720p, 1080p should work properly with mplayer)

Step 2: libvdpau-sunxi and GStreamer


sudo apt-get install libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgstreamer-plugins-bad0.10* gstreamer0.10-plugins-ugly gstreamer0.10-alsa gstreamer0.10-plugins-good gstreamer0.10-tools gtk-doc-tools

DISPLAY=:0 gst-launch-0.10 playbin2 uri=file:///home/cubie/sintel_trailer-480p.mp4 video-sink="autovideosink" audio-sink="faad ! audioconvert ! alsasink device=hw:1,0"

(no vdpau yet - video is distorted, audio is working over HDMI)

sudo apt-get autoremove
sudo apt-get install faad libfaad-dev libfaad2
sudo apt-get clean

wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.23.tar.xz

./autogen.sh && make -j 3 && sudo make install

sudo ln -s /usr/local/lib/gstreamer-0.10/libgstvdpau.so /usr/lib/arm-linux-gnueabihf/gstreamer-0.10/
sudo ln -s /usr/local/lib/libgstvdp-0.10.so.23 /usr/lib/libgstvdp-0.10.so.23
sudo ln -s /usr/local/lib/libgstvdp-0.10.so.23.0.0 /usr/lib/libgstvdp-0.10.so.23.0.0

rm -rf ~/.gstreamer-0.10/ && gst-inspect-0.10 | grep vdpau

vdpau:  vdpausink: VDPAU Sink
vdpau:  vdpauvideopostprocess: VdpauVideoPostProcess
vdpau:  vdpaumpeg4dec: VDPAU Mpeg4 Decoder
vdpau:  vdpauh264dec: VDPAU H264 Decoder
vdpau:  vdpaumpegdec: VDPAU Mpeg Decoder

DISPLAY=:0 gst-launch-0.10 playbin2 uri=file:///home/cubie/sintel_trailer-480p.mp4 video-sink="vdpauh264dec ! vdpauvideopostprocess ! vdpausink" audio-sink="faad ! audioconvert ! alsasink device=hw:1,0"

Failed to open VDPAU backend libvdpau_sunxi.so: cannot open shared object file: No such file or directory

sudo ln -s /usr/lib/arm-linux-gnueabihf/vdpau/libvdpau_sunxi.so.1 /usr/lib/libvdpau_sunxi.so

Failed to open VDPAU backend /usr/lib/libvdpau_sunxi.so: undefined symbol: XTranslateCoordinates

(the mplayer line works OK with vdpau video support and alsa audio through HDMI)

sudo apt-get purge libvdpau-sunxi

(leave libvdpau-dev installed)

git clone https://github.com/linux-sunxi/libvdpau-sunxi.git

cd libvdpau-sunxi
make
sudo make install

(mplayer and GStreamer working now)

reboot

- mplayer cmdline working
- gstreamer cmdline working

Wednesday, 30 July 2014

Qt5Box v0.3 in the works

Having Qt5 marry GStreamer along with GStreamer acceleration for embedded is still to be, although from previous posts, both platforms are working decently enough on Cubieboard.

That said, Qt5Box v0.2 is all about Qt5 alone - no QtMultimedia, QtWebkit - and in even though QtMultimedia currently doesn't seem to support video acceleration (and with QML as well), it still manages to get something done if the video is SD.

Maybe there are some applications at present, concerning SD Webcams or SD video playback - that would be accessible.

So Qt5Box v0.3 will at least have (hopefully) GStreamer integration which is pretty straight-forward, and as for Webkit, still considering if that's an advantage as well!

Wednesday, 16 July 2014

Qt5Box v0.2 - Cubieboard A10 Fixes

Ok, so my cubieboard A10 model is severely crippled when it comes to video output, but I went ahead and tried to build Cubie A10 targets in Qt5Box.

Recently though, a member of the community reached out and decided to donate his cubieboard A10 to the project - and a big, big thank you goes out to him for his gesture.

Isaac Chavarria, a.k.a. ikeeki has been doing some outstanding work in the Cubieboard community and you're welcome to follow up on his work with Cubiuntu.

That said, I went on to test Qt5Box with Cubieboard A10. If you own one of these and wish to take Qt5Box v0.2 for a spin, then take these notes with you:

cb1-rootfs a.k.a. Cubieboard A10 Framebuffer:

- /opt needed write permissions for app deployment


after booting your cubieboard from the supplied SD Card image, change permissions to /opt like so:

# chmod -R a+rwx /opt/

that way, Qt Creator will be able to deploy the app files to your cubieboard.



cb1-rootfs-x11 a.k.a. Cubieboard A10 X11:

- /opt needed write permissions for app deployment (same as above)


- updated /etc/slim.conf with the correct user for auto-login
(having the wrong user set up would prevent slim from starting up properly and as a result of that, no Desktop)


Edit /etc/slim.conf and update the following line:

default_user        cubie

... and this is it for Cubieboard A10.


Of course, these fixes should be included in the next version of Qt5Box, once it's out!