[FFmpeg-devel] [PATCH] AV1 VDPAU hwaccel Decode support

Manoj Bonda mbonda at nvidia.com
Tue Jun 21 05:45:21 EEST 2022


Hi Philip, 

The issue seems to be from MPV side rather than from ffmpeg patch. 
I was able to decode the clip Halo_AV1 properly bitmatching with nvcuvid output 
with ffmpeg + VDPAU. 

Please find the cmds I used to verify the same. 

./ffmpeg  -hwaccel vdpau  -i /home/bondamanoj/VideoClips/AV1Clips/Halo_AV1.mp4 -y decoded_vdpau.yuv
./ffmpeg  -hwaccel nvdec -i  /home/bondamanoj/VideoClips/AV1Clips/Halo_AV1.mp4   decoded_nvcuvid.yuv
cmp decoded_vdpau.yuv ~/Downloads/ffmpeg-git2/FFmpeg/decoded_nvcuvid.yuv

The same clip is dumped using mpv via cmd 
./mpv  --hwdec=vdpau-copy --o=Halo_dump_av1.yuv  --of=rawvideo /home/bondamanoj/VideoClips/AV1Clips/Halo_AV1.mp4

Is differing and is having corruption while playing. 


Thanks,
ManojGupta.

> -----Original Message-----
> From: Philip Langdale <philipl at overt.org>
> Sent: Thursday, May 19, 2022 10:25 PM
> To: Manoj Bonda <mbonda at nvidia.com>
> Cc: Andy Ritger <ARitger at nvidia.com>; Aaron Plattner
> <aplattner at nvidia.com>; Mandar Godse <mgodse at nvidia.com>; Ashish Roy
> <AROY at nvidia.com>; Hardy Doelfel <hdoelfel at nvidia.com>
> Subject: Re: [FFmpeg-devel] [PATCH] AV1 VDPAU hwaccel Decode support
> 
> External email: Use caution opening links or attachments
> 
> 
> On Thu, 19 May 2022 09:01:26 +0000
> Manoj Bonda <mbonda at nvidia.com> wrote:
> 
> > Hi Philip,
> >
> > As mentioned earlier I am getting output matching with nvcuvid for
> > VDPAU While using ffmpeg.
> > With MPV I am not seeing issue with below cmd ./mpv --vo=vdpau
> > --hwdec=vdpau
> > /home/bondamanoj/VideoClips/AV1Clips/Chimera-AV1-8bit-1280x720-
> 3363kbp
> > s.ivf
> >
> > I am getting mpv failures with --vo=opengl or --vo=gpu and not
> > decoding the clip. Can you please share us the cmds and the clip used
> > by you where you saw corruption. So I can debug and fix the issue.
> 
> Ok, it seems weird.
> 
> I've been using youtube clips, so here's one from their original AV1 playlist
> (The Halo Infinite announce trailer):
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> youtube.com%2Fwatch%3Fv%3DFmdb-
> KmlzD8&data=05%7C01%7Cmbonda%40nvidia.com%7Cf69926f451734
> 86cf2f208da39b8430d%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0
> %7C637885760832069373%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%
> 7C%7C&sdata=Kw2mXnUdaupPhwBq13MCCiciZo6alDqTpM6sh88TMtg%
> 3D&reserved=0
> 
> You then need yt-dlp installed.
> 
> If you tell mpv to play the URL directly, it will use yt-dlp to stream it, and it
> appears to play just fine.
> 
> However, if you use yt-dlp to download the stream to either mp4 or mkv, and
> then play that back, the playback is glitched.
> 
> With nvdec, it plays fine either way.
> 
> Minimum Command line:
> 
> mpv --no-config --hwdec=vdpau --gpu-context=x11 <file or url>
> 
> And switch vdpau for nvdec to compare the two.
> 
> Hope that helps,
> 
> --phil


More information about the ffmpeg-devel mailing list