Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-19-11, 02:35 PM   #1
Prof Yaffle
Registered User
 
Join Date: Sep 2011
Posts: 2
Default File Corruption - VDPAU/ION - non-standard file dimensions?

Folks -

This has been vexing me for some time. It appears as corruption of the lower 20, 25% or so of a playing video - garbage or a green "tide" that washes in and out, depending on what's going on in the image. Switching off VDPAU gets rid of it - but, on an ION system (Aspire Revo 3600), there's not enough CPU grunt to play it then.

I first noticed it on XBMC when they upgraded their internal ffmpeg from r24229 to c3beafa (so, 10.1 Dharma plays the files/streams, but pre-11.0 Eden builds don't)... I'm seeing it in MPlayer as well, apparent on a new build today with auto-downloaded (current) ffmpeg but, again, not apparent on an ancient build.

So, today's SVN checkout and self-build of MPlayer with defaults fails:

Code:
xbmc@XBMCLive:~/setup/mplayer$ export DISPLAY=:0.0; ./mplayer -vo vdpau -vc ffh264vdpau ~/Sample.flv
MPlayer SVN-r34111-4.4.3 (C) 2000-2011 MPlayer Team

Playing /home/xbmc/Sample.flv.
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO:  [H264]  1280x720  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
Clip info:
 aacaot: 2
 audiochannels: 2
 audiocodecid: mp4a
 audiosamplerate: 24000
 avclevel: 41
 avcprofile: 100
 duration: 1735
 height: 720
 moovPosition: 32
 videocodecid: avc1
 videoframerate: 25
 width: 1280
Load subtitles in /home/xbmc/
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1280x720 => 1280x720 H.264 VDPAU acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.
A:   3.7 V:   3.7 A-V: -0.000 ct: -0.040   0/  0 20%  4%  3.5% 7 0


MPlayer interrupted by signal 2 in module: sleep_timer
A:   3.7 V:   3.7 A-V:  0.000 ct: -0.040   0/  0 19%  4%  3.5% 7 0

Exiting... (Quit)
However... ancient binary install from repo works:

Code:
xbmc@XBMCLive:~/setup/ffmpeg-dev$ mplayer -vo vdpau -vc ffh264vdpau ~/Sample.flv
MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
mplayer: could not open config files /home/xbmc/.lircrc and /etc/lirc//lirc/lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.

Playing /home/xbmc/Sample.flv.
libavformat file format detected.
[h264 @ 0xa092ef0]brainfart cropping not supported, this could look slightly wrong ...
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO:  [H264]  1280x724  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
waitpid(): No child processes
AO: [pulse] Init failed: Internal error
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[h264_vdpau @ 0x18d3e00]brainfart cropping not supported, this could look slightly wrong ...
[VD_FFMPEG] XVMC-accelerated MPEG-2.
VDec: vo config request - 1280 x 724 (preferred colorspace: H.264 VDPAU acceleration)
VDec: using H.264 VDPAU acceleration as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
VO: [vdpau] 1280x724 => 1280x724 H.264 VDPAU acceleration

MPlayer interrupted by signal 2 in module: sleep_timer

Exiting... (Quit)
I'm not sure where the fault now lies.

I've traced the fault - I think - to non-standard file sizes. Many of the UK (at least) on-demand TV programmes are not necessarily perfect sizes - the BBC iPlayer HD ones, for example, seem to be 1280x724 instead of 1280x720. However, many programs identify them as 1280x720 anyway, so finding something to confirm this isn't easy! I read something about a "crop directive" that is meant to be honoured, but maybe is being ignored while assumptions are made on the file? Anyway, you can see the MPlayer output in the above two examples is different - one sees it as 1280x720 and fails, one sees it as 1280x724 and succeeds. I've seen similar problems on streams from other channels, both SD and HD.

Anyway, I've already tried the suggestions in this post:

Code:
-vo vdpau -vc ffh264
(just plays v-e-r-y slowly, as expected)

Code:
-demuxer lavf
(no difference)


and also the ones in this one:

Code:
-mc 1 -delay -0.5
(not a surprise - it makes no difference to the video stream alone)

Code:
-demuxer lavf -nocorrect-pts
(no change either)


So...

Code:
export VDPAU_TRACE=1
export VDPAU_NVIDIA_DEBUG=3
Run with

Code:
export DISPLAY=:0.0; ./mplayer -vo vdpau -vc ffh264vdpau ~/Sample.flv 2>&1 | tee vdpautest.log
Results attached - I'll save pasting them in here - vdpautest.log.bz2.

Also, results of sudo nvidia-bug-report.sh are also attached (nvidia-bug-report.log.gz).

I'm just uploading a sample: VDPAU-test-1280x724-Sample.flv

Re-wrapping this into, say, an MP4 container makes no difference. Extracting the raw H.264 video stream makes no difference. Re-encoding (e.g. with Handbrake) fixes the problem by producing a true 1280x720 file - but, of course, that's no use for streaming video/catchup services, which is the real problem I'm trying to solve.

uname -a gives Linux XBMCLive 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux if it's not in the debug file.

I'm not running the absolute up-to-date NVidia drivers, but I've tried a couple of different versions with no difference. Also, the fact that some programs seem to be able to play the files/streams and some can't suggests that it isn't necessarily the driver. I can upgrade, of course.

You can find full details of the saga here if you're interested.

Comments and thoughts very welcome!

Thanks...
Attached Files
File Type: gz nvidia-bug-report.log.gz (40.1 KB, 45 views)
File Type: bz2 vdpautest.log.bz2 (23.4 KB, 46 views)
Prof Yaffle is offline   Reply With Quote
Old 09-26-11, 06:18 AM   #2
Prof Yaffle
Registered User
 
Join Date: Sep 2011
Posts: 2
Default Re: File Corruption - VDPAU/ION - non-standard file dimensions?

No opinions/thoughts/comments, anyone? I know it may be a little off-piste, since it's probably an ffmpeg issue manifesting in mplayer rather than VDPAU per se, but I'm still hopeful that the assembled brainpower might at least understand the problem.

Comments still welcome!

Thanks...
Prof Yaffle is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:04 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.