-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video panning/jitter observed with hardware acceleration on mplayer using libvdpau-sunxi #50
Comments
logs? Do known-to-work videos play? Did you try mpv? Which kernel version are you using? The linux-sunxi one? How is your display output configured? 50Hz, 60Hz? Regards rellla |
Hi rellla My mplayer logs: I didn't tried the mpv yet. Will it makes any difference or is it better than mplayer?? thanks |
What libvdpau-sunxi version do you use? I meant, did you build your kernel yourself? And do other videos work, for example the ones from here http://linux-sunxi.org/Cedrus/libvdpau-sunxi#Playing_video ? Are you working on any prebuilt distro/image? |
I am using kernel image build by olimex.com. I followed the steps on olimex and made the kernel for my board. I don't know how to check libvdpau-sunxi version?? |
Link? |
And i use this link for libvdpau-sunxi installation on my board: |
Kernel is not the newest one, but that should not be the issue. For libvdpau-sunxi, you are for sure using some old revision and not the recent master branch. Check that! Did you build it yourself and did you check linux-sunxi.org? |
Yes, the big buck bunny video works fine especially the 1080p/30 fps one. |
libvdpau-sunxi has nothing to do with kernel version. Go read the wiki and use a recent version. With the olimex link above I still don't know if you use some precompiled version or compiled it by yourself. I can't find any word on vdpau. The only thing I know is, it's an old version and may produce issues with certain video files. Because of the bunny video, it's proved, that hardware acceleration basically works. |
ok let me find out the recent version of the kernel. |
Not of the kernel, libvdpau-sunxi!! |
Ok, I will work on the libvdpau-sunxi new build. Could you please give me the link to start reading for the new build? |
Hi Rellla If you want I can post a screenshot of the video so u can have better understanding of what I am trying to explain? And then you might suggest something important which I missed in my built. thanks |
How did you build libvdpau-sunxi? |
I used this link to build libvdpau-sunxi: Remember I am using mplayer not mpv to play my video, so may be thats why the logs are different. I am now trying to build with mpv so that we both are on same page. |
Hi Rella, i appreciate all your assistance. If possible can I send you the video I am having issues with and give the the time (in seconds) that the video anomaly occurs? I can find a place to post so that you can download. I would be really interested to see if the video plays perfectly without (apparent frame loss) on your system. To be clear most videos have acceptable playback on my system but any video with full screen panning I get what looks like frame skipping and the playback is not smooth. Looks like the video is jumping frames. Let me know if you think sending the video would be helpful. |
First you said, you are using https://github.com/linux-sunxi/libvdpau-sunxi, now you say https://github.com/rellla/libvdpau-sunxi ?? If you don't see at least the osd enabled/disabled line, you are not using a recent version. You can link your sample file somewhere, maybe someone else can try. I have no machine running with MPV online atm and can't try. I can just give you the theory. |
Hey Rellla One question I believe I am using the latest version. However I will defer to you. One question the line [VDPAU SUNXI] OSD enabled, using G2D does not show up on my console output but is guaranteed due to not using the latest libvdpau-sunxi drivers OR is this due to the fact that I am using the 3.4.90+ kernel and not using Jessie version? Is there another way to determine the driver version I am using to 100% confirm my driver is older? Since I am not 100% sure that my driver is older (although I trust your expertise) I will not post syslog and dmesg until we can figure out the driver version. I have rebuilt with the libvdpau driver from the link you confirmed and still do not see this line in my console output. [VDPAU SUNXI] OSD enabled, using G2D Please let me know if there is another way to confirm the driver? Nav |
Hi nav, If you follow https://github.com/linux-sunxi/libvdpau-sunxi/blob/master/device.c#L54 and following, you can conclude, that you have to see exactly one debug line, that comments about OSD. If you use the dev branch, you have the debug line about the display version, too. https://github.com/linux-sunxi/libvdpau-sunxi/blob/dev/device.c#L86 That is the reason, why i think, you are using an old version. rellla |
Just add some debugging prints, and you will know for sure that libvdpau-sunxi had been really built by you and loaded correctly. |
Let me tell you the steps i followed: For the prerequisites: libvdpau >= 1.1 the libvdpau 1.1. is already been installed and verified by me using: ldconfig -p | grep libvdpau Then for libcedrus: I followed the same link https://github.com/linux-sunxi/libcedrus Then i build necessary dependencies: My ldconfig -p | grep libpixman shows: gcc 4.6 is already been there in my file system. For libcsptr: Then i follow: I found ldconfig -p | grep libvdpau_sunxi.so.1 shows libvdpau_sunxi.so.1 in directory /usr/local/lib/vdpau . Is it the right way to check the installed libvdpau-sunxi?? These are the steps I followed to install libvdpau-sunxi. thanks |
Seems ok so far. You should see "Hello nav!" when libvdpau is opened. rellla |
Hi Rellla these are my logs afetr installing libvdpau-sunxi from the branch u want me to test: mpv player logs:
mplayer logs:
But I don't see "Hello nav!" anywhere?? thanks |
I can't help but wonder if @navjotsingh07 is actually installing his self-compiled versions of the libraries in a different location than the libraries he already had in his system, thereby having multiple versions of the libraries installed and the applications using the old ones... |
@navjotsingh07 definitely uses some old version. You may build it right and do a "make install" but it's not used. You have to see the following with the said branch: [VDPAU SUNXI] VE version 0x1623 opened Do a |
The output of find / -name libvdpau* : /usr/share/doc/libvdpau-dev /usr/local/lib/vdpau/libvdpau_trace.so /usr/lib/arm-linux-gnueabihf/vdpau/libvdpau_trace.so.1.0.0 /var/cache/apt/archives/libvdpau-dev_0.4.1-7_armhf.deb |
The one which are in directory /usr/lib/arm-linux-gnueabihf/ are of date Aug 2012. I think mplayer or mpv picks the libvdpau-sinxi and libvdpau from this directory, thats why its not showing up the logs that Rellla was talking about. |
Just delete them. Maybe do a ldconfig afterwards. |
Hi I replace them with the new drivers and now I am getting the mplayer logs as: In the first iteration of the a looping video, the logs are: MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team Playing seven10.mp4. Forced video codec: ffmpeg12vdpau In the 2nd iteration of loopvideo, the logs are: MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team Playing seven10.mp4. Forced video codec: ffmpeg12vdpau Why it is showing VE version 0x0000 opened in the first iteration and VE version 0x1623 opened in second iteration?? And there is no difference in Video Playback, even I tried MPV player also. The Video panning/jitters still observed whenever I am using a video that has fullscreen panning and also when video bit rate is 20MB/s+ Now what to do to make the playback smooth?? Suggest something now. thanks |
Ok. So at least you are now using a newer libvdpau-sunxi. Which one exactly is it now? Maybe it's really a problem with the specific video files. You said, some videos are working ok. Can you again link some sample of the videos that don't work, so others can test? Maybe you can also give some information about the videos using the output of https://mediaarea.net/en/MediaInfo . Not sure if that is codec, libvdpau-sunxi or display related ... PS: Can you use some online pasting service or gist for your log files, to not blow up this conversation? |
@navjotsingh07 now that you know the issue why you were using old versions, can you try the dev branch? It minimizes the usage of XClearWindow which could be a performance killer on 1080p ... |
@rellla Secondly, I am posting a link to the video that gives me trouble and playback is not smooth. Even though it plays smooth on PC computer via VLC player but on A20 Olinuxino Micro board, it gives issues like: Link to the video: MediaInfo of this file: I wish anyone on the forum test this video on their development board and share the results. Can you suggest any other parameter to look upon to make playback smooth?? thanks |
Hi @rellla thanks |
@navjotsingh07, display v1.0 means, that you are using the kernel display driver v1.0 which fits to A10 or A20. So it's correct. I think you have an issue with your destination output. screen0/1 and/or fb0/fb1. according to the logs, the libvdpau-sunxi side seems ok. rellla |
Hi @rellla I am using : export DISPLAY=:0 to send the mplayer output to HDMI screen. And these are the kernel command line: Just have a look and suggest why it is breaking up the display?? thanks |
You can ignore this message. It's not relevant. You can try export DIPSLAY=:0.0 ? |
Hi @rellla thanks |
No, i have no clue about the panning/jitters. I try to playback the video this evening. Maybe someone else can test your video file, too. With vlc on i386 it's ok. Does that mean, with "VDPAU_OSD=1" you have video output, and without that, you have no output? Rellla |
Hi @rellla Yes with "VDPAU_OSD=1", I have the video on HDMI TV screen. If I don't write this, I don't have video on screen. Even though I can hear the audio and can see the console output. thanks |
this sounds libvdpau-sunxi related and isn't related to your jitters. i have an idea how to fix this, maybe the next days. |
Hi Rellla, Want to clearly state the issue again for clarity. If we play a video 1080p or 720p where most of the pixels in the video are panning / moving (the quicker they move the more serious the video anomaly). We get what looks like frame loss or jitter / skipping. The video I uploaded is representative of the issue. We think our base kernel / video playback is okay as if we play a video without this type of panning i.e. "large percentage of pixels moving in a scene", the video playback is as expected. For example the Big Buck Bunny video plays as expected. 70% of our videos playback as expected but on videos with large areas of the picture panning the issue is very pronounced. A couple of follow up questions / comments.
Just want to know where to go from here. thanks |
I think the jitter while panning is a display problem and has nothing to do with decoding/cpu/memory. The output driver doesn't provide any way to synchronise the output frames with the display VSync, so some frames might be visible too long, and others too short, which is barely visible except when panning. |
Hi @jemk Thanks very much for the information. I would like to give you some other info as we would like to try and solve this issue. The video output jitter is very noticeable during the 1st playback of the video file. During the first video playback the console output shows audio and video go out of sync by 3-4 seconds when the display output is set to 1080p60. If we set the display to 720p60 you still see the jitter (although reduced) however the video and audio is synced (during the first video playback where we normally has a sync issue) according to the console. We are using mplayer to play the video. During the second playback of the same video (we just constantly loop the same video) the jitter is significantly less and the audio and video do not go out of sync according to the console output. These results have been confirmed many times. 1st playback significant jitter and sync issue. 2nd playback reduced jitter but audio and video is synced. So if it is the display output from the A20 why does it get better the 2nd time the video is played? Also can the vsync be fixed? Any information or help would be greatly appreciated as I have been working on this for months. |
I'm sorry, I can't reproduce this, your video plays fine on my A20. The difference between 1080p and 720p could mean the memory bandwidth isn't good enough, but that doesn't explain why it works better the second time. I hope you have checked that it isn't because of slow storage (sdcard/...) where the first time reading is slow and then the 2nd time it's read from cache. What board are you using, does it have a 32bit memory bus or reduced 16bit? Second could really be too slow for 1080p60. Fixing the vsync issue would require a lot of work with big changes on the legacy display driver, but I don't think its worth the effort, the difference should be barely visible. |
Hi @jemk Thanks for the quick response. Which A20 board do you have? And what kernel version are you using - Debian Wheezy or Debian Jessie?? I would like to purchase to test as I have tested several boards including Olimex Lime, Banana Pi, etc. All display the issue. My actual board is based on A20 Olimex Micro. Also when you tested what size was the monitor you were displaying the video on? I use a 40" monitor using HDMI output on our board and if you use a 21" or smaller monitor it is more difficult to see the issue. Please let me know as again I have been working forever on this issue. Thanks for your help MUCH appreciated! Also I am posting my MEMINFO-STATIC to check the memory bus width: dram_clk = 432 |
Hi @jemk Thanks for your help. Which A20 board do you have? And what kernel version are you using - Debian Wheezy or Debian Jessie?? I would like to purchase to test as I have tested several boards including Olimex Lime, Banana Pi, etc. All display the issue. My actual board is based on A20 Olimex Micro. Also when you tested what size was the monitor you were displaying the video on? I use a 40" monitor using HDMI output on our board and if you use a 21" or smaller monitor it is more difficult to see the issue. Please let me know as again I have been working forever on this issue. Thanks for your help MUCH appreciated! |
I've tried it again with a Cubietruck on 25" 1080p60 monitor, I can't see any problem except very light jitter while the first panning, but the same happens when playing the video from a x86 PC. |
Hi @jemk Thanks again. A couple of things. If I play the video on my x86 linux computer in VLC, I do not notice any jitter the video plays perfectly. But, If play it in the default Ubuntu video player I can see the issues. Also If I play the video with other embedded computer HD boxes. Like WD Live or Brightsign HD 410, I do not see any issues. So that means, the video is able to play back properly. this has been proven on over 10 different players included the built in Samsung video playback on my 40" TV. Which version of Cubietruck are you using? I would like to purchase to test. I have tried playing the video from SD card (default playback ). Also I have tried playing from USB key and from the NAND onboard. All give the same results with jitter. Let me know where you think I should start looking? if you could provide any clue that would be helpful. thanks |
I don't think changing the board again would change anything after you already tried different boards, its likely a software problem. |
Hi @jemk Thanks for your reply. I am trying to check system parameters that are responsible for video play. Also I tried to set cpu governer to ONDEMAND as well as PERFORMANCE mode, but no difference observed. thanks and regards |
VO: [vdpau] 1920x1080 => 1920x1920 Planar YV12 I don't know why ? please help me!! ./mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, h264_0.h264 |
@JackZ0 I suggest to create a separate issue, because your problem isn't related to this issue. Your error tells me, that there is an issue in vdp_presentation_queue_target_create_x11. Without the libvdpau-sunxi log, i can only guess, that you are missing rights on /dev/disp? Can you post your libvdpau-sunxi log and dmesg? |
@rellla thank you ! and this is libvdpau_sunxi and mplayer: Forced video codec: ffmpeg12vdpau
|
Please open a new issue. Check the readme at https://github.com/linux-sunxi/libvdpau-sunxi for the correct mplayer/mpv starting parameters regarding vdpau. I think, yours are wrong. |
I observed the same problem and solved it by reducing the resolution to 1080p 50Hz. This issue might be related to the hardware scaler:
|
I am working on 1080p MP4 (around 20 Mbps/29.97 fps) video play with hardware acceleration on mplayer that use video output as vdpau and video codecs as ffmpeg12vdpau, ffh264vdpau, ffwmv3vdpau, ffvc1vdpau
I already installed libvdpau-sunxi on my debian system. The debian version I am using is 3.4.90+ (wheezy). The hardware is based on Allwinner A20.
But when I play video using serial console command:
mplayer video1.mp4
I observed panning/jitters on many frames of the video. The audio and video are also out of sync in the first iteration of the video. The out of sync problem happens only in the first iteration of the video; if I play the same video again, the audio-video remains in sync, but the panning/jitters are still there in the video. I tried to troubleshoot the issue with different videos/web forums, but couldn't get success. Since A20 can easily play 30 Mbps/30 fps 1080p videos, I don't understand why my hardware is not playing it smoothly. Is there any kind of specific settings that I need to look upon. Since I am quite new to A20 allwinner based development, so need a direction to fix my issue.
Can anyone help me out to solve the issue?
thanks
Nav
The text was updated successfully, but these errors were encountered: