nvxvimagesink issue's on T33 Asus Transformer tf700


Ive been attempting to get hardware accelerated video working on this tablet for quite sometime. With the Linux for Tegra 16.3 drivers installed with 2D acceleration working fine on a Ubuntu 13.04 rootfs we have never been able to successfully get hardware accelerated video with gstreamer using the nvxvimagesink pipe line.

ive added nvxvimagesink to the gstreamer-properties, when attempting to use totem on a 1080p video its still uses software decoding which performs badly. When attempting to run the same video file with parole, it gives a gstreamer backend error.

while nvgstplayer appers to use hardware decoding with the same video file.

Any help to get this working via gstreamer would be hugely appreciated

EDIT: nvgstplayer isnt working. I believe this could be a kernel issue. Reading from this: http://archlinuxarm.org/forum/viewtopic.php?f=28&t=1732#wrap

It would appear that certain kernel parameters need to be set for the nvxvimagesink pipeline to work, Ive added these parameters to my kernel configure as referenced here http://ac100.grandou.net/hw_accelerated_video_playback#gstreamer_tuninig

But still a no-go, obviously the above is for the tegra 2 soc so different parameters might be need for the tegra 3. Would anyone have an idea what these are?

Heres some debug info from gst-launch

realms@tf700:~/Desktop$ gst-launch-0.10 playbin2 uri=file:///home/realms/Desktop/rip.mp4 video-sink=nvxvimagesink audio-sink=nv_omx_audiosink
Setting pipeline to PAUSED …
Pipeline is PREROLLING …

omx_setup error while setting FilterTimestamp
NvxVideoDecoderAcquireResources : NvxNvMMTransformOpen failed
ERROR: from element /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstOmxAacDec:omxaacdec0: Could not decode stream.

omx_setup error while setting FilterTimestamp
Additional debug info:
/dvs/git/dirty/git-master_linux-k310/external/gstreamer/gst-openmax/omx/gstomx_util.c(1162): EventHandler (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstOmxAacDec:omxaacdec0:
There were insufficient resources to perform the requested operation
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
NvxVideoDecoderAcquireResources : NvxNvMMTransformOpen failed
Freeing pipeline …

There are a bunch of /dev/nv* files that need to be accessible? NVIDIA’s scripts should set the access rights properly for the video group. Check that the group is “video” and check that your user (seems to be “realms”) belongs to the video group.

Once you have set the sink to nvxvimagesink with gstreamer-property, Totem should work well. You could also try your playbin2 command but without the audio-sink property.

Hey mate, thanks for the reply!

It doesnt look like the /dev/nv* permissions aren’t being set correctly, eg

realms@tf700:~$ ls -la /dev/nv*
crw-rw---- 1 root video  10, 55 Nov 26 12:22 /dev/nvhdcp1
crw-rw---- 1 root video 252,  0 Nov 26 12:22 /dev/nvhost-ctrl
crw-rw---- 1 root video 249,  0 Nov 26 12:22 /dev/nvhost-gr2d
crw-rw---- 1 root video 250,  0 Nov 26 12:22 /dev/nvhost-gr3d
crw-rw---- 1 root video 248,  0 Nov 26 12:22 /dev/nvhost-isp
crw-rw---- 1 root video 251,  0 Nov 26 12:22 /dev/nvhost-mpe
crw-rw---- 1 root video 247,  0 Nov 26 12:22 /dev/nvhost-vi
crw-rw---- 1 root video  10, 59 Nov 26 12:22 /dev/nvmap

But ive been manually running chmod 777 /de/nv* , but it doesn’t seem to make a difference.
My user is also apart of the video group:

realms@tf700:~/Desktop$ sudo adduser realms videoThe user `realms' is already a member of `video'.

I also tried the gst-lauch command without the audiosink but got the same error as above. With all that setup totem is still using software decoding, eg about 3fps and near 100% cpu usage on a 1080p video.

Its a real shame, Linux + l4t drivers make this tablet amazing, we just need hwa video to complete the package. My uneducated guess is this is an issue in the kernel, since this is an android device we are using a slightly modified android kernel.

Again, thanks for your reply

Those /dev/nv* files seem to have corrent permissions. I.e. anybody belonging to “video” group has full read/write access. There were couple of other files not starting with “nv” as well (iirc) but I guess they are OK since those are too.

You mentioned that you have 2D acceleration working, how did you verify that?

If you have 2D working, you should have 3D as well. Could you check e.g. with “es2gears” or “glmark2-es2” that they run smoothly? There are less tweaking to do to get 3D working compared to video decoding so I recommend verifying 3D first and then moving to gstreamer.

I’ve got L4T GST working on Nexus7 and on Ouya by disabling some Android features in their kernels and adding some “normal” linux options. So if you have already managed to boot Ubuntu on that device with its original kernel with different config, getting GST working shouldn’t be far off.

From the logs:
ERROR: from element /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstOmxAacDec:omxaacdec0: Could not decode stream.
It seems that aac decode is failing. Can you please try with nvgstplayer as:
./nvgstplayer -i --no-audio --svs=“nvxvimagesink”

If this passes, we will know that the problem is with aac decode.
We have tested accelerated playback with Totem. Since you are using 13.04, it should work fine with just the settings you are doing.

Also try:
./nvgstplayer -i --svd=“faad” --svs=“nvxvimagesink”

This will use software audio codec instead.

Also please paste the output of: gst-inspect-0.10 omx
Just to see if all the elements are there.

Good news guys, just managed to get it working! Turned out to be an elusive config in the kernel(i couldn’t narrow it down to anything specific ), i just modified a similar device’s .config (with working hwa video) to match my device and the result was nvgstplayer decoding beautifully.

I have both the working and non-working .configs (and diffs) on record if anyone needs help with future endeavours

My next issue is trying to figure out why totem is still soft decoding (despite gstreamer-properties being set correctly)

@Rahool Although its working now, i did try your commands, they just hung with no video or audio

@kulve I just found your wiki on running debian on the ouya, in it you use the command (gconftool-2 -s /system/gstreamer/0.10/default/videosink nvxvimagesink --type=string) I tried that, but totem still soft decodes.

Although for now im happy with nvgstplayer, i ran your test of a 1080p video with glmark-es2 running and both ran smoothly (glmark-es2 ran at about 100+ fps in the first few tests which is about 10-20 fps down from running glmark-es2 on its own, very happy wiht performance.)

Thankyou both for your help!

Last thing that comes to my mind is the firmware. There is a separate package for the different codecs. Have you placed that in the correct location in the file system?