gstreamer, screen resolution and other issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gstreamer, screen resolution and other issues

4,638 Views
eugenesolo
Contributor II

Sabre SmartDevice board with Quad Core.

I'm experiencing strange problems with  Oneiric (4.1.0); kernel 3.0.35-2666-gbdde708.

Sterile installation right from archives on clean SD card.

I'm looking here:

https://community.freescale.com/docs/DOC-93387

And here:

https://community.freescale.com/docs/DOC-93788

I'd discovered, that command

gst-launch playbin2 uri=file://sample-video.avi video-sink="mfw_isink axis-top=0 axis-left=0   disp-width=320 disp-height=240"

does *NOT* render any video on my screen and doesn't report any problems (exept one audiosystem issue) either. CPU load approx 1..3%. But

gst-launch playbin2 uri=file://sample-video.avi video-sink="mfw_v4lsink axis-top=0 axis-left=0   disp-width=320 disp-height=240"

renders requested video normally, without lag, without frame drop, CPU load approx 10..15% and sreccn resolution is 640x480. I can't set higher screen resolution, and this is a second problem.

[Freshly installed from repo] VLC can't render any picture at all, or rendering it with almost 100% CPU load and frame drops (depends on Preferences/Video settings).

Second problem. I can't change screen resolution to other than 640x480@60. My monitor (pretty old, but still alive LCD) can do 1024x768@60. I've tested a few other systems, all of them can properly detect and set correct screen resolution via HDMI->VGA converter cable. On the other hand, i can manually edit /etc/X11/xorg.conf, and it rocks... but after a 20..30 second (or even less) screen starts flicker (looks like moni losing synchronization, but why?!)

More of that, mouse cursor leaving the trails (multiple inactive images of cursor arrow and so on). I've tried to set/unset hardware cursor option - no result. I've tried to change hsync/vsync flags - no result.

My moni DOES SUPPORT 1024x768@60 and other systems have no such problems at all.

Third problem: system tells me that release is obsolete (11.10) and asking.. not, BEGGING me for update to LTS 12.04. I've tried that once, but after update (with a few minor bugs with it) I've lost support of 3D hardware.

/var/log/Xorg.0.log says that vivante_drv.so was compiled for other X.org and refuses to load.

Labels (3)
0 Kudos
Reply
10 Replies

2,722 Views
LeonardoSandova
Specialist I

1. To use mfw_isink, you need to export VSALPHA=1 before running the pipe.

2. Can you check if mfw_isink can increase the resolution? mfw_v4sink has some hard-coded values (which is of course wrong) and this is why you can not change it.

3. About your X11 issues, please create a new discussion thread.

Leo

0 Kudos
Reply

2,722 Views
eugenesolo
Contributor II

2. Can you check if mfw_isink can increase the resolution?


yes, it can. Passing various disp-width/disp-height parameters changing rendering resolution; but screen is 640*480, so I can see only part of a picture.


One more strange thing here: when i'm starting single video stream, it plays ok. When I'm (re)starting it with the same commands, it renders only first frame and freezes (but whole system is ok, i can connect via rsh and kill gstreamer - with that first frame remaining on screen!). CPU load is 99%..100%. Only hard-reset helps to start video again.

Here is my script:

-----

#!/bin/sh

export VSALPHA=1

export GST_DEBUG=GST_ELEMENT_FACTORY:3

export GST_DEBUG_FILE=gstream.log

SAMPLE1=/mnt/SSD/v/4.mp4

WIDTH=1440

HEIGHT=1080

#SINK=mfw_v4lsink

SINK=mfw_isink

gst-launch playbin2 uri=file:$SAMPLE1 video-sink="$SINK axis-top=0 axis-left=0 disp-width=$WIDTH disp-height=$HEIGHT"

-----

Here is a 'gstream.log'

----

0:00:00.154993003  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "playbin2"
0:00:00.161146670  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "mfw_isink"
0:00:00.166181669  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "bin"
0:00:00.169492336  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "uridecodebin"
0:00:00.172781336  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "filesrc" named "source"
0:00:00.173518336  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "decodebin2"
0:00:00.174066003  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "typefind" named "typefind"
0:00:00.233268670  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "aiurdemux"

0:00:00.372698336  [335m 6814 [00m   0x197e10  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "multiqueue"

0:00:00.411608003  [335m 6814 [00m   0x197e10  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "vpudec"

0:00:00.523973670  [335m 6814 [00m   0x197e10  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "faad"

0:00:00.529452002  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "input-selector"

0:00:00.532701336  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: [00m creating element "input-selector"

0:00:00.533965003  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "tee" named "audiotee"

0:00:00.537412669  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "bin" named "vbin"

0:00:00.538083003  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "queue" named "vqueue"

0:00:00.555854336  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "autoaudiosink" named "audiosink"

0:00:00.557042336  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "fakesink" named "tempsink"

0:00:00.592781670  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "pulsesink" named "audiosink-actual-sink-pulse"

0:00:00.604649336  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "bin" named "abin"

0:00:00.605180336  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "queue" named "aqueue"

0:00:00.688758002  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "audioconvert" named "aconv"

0:00:00.713626336  [335m 6814 [00m   0x19a0e0  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "audioresample" named "aresample"

0:01:06.247390343  [335m 6814 [00m0x17050  [32;01mINFO    [00m  [00;01;37;41m GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: [00m creating element "fakesink" named "tempsink"
0 Kudos
Reply

2,722 Views
LeonardoSandova
Specialist I

For the 'twice mfw_isink loading' issue, there used to be a workaround (now it is fixed on master) on yocto

cd /usr/lib

ln -s libgstfsl-0.10.so.0 libgstfsl-0.10.so

In other words, you need to create a symbolic link with .so extension pointing to the .0 one

Try it

0 Kudos
Reply

2,722 Views
eugenesolo
Contributor II

tried, but libgstfsl-0.10.so already exist and points to libgstfsl-0.10.so.0.0.1, libgstfsl-0.10.so.0 is the same. Should I delete ".so" link and recreate it so it will point to ".0" link?

0 Kudos
Reply

2,722 Views
LeonardoSandova
Specialist I

Try it but I do not think that will solve the issue. If it does not work the latter, Could you please create a new discussion thread?

0 Kudos
Reply

2,722 Views
eugenesolo
Contributor II

additionally

trying to play full-hd video (previous attempts was with 740*400)

VLC reports that

libva: libva version 0.32.0

libva: va_getDriverName() returns 0

libva: Trying to open /usr/lib/dri/vivante_drv_video.so

libva: va_openDriver() returns -1

and no picture on screen. When i selecting anything else than YUV outpud, cpu load scales up to 170% (?!!! may be 'top' can't work with quad-core processors?)

0 Kudos
Reply

2,722 Views
eugenesolo
Contributor II

oops.. simultaneous video is not working. I can see only one of four pictures, and it's totally broken. Can't do screenshot because of overlay, but what i can see looks like static chaotic pile of coloured pixels!

0 Kudos
Reply

2,722 Views
LeonardoSandova
Specialist I

Please post logs and if you want screenshots.

0 Kudos
Reply

2,722 Views
eugenesolo
Contributor II

yep, 'export' did the job, thank you. CPU load down to 13%, isink now playing 1024*768 (actual screen resolutuon is 640*480 still, so i can see only part of a picture, but it's ok for now)

v4l still can't change resolution (it is set to default 640*480), but it's ok too. And average CPU load is 13% too, depending on scene details.

how can I check -- is hardware acceleration working properly?

0 Kudos
Reply

2,722 Views
LeonardoSandova
Specialist I

One easy way to check if gstreamer is using the Freescale gstreamer elements (which uses VPU and IPU) is enabling this log

export GST_DEBUG=GST_ELEMENT_FACTORY:3

0 Kudos
Reply