3 3
PaulA20

armbian 5.10 to 5.11 break video playback (cb2)

Recommended Posts

I started using armbian just a few days ago, I used the cb2 image.

 

When I updated from 5.10 to 5.11 when I play a video, the video surface is darker, for example, instead of white I get grey.

 

Just to be sure I put armbian 5.10 in another SD and videos played well, them update to armbian 5.11 and had the same problem with video playback.

 

Does someone have any idea what is the problem?

 

Until the problem is solved, how can I downgrade my armbian 5.11 to 5.10?

 

Thanks.

 

 

EDIT:

I downloaded and installed the 5.10 pkgs:

armbian-hostapd_5.10_armhf.deb
linux-firmware-image-sun7i_5.10_armhf.deb
linux-headers-sun7i_5.10_armhf.deb
linux-image-sun7i_5.10_armhf.deb
linux-jessie-root-cubieboard2_5.10_armhf.deb
linux-u-boot-cubieboard2-default_5.10_armhf.deb
 
and solved the problem with video playback, so for now I have it working again, lets hope the problem will be solved so I can upgrade my armbian system.

Share this post


Link to post
Share on other sites

I have the same problem. The video plays less contrast. Currently helped: 

sudo apt-get install linux-firmware-image-sun7i=5.10 linux-headers-sun7i=5.10, linux-image-sun7i=5.10 linux-wheezy-root-cubietruck=5.10 linux-u-boot-cubietruck-default=5.10

Share this post


Link to post
Share on other sites

I'm not sure that I have enough knowledge to do so. I must be guided by it? Then execute desktop.sh?

I am not saying you must do this :P 

 

But if you lack of knowledge and you are motivated than you learn and fill this knowlege gap :)

Share this post


Link to post
Share on other sites

Hi all,

 

I don't hope, that this commit: https://github.com/igorpecovnik/lib/commit/be91b5afc9de3c2463552cd613b563009aa3227bis responsible for that behaviour.

What player do you use and what version of the libvdpau-sunxi lib is used in your system.

 

Background:

The CSC handling of the sunxi-3.4 kernel was buggy and should be fixed with this patch. Bright, contrast, saturation and hue should be calculated correct now.

After applying the patch it's up to the app (libvdpau-sunxi and/or player) to set the values right. The upstream master libvdpau-sunxi does not calculate it the right way.

This is my commit to fix this https://github.com/rellla/libvdpau-sunxi/commit/271c27b7eeea31a33dea9f39a025bdca89d8243b- sadly not on top of upstream master atm. I hope to get this patch upstream soon.

 

Regards

rellla

Share this post


Link to post
Share on other sites

The CSC handling of the sunxi-3.4 kernel was buggy and should be fixed with this patch.

It is possible that this fixes the issue described below?

 

I've noticed reduced color space when playing video with mpv on 5.10 (kernel 3.4.112, cubietruck, HDMI). It can be easily seen when viewing video like this one:

 

(it was re-encoded to h264 of course). One may note gray scales in range 0-16 and 236-245 are almost indistinguishable (first three are almost white and last three are almost black). To verify that this is not board itself, I've extracted one frame from the video and it shows nicely in picture viewer. The same video are also plays fine in Kodi on RPI2B.

Share this post


Link to post
Share on other sites

Hm. I'm not very good on the color space things, but at the time i did the code, i included two matrices into libvdpau...

https://github.com/linux-sunxi/libvdpau-sunxi/blob/staging/csc.h

 

Not sure if this is right, but at least in libvdpau CSC_FULL_RANGE is defined, but maybe i have an error anywhere though....

Maybe this info helps you ...

 

The kernel fix just corrects some bogus kernel lines. I did not dig deeper in the kernel csc handling.

Though i still am not sure, why csc handling doesn't seem to work right on 5.11 for user Avi... Probably these patches are not included into 5.11 and 5.10 used dan-and kernel (which included them)?

 

Regards

rellla

Share this post


Link to post
Share on other sites
Background:

The CSC handling of the sunxi-3.4 kernel was buggy and should be fixed with this patch. Bright, contrast, saturation and hue should be calculated correct now.

After applying the patch it's up to the app (libvdpau-sunxi and/or player) to set the values right. The upstream master libvdpau-sunxi does not calculate it the right way.

This is my commit to fix this https://github.com/rellla/libvdpau-sunxi/commit/271c27b7eeea31a33dea9f39a025bdca89d8243b- sadly not on top of upstream master atm. I hope to get this patch upstream soon.

 

Regards

rellla

Hello. I think i've tried this commit on older Armbian version before (4.83 or 5.00), on my A20 device (libvdpau-sunxi VE1623) and i had some issues, but i don't remember what. Or hwacceleration was not working, or video was glitchy and trembling. But on this version of libvdpau-sunxi, brightness and contrast are really the issue, because picture is very dark. So it will be nice if this patch make it's way to master :).

I am not that experienced and i don't understand building process well, but about brightness, contrast, hue and saturation, i always have different behavior in every new build, with the same versions of drivers and libraries and the same steps i follow. For example - my previous build of Armbian 5.06 i was able to adjusts only contrast and hue and not brightness (saturation, i don't tried), while on Armbian 5.07 which i use now, everything work correctly and i don't dare to upgrade and touch anything :). While on my H3 device (libvdpau-sunxi VE1680) and the same Armbian 5.07 and almost the same steps of installing stuff, non of brightness, contrast, hue or saturation worked. Hopefully with the version of libvdpau-sunxi there, image is bright enough and don't need to be touched much.

Anyway, thanks for you work and support :thumbup:.

Share this post


Link to post
Share on other sites

What is the libvdpau-sunxi version that is packaged here? Is it really linux-sunxi/libvdpau-sunxi.git at commit 906c36e ?

I don't know if i understand it right...

 

If so, CSC won't work right with the (corrected) patched kernel.

 

Regards rellla

Share this post


Link to post
Share on other sites

Pardon my ignorance and bad english. It was couple of months ago and i am not sure about commit. I browse through master

libcsptr and staging branch of linux-sunxi/libvdpau-sunxi.git and tried some versions. And this commit above look like the one from libcsptr branch i think i tried, because i remember it has the same requirements and i had to install libcsptr. The issues i noticed are for those one.

Share this post


Link to post
Share on other sites

I rebuilt  Armbian_5.14_Cubietruck_Debian_jessie_3.4.112_desktop.raw but unfortunately the video in the mpv is still dark. What am I doing wrong?

Share this post


Link to post
Share on other sites

It's really sad to see that the problem continues, I'm forced to stay in Armbian 5.10 to be able to use video playback.

 

I will try to find to find the problem, but my knowledge maybe small for such task.

 

EDIT: with system uptodate the problem still exist, if I decode a video by software it play fine, if I play with VDPAU the video will get dark.

 

If I downgrade  linux-image-sun7i (sudo apt-get install linux-image-sun7i=5.10) the VDPAU will work again without problem.

 

May it be a kernel problem?

Share this post


Link to post
Share on other sites

- removed the libvdpau-sunxi,

 

- compiled and installed libcsptr (hxxps://github.com/Snaipe/libcsptr),

 

- compiled and installed libvdpau-sunxi (hxxps://github.com/linux-sunxi/libvdpau-sunxi/tree/staging).

 

and the video playback works again.

Share this post


Link to post
Share on other sites

Hi all,

i encourage you to test this libvdpau-sunxi branch. It also depends on libcsptr.

I have rebased some work and wiped out obsolete branches in my personal repo to focus on upstream branch.

If no big issues are introduced with the commits on the dev branch i will push it into master.

The csc problem should be solved. I tested it yesterday with csc patched kernel and this libvdpau-sunxi branch.

 

Feel free to report problems.

 

Regards

rellla

Share this post


Link to post
Share on other sites

Hi all,

i encourage you to test this libvdpau-sunxi branch. It also depends on libcsptr.

I have rebased some work and wiped out obsolete branches in my personal repo to focus on upstream branch.

If no big issues are introduced with the commits on the dev branch i will push it into master.

The csc problem should be solved. I tested it yesterday with csc patched kernel and this libvdpau-sunxi branch.

 

Feel free to report problems.

 

Regards

rellla

 

Hi rella,

 

I tested that branch but im my system it doesn't work well, in a video window I only see a black solid with some noise, in full screen I'm able to see the video, but theres also, some problems.

Share this post


Link to post
Share on other sites

Hi rella,

 

I have a tvbox, but i always used the cubieboard2 stuff.

 

The "some problems" also exist without fullscreen, all the stuff in the monitor (desktop and video surface) will have some movement.

 

With https://github.com/l...43260738d33751d I also have the same result as your 'for_master_upstream' branch, it will show the video in the window but in fullscreen it will not resize the video.

 

I also have the "some problems" with your 3 branchs (dev,master,for_upstream_master) of libvdpaud that I tested.

Share this post


Link to post
Share on other sites

Hi rellla!

I also recompiled dev branch.

 

When run from the GUI and then switch by double-clicking in full screen, the video plays well and the color is normal.

 

But if I start playback from a ssh session:

export DISPLAY=:0.0
mpv -fs --vo=vdpau --hwdec=vdpau --hwdec-codecs=all Adventure.Time.S04E13.I.Remember.You-The.Lich.WEB-DL.1080p.DUB.ENG-BS.mkv

the video does not displayed.

 

Sorry for my bad English :)

Share this post


Link to post
Share on other sites

Running the standard xfce interface to the desktop version Armbian.

On Armbian 5.10 with default kernel 3.4 and default libvdpau-sunxi it all works.

Share this post


Link to post
Share on other sites

the video does not displayed.

Ok. You log into shell via ssh and run that command? Is X running while you do that?

Are there any further messages? Does audio work?

Regards

rellla

Share this post


Link to post
Share on other sites

As I understand it, X (with XFCE environment) is running in this moment

log mpv:

 

 

mpv -fs --vo=vdpau --hwdec=vdpau --hwdec-codecs=all Adventure.Time.S04E01.Hot.to.the.Touch-Five.Short.Graybles.WEB-DL.1080p.DUB.ENG-BS.mkv
Playing: Adventure.Time.S04E01.Hot.to.the.Touch-Five.Short.Graybles.WEB-DL.1080p.DUB.ENG-BS.mkv
(+) Video --vid=1 (*) (h264)
(+) Audio --aid=1 --alang=rus (*) 'DUB [Cartoon Network]' (ac3)
Audio --aid=2 --alang=eng (aac)
(+) Subs --sid=1 --slang=rus (*) '[Forsed]' (subrip)
[VDPAU SUNXI] VE version 0x1623 opened
[VDPAU SUNXI] OSD disabled!
[VDPAU SUNXI] Using display v1.0
Using hardware decoding (vdpau).
VO: [vdpau] 1920x1080 vdpau
[VDPAU SUNXI] Generate CSC matrix from following color standard: 0
[VDPAU SUNXI] >procamp->bright: 0.000, procamp->contrast: 1.000, procamp->saturation: 1.000, procamp->hue: 0.000
[VDPAU SUNXI] Setting mixer value from following color standard: 0
[VDPAU SUNXI] >mix->bright: 0.000, mix->contrast: 1.000, mix->saturation: 1.000, mix->hue: -0.000
[VDPAU SUNXI] Setting mixer value from following color standard: 0
[VDPAU SUNXI] >mix->bright: 0.068, mix->contrast: 1.000, mix->saturation: 0.479, mix->hue: -0.068
AO: [alsa] 48000Hz stereo 2ch s16
[VDPAU SUNXI] Presentation queue csc change
[VDPAU SUNXI] display driver -> bright: 53, contrast: 50, saturation: 24, hue: 49
AV: 00:00:07 / 00:23:03 (0%) A-V: -0.000


Exiting... (Quit)
[VDPAU SUNXI] libvdpau-sunxi closed.

 

 

 

audio ok.

Share this post


Link to post
Share on other sites

Hm. Looks ok so far at least from decoder side.

It has to be some issue with display i think. Does screen get black or is the desktop staying on the top? Does dmesg say anything dubious? Some problem with user rights on /dev/disp when starting from ssh? Xorg.log, system.log/ journaldctl -r ?

I'm just blindly guessing....

 

Regards

rellla

Share this post


Link to post
Share on other sites
But if I start playback from a ssh session:
export DISPLAY=:0.0
mpv -fs --vo=vdpau --hwdec=vdpau --hwdec-codecs=all Adventure.Time.S04E13.I.Remember.You-The.Lich.WEB-DL.1080p.DUB.ENG-BS.mkv

the video does not displayed.

Could you provide "env" output from ssh terminal? I'm guessing too. And you can also check user rights of mali, ump, disp, fb0, g2d and cedar_dev in /dev .

Share this post


Link to post
Share on other sites

Desktop at the time of launch mpv like changing the brightness and contrast. During the play desktop comes in waves. 

If I run mpv directly from an xterm it is the same.

If I run the mpv without the parameter "-fs" and then double-click turn to full screen then everything is OK

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
3 3