Posts: 6,810
Joined: Jul 2010
Reputation:
198
You have gone this far, you can't give up.
You might have posted it somewhere in this thread but I couldn't find it. Is your OS 32 or 64 bit?
Posts: 2,771
Joined: Mar 2011
Reputation:
95
2011-09-04, 00:12
(This post was last modified: 2011-09-04, 01:35 by Prof Yaffle.)
Apologies to anyone who thought I'd gone away or given up... but I'm not done yet :-)
EricV - thanks, I did get your email about external ffmpeg, but family issues have kept me away from this for a while. I may yet come back to that.
However... cue trumpets... I think I've made a breakthrough. The files that cause the problem all appear to have a non-standard Y resolution, which seems to be what's choking VDPAU.
For example, if I play a file in VLC or XBMC, it reports that a corrupt file is 1280x720. However, dropping it into Osmo4 shows me that the real video stream is 1280x724. Similarly, the SD files I had grief with are nominally 640x360 - but the video stream in reality is 640x372. Anyone who's quick with their fingers will realise that the real resolutions are not multiples of 8 on the Y axis.
The H.264 files that work correctly are all 8x multiples, plus the container "metadata" as reported by most media players matches the underlying stream. That's why re-encoding the files works - it forces these to be correct while re-sampling the video stream.
So, either:
1. VDPAU is simply choking on something that isn't an 8x multiple (even though non-VDPAU playback works without corruption), or
2. VDPAU is having a bad hair day when the container says one thing but the reality is something else.
Time to ask for help again... can anyone verify this for me? Can you generate a file that has a mismatch in Y resolutions and/or test something that has a non-multiple-of-8 Y axis? I'm trying to find a way of forcing things, but maybe someone has a bright idea out there...
*** EDIT ***
Okay, done some homework - I've thrown every "edit-this-file" application I can find on Windows and Linux at the file, and can't over-ride anything that makes VLC (at least) see it as 1280x724. The file resolutely stays at 1280x720.
However, I did turn up a post about H.264 Video Usability Information ("VUI" - aspect ratio, colourspace and similar) and how this may actually be stored as an extra 4 lines in some way. Could be a complete red herring (it wouldn't explain the 12 line on the SD files), but in case someone understands this I thought it worth mentioning.
Posts: 2,771
Joined: Mar 2011
Reputation:
95
Since this seems to be limited to me, I start to wonder if it's a Revo R3600 problem and/or original ION and/or Ubuntu 10.04. Your post got me thinking, so I upgraded libvdpau on my dev image to 0.4-3 (0.3-2 ships with Lucid) to see if that changed anything... nope.
I'd try Openelec if it supported my tuner cards (and if I had a pair of spare USB sticks to hand)... maybe I need to build a fresh Maverick or Natty system and see if that helps, although I do like the convenience of XBMC Live.
Re: your post, FernetMenta... CPP? C pre-processor?
Anyway... System -> Settings -> Video -> Playback
1. Dev box, running self-build git:20110719-2d77939 - no option for VAAPI, so I don't know where that went!
2. Production box, running Dushmaniac's 30-08 build (no package info since he moved the PPA to PulseEight) - VAAPI is disabled, and I think I've tried every combination of these options.
I'm convinced that it's this video height issue, but I don't know why - whether it's a library, or ffmpeg, or something else, whether it's expecting multiples of 16 or 8 and choking, whether it's because it's an odd aspect ratio... pass.
Starting to annoy now. I'd simply re-encode the files, except live streaming still wouldn't work if the broadcasters are transmitting odd files (which they seem to be).
Posts: 6,810
Joined: Jul 2010
Reputation:
198
Cpp -> C++
Let me check, maybe I can add debug code to vdpau slice decoding and verify your theory.
Posts: 2,771
Joined: Mar 2011
Reputation:
95
Thanks, as always.
As another reference, I remembered that I had an old 32-bit/10.10 image lying around, so booted into that - 10.1 Dharma worked fine, installed the latest OdK build and the corruption is back (after hacking around an update to libva to get it to work). So it's not a distro issue per se, and the behaviour definitely arrives with the newer XBMC code. I'm just installing 500Mb of patches onto that system t bring it up to date just to make sure...
Still points a finger at ffmpeg to me, so I'll go back to seeing if I can compile that externally when I have a spare few hours.
Posts: 2,771
Joined: Mar 2011
Reputation:
95
Hey, I'm just as confused as you, I assure you!
If the debug log shows both enabled, that was simply what I was trying at the time. I've tried both, VAAPI only, VDPAU only and neither - the corruption only appears when VDPAU is switched on. Normally, I'd only have VDPAU enabled, VAAPI is switched off (unless it's on by default for some reason).
Re: libva, when I tried to start Dushmaniac's xbmc it complained about libva versions - I suspect his PPA carries 1.0.1.3 (or something similar) but it wouldn't install because it couldn't overwrite vainfo, which is a package in its own right. Uninstall that, manually install libva1, and xbmc would then start. But I'm not using VAAPI (at least, not intentionally) - it's simply a dependency that XBMC is looking for.
I think the default XBMC compilation includes both VDPAU and VAAPI, though, doesn't it? Dushmaniac's default build appears to. Interesting question, though...