Monday, July 29, 2024

Re: Enable VA-API in graphics/ffmpeg

On Mon, Jul 29, 2024 at 01:52:51PM GMT, Jan Stary wrote:
> On Jul 21 18:00:28, lucas@sexy.is wrote:
> > On Sun, Jul 21, 2024 at 01:09:24PM GMT, José Maldonado wrote:
> > > This is rare. In my case, using mpv+yt-dlp for YouTube videos work
> > > fine (using 4.4.4p3 and 4.4.4p5).
> >
> > This isn't firefox tho, which is were I do experience issues. My
> > ffmpeg+mpv works fine, even mpv+yt-dlp with your YouTube video.
>
> To be clear: what do you mean by ffmpeg+mpv, as opposed to mpv+ytdlp?
> mpv uses ffmpeg's libavcodec (right?) for software decoding;
> does mpv also use some parts of ffmpeg when hw decoding via vaapi?
>
> If not, then ffmpeg does not enter into it, right?
> If yes, then it would be the same for mpv+ytdlp (right?),
> as yt-dlp is just a downloader.
>
> Sorry if I'm missing something obvious.

I wanted to stress that the problem wasn't the video from YouTube, but
Firefox's playback, as José was talking about the YouTube video but with
mpv playing it.

> > > mpv https://www.youtube.com/watch\?v\=PXFXEGLi3wg
> > > (+) Video --vid=1 (*) (vp9 1920x1080 59.940fps)
> > > (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
> > > Subs --sid=1 --slang=live_chat 'json' (null) (external)
> > > File tags:
> > > Uploader: Edu Camps
> > > Channel_URL: https://www.youtube.com/channel/UCV6dTKLL29jPIggEvjIMPzw
> > > [ffmpeg/video] vp9: No support for codec vp9 profile 0.
> > > AO: [sndio] 44100Hz stereo 2ch s16
> > > VO: [gpu] 1920x1080 yuv420p
> >
> > I don't believe you're doing hardware decoding here. This is how it
> > looks in my machine:
> >
> > (+) Video --vid=1 (*) (vp9 3840x2160 59.940fps)
> > (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
> > Subs --sid=1 --slang=live_chat 'json' (null) (external)
> > File tags:
> > Uploader: Edu Camps
> > Channel_URL: https://www.youtube.com/channel/UCV6dTKLL29jPIggEvjIMPzw
> > Using hardware decoding (vaapi).
> > AO: [sndio] 44100Hz stereo 2ch s16
> > VO: [gpu] 3840x2160 vaapi[nv12]
> >
> > You need both --hwdec=auto in mpv and one of graphics/intel-media-driver
> > or graphics/intel-vaapi-driver for Intel cards, depending on your
> > graphics card. idk what the requirements are for AMD cards.
>
> There is a difference I see between usimg mpv-0.38.0,
> which didn't use vaapi (right?) and mpv-0.38.0p0, which does.
> (My i965 doesn't do vp9, using h264.)

0.38.0 shouldn't use vaapi, as it used the configure flag
-Dvaapi=disabled. Check the commit history for more details.

> $ mpv /media/Brabec/kytice.mkv
> (+) Video --vid=1 (*) (h264 1920x1080 23.999fps)
> (+) Audio --aid=1 --alang=cze (*) (ac3 6ch 48000Hz)
> Using hardware decoding (vaapi-copy).
> AO: [sndio] 48000Hz 5.1(alsa) (5.1) 6ch s16
> VO: [gpu] 1920x1080 nv12
> AV:l00:00:00:/001:23:43:(0%)3A-V:)-0.0180ct:0-0.0650m?25h
> Exiting... (Quit)
>
> $ mpv /media/Brabec/kytice.mkv
> (+) Video --vid=1 (*) (h264 1920x1080 23.999fps)
> (+) Audio --aid=1 --alang=cze (*) (ac3 6ch 48000Hz)
> Using hardware decoding (vaapi).
> AO: [sndio] 48000Hz 5.1(alsa) (5.1) 6ch s16
> VO: [gpu] 1920x1080 vaapi[nv12]
> AV:l00:00:02:/001:23:43:(0%)3A-V:)-0.0010ct:0-0.0820m?25h
> Exiting... (Quit)
>
> What does the "vaapi-copy" stand for?

manpage.

> It seems the old mpv-0.38.0 (i.e. not -p0)
> was using some kinf of vaapi already;
> does mpv carry its own copy?

Own copy of ffmpeg? No:
https://github.com/mpv-player/mpv?tab=readme-ov-file#compilation .

No comments:

Post a Comment