Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#11377 closed Bug Report - General (fixed)

Corrupted video when using VDPAU decoding

Reported by: peper03@… Owned by: JYA
Priority: minor Milestone: 0.27.2
Component: MythTV - Video Playback Version: 0.26-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Playback of the intro to 'Ultimate DVD Demo' is corrupted when VDPAU decoding is used. I extracted the video from the DVD to an mpeg2 video file and tried it in MythVideo? with the same results, so it seems to be general decoding/playback issue rather than anything DVD-specific.

Playback in mplayer and vlc is fine (but I don't know whether they use VDPAU for decoding or just rendering).

NVIDIA drivers are 304.43.

The problem exists in 0.26-fixes and master.

I've uploaded a 10-second sample to stuartm's DVD respository - BadPlaybackWithVDPAUDecoding.m2v

Another user has also reported the same issues: http://www.gossamer-threads.com/lists/mythtv/users/538080

Change History (10)

comment:1 Changed 12 years ago by gigem

Status: newinfoneeded_new

Does the same corruption occur using mplayer with the "-vo vdpau -vc ffmpeg12vdpau" options? If so, it is a VDPAU driver bug.

comment:2 Changed 12 years ago by peper03@…

Even with those options, mplayer plays the file without corruption. The output from mplayer seems a little odd, however:


========================================================================== Forced video codec: ffmpeg12vdpau Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family libavcodec version 53.35.0 (external) Mismatching header version 53.32.2 Selected video codec: [ffmpeg12vdpau] vfm: ffmpeg (FFmpeg MPEG-1/2 (VDPAU)) ========================================================================== Audio: no sound Starting playback... [VD_FFMPEG] XVMC-accelerated MPEG-2. Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. VO: [vdpau] 720x480 => 720x540 MPEG2 VDPAU acceleration [mpegvideo_vdpau @ 0x7fdc07297380]allocate dummy last picture for field based first keyframe


"XVMC-accelerated MPEG-2"?

NVIDIA confirmed they could reproduce the problem with Myth but not with mplayer and would investigate. I've not heard anything more since then (31st January).

comment:3 Changed 12 years ago by gigem

Owner: set to danielk
Status: infoneeded_newassigned

Thanks for checking.

comment:4 Changed 11 years ago by JYA

Owner: changed from danielk to JYA
Status: assignedaccepted
Version 0, edited 11 years ago by JYA (next)

comment:5 Changed 11 years ago by JYA

had forgotten about that one...

comment:6 Changed 11 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: acceptedclosed

In a5b996c06dd73b378b39bbc772183c4abf53e4d7/mythtv:

Migrate vdpau decoding to FFmpeg's new hwaccel API.

This API has changed in FFmpeg 2.x, and the new code would have to be modified.

The most valuable outcome with this change, is that it fixes some occasional mpeg2 video playback corruption

Fixes #11377

comment:7 Changed 11 years ago by Jean-Yves Avenard <jyavenard@…>

In e5e1212f2ba621b613d7aabe261aaebd41da5908/mythtv:

Migrate vdpau decoding to FFmpeg's new hwaccel API.

This API has changed in FFmpeg 2.x, and the new code would have to be modified.

The most valuable outcome with this change, is that it fixes some occasional mpeg2 video playback corruption

Fixes #11377
(cherry picked from commit a5b996c06dd73b378b39bbc772183c4abf53e4d7)

comment:8 Changed 10 years ago by JYA

For the record.

This is a bug in FFmpeg libavformat mpeg demuxer https://trac.ffmpeg.org/ticket/2915 https://trac.ffmpeg.org/ticket/3688

issue can be reproduced with mplayer too when using FFmpeg mpeg demuxer (mplayer uses its own): mplayer -vo vdpau -vc ffmpeg12vdpau -demuxer lavf Ondine_clip.mpg

The fixes provided is just a work around, that appears to only work with nvidia proprietary driver.

comment:9 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 2502f4a3c45b76684d1d37b9b6d39112c3fffd09/mythtv:

Only use VDPAU hwaccel API for mpeg container

The use of VDPAU hwaccel API was an attempt to fix #11377. However, the underlying problem is a FFmpeg libavformat bug (https://trac.ffmpeg.org/ticket/2915).

FFmpeg 1.2's VDPAU hwaccel is clearly unstable. 24fps AVI would play at half that rate, cause crashes with nouveau or visual distortion with AMD

As the aim is only to fix #11377, only enable the hwaccel API for the mpeg container.

Add a "vdpauhwaccel" setting override to completely disable VDPAU hwaccel under all circumstances

Fixes #12162

comment:10 Changed 10 years ago by paulh

Milestone: unknown0.27.2
Note: See TracTickets for help on using tickets.