Opened 10 years ago

Closed 10 years ago

#7138 closed defect (fixed)

Internal player fails to play h264 with vdapu

Reported by: simons.philippe@… Owned by: markk
Priority: minor Milestone: 0.22
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

when opening some h264 encoded movies i'm getting this error

2009-09-24 22:17:25.995 VidOutVDPAU Error: Unable to create VDPAU buffers 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, A not in available, pause, or displayed 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, B not in available, pause, or displayed A 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, C not in available, pause, or displayed AA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, D not in available, pause, or displayed AAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, E not in available, pause, or displayed AAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, F not in available, pause, or displayed AAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, G not in available, pause, or displayed AAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, H not in available, pause, or displayed AAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, a not in available, pause, or displayed AAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, b not in available, pause, or displayed AAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, c not in available, pause, or displayed AAAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, d not in available, pause, or displayed AAAAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, e not in available, pause, or displayed AAAAAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, f not in available, pause, or displayed AAAAAAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, g not in available, pause, or displayed AAAAAAAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, h not in available, pause, or displayed AAAAAAAAAAAAAAA 2009-09-24 22:17:25.997 VideoBuffers::DiscardFrames?(): ERROR, 0 not in available, pause, or displayed AAAAAAAAAAAAAAAA 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, A not in available, pause, or displayed 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, B not in available, pause, or displayed A 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, C not in available, pause, or displayed AA 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, D not in available, pause, or displayed AAA 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, E not in available, pause, or displayed AAAA 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, F not in available, pause, or displayed AAAAA 2009-09-24 22:17:26.008 VideoBuffers::DiscardFrames?(): ERROR, G not in available, pause, or displayed AAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, H not in available, pause, or displayed AAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, a not in available, pause, or displayed AAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, b not in available, pause, or displayed AAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, c not in available, pause, or displayed AAAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, d not in available, pause, or displayed AAAAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, e not in available, pause, or displayed AAAAAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, f not in available, pause, or displayed AAAAAAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, g not in available, pause, or displayed AAAAAAAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, h not in available, pause, or displayed AAAAAAAAAAAAAAA 2009-09-24 22:17:26.009 VideoBuffers::DiscardFrames?(): ERROR, 0 not in available, pause, or displayed AAAAAAAAAAAAAAAA 2009-09-24 22:17:26.009 VideoOutput?, Error: Not compiled with any useable video output method.

Attachments (3)

mythfrontend.log (3.9 KB) - added by simons.philippe@… 10 years ago.
mythfrontend log
mythfrontend.2.log (9.2 KB) - added by simons.philippe@… 10 years ago.
full log of mythfrontend
mythfrontend.3.log (39.0 KB) - added by simons.philippe@… 10 years ago.
here it is

Download all attachments as: .zip

Change History (14)

Changed 10 years ago by simons.philippe@…

Attachment: mythfrontend.log added

mythfrontend log

comment:1 Changed 10 years ago by markk

Owner: changed from Janne Grunau to markk
Status: newaccepted

Can you attach the full output of mythfrontend -v playback. thnks

Changed 10 years ago by simons.philippe@…

Attachment: mythfrontend.2.log added

full log of mythfrontend

comment:2 Changed 10 years ago by simons.philippe@…

here is the full output of mythfrontend -v playback

comment:3 in reply to:  2 Changed 10 years ago by markk

Status: acceptedinfoneeded

Replying to simons.philippe@gmail.com:

here is the full output of mythfrontend -v playback

That log isn't from mythfrontend -v playback. I'm guessing that you're running via mythwelcome and you probably need to run mythfrontend -v playback directly.

Also - what video card are you using and how much memory does it have? I'm guessing only 256mb - which is unlikely to work with current trunk and h264 1080 playback.

Changed 10 years ago by simons.philippe@…

Attachment: mythfrontend.3.log added

here it is

comment:4 Changed 10 years ago by simons.philippe@…

I'm using a 8400GS (G98), about the memory... I bought it as a 256MB but nvidia-settings reports 512MB... so i dont know but, anyway the movie I'm trying here is 1280x720

comment:5 Changed 10 years ago by simons.philippe@…

mythfrontend.3.log uploaded

comment:6 Changed 10 years ago by markk

This is almost certainly a video memory issue, though I've not seen VDPAU run out of memory so early before.

Can you please try running:-

mythavtest myth://Videos@127.0.0.1:6543/Dune.720p.FRENCH.HD-DVDRIP.x264.AC3-GAIA.mkv

and see if it gets any further.

comment:7 Changed 10 years ago by craftyguy@…

I'm also seeing this on a 8400GS (nvidia-settings reports 512MB, but I thought the card had only 256MB). Maybe the driver is trying to address above the 256MB that the card actually has?

Worth noting that vdpau in mplayer works perfectly, I'm only seeing this with the MythTV internal player. I can provide logs, etc when I get home if anyone is interested, but they aren't much different than what simons is reporting.

comment:8 Changed 10 years ago by simons.philippe@…

its working with avtest

comment:9 Changed 10 years ago by markk

(In [22132]) VDPAU video buffering improvements.

Firstly, tweak the video buffers setup to fix the playback of certain h.264 streams (most notably, the infamous Wimbledon clip). I've tested extensively with my library of VDPAU 'special' clips on 2 setups and this does not seem to have an adverse impact anywhere and it does reduce the overall buffer size needed for some streams with 4 or more reference frames.

Secondly, add an option for the user to specify the number of VDPAU video buffers to use. It is enabled by adding vdpaubuffersize=X to the filters section of the video display profile. Valid values for X are in the range 6-50, 6 being the minimum that seems to work with most mpeg2 and h264 interlaced streams (with 2 reference frames).

The lowest setting can save over 80Mb of video memory for 1080i/p streams compared to the default buffer size of 17 frames. This may be enough for VDPAU playback on video cards with 256Mb of memory (though certainly no guarantee).

Increasing the video buffer size should fix playback for problematic streams with more than 2 reference frames. For example, the well known 'killa.sampla' h.264 clip needs around 32 video buffers for decent playback (16 reference frames) and most broken streams with 4 reference frames seem to need around 22 buffers.

This a stop gap fix for 0.22 and *should* be replaced by a more robust/intelligent/automatic solution for 0.23 - I just haven't worked out the magic formula yet...

Refs #7138, #6130.

comment:10 Changed 10 years ago by craftyguy@…

Excellent, will give it a shot and provide feedback!

I'm fairly new to all this so it may not even be possible, but are the number of reference frames in a certain video known before playback has begun? If so, wouldn't it make more sense to have the VDPAU buffers be dynamically adjusted at the start of every video playback to the bare minimum for that that video, taking into account the reference frames of the given video?

comment:11 Changed 10 years ago by markk

Resolution: fixed
Status: infoneededclosed

This is clearly a video memory problem (i.e. not enough) and hence I'm closing as there's nothing else obvious to be done for 0.22.

r22132 added the ability to reduce the video buffer size to save some video memory. This may help but will probably not work if the h264 streams have much more than 2 reference frames.

The other major video memory saver is changing the UI theme to something fairly lightweight - all those images need to be stored in video memory at some point.

Disabling any extra GPU options will also help; OpenGL vsync, VDPAU deinterlacing, VDPAU filters etc.

For reference, MythTV will never have the same video memory footprint as mplayer. This is primarily down to the GUI but also due to differences in video buffering.

Note: See TracTickets for help on using tickets.