MPV e perdita sincronia audio/video

Postate qui per tutte le discussioni legate a Linux in generale.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Gnu/Linux in genere, se l'argomento è specifico alla Slackware usate uno dei forum Slackware o Slackware64.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3789
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: MPV e perdita sincronia audio/video

Messaggio da joe »

Sì viene settata in bash profile a livello di sistema:

Codice: Seleziona tutto

# cat /etc/profile.d/vdpau.sh
#!/bin/sh

# Disable debugging output of the vdpau backend
export VDPAU_LOG=0

# Use the vdpau backend of the nvidia binary driver
#export VDPAU_DRIVER="nvidia"

# Use the vdpau backend of the nouveau driver
export VDPAU_DRIVER="nouveau"

# Use the vdpau backend of the r300 driver
#export VDPAU_DRIVER="r300"

# Use the vdpau backend of the r600 driver
#export VDPAU_DRIVER="r600"

# Use the vdpau backend of the radeonsi driver
#export VDPAU_DRIVER="radeonsi"

# Use the va-api/opengl backend
#export VDPAU_DRIVER="va_gl"
Ora è impostata a "nouveau" mentre prima coi driver proprietari era decommentata solo la riga "nvidia".
Invfatti ad esempio da utente semplice:

Codice: Seleziona tutto

$ echo $VDPAU_DRIVER
nouveau
E metto qua sotto l'out di vdpauinfo, è un po' lungo ma va be'...

Codice: Seleziona tutto

$ vdpauinfo
display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420     8192  8192  NV12 YV12
422     8192  8192  UYVY YUYV
444     8192  8192  Y8U8V8A8 V8U8Y8A8
420_16  8192  8192
422_16  8192  8192
444_16  8192  8192

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0  8192  2048  2048
MPEG2_SIMPLE                    3  8192  2048  2048
MPEG2_MAIN                      3  8192  2048  2048
H264_BASELINE                  41  8192  2048  2048
H264_MAIN                      41  8192  2048  2048
H264_HIGH                      41  8192  2048  2048
VC1_SIMPLE                      1  8190  2048  2048
VC1_MAIN                        2  8190  2048  2048
VC1_ADVANCED                    4  8190  2048  2048
MPEG4_PART2_SP                  3  8192  2048  2048
MPEG4_PART2_ASP                 5  8192  2048  2048
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE      41  8192  2048  2048
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
VP9_PROFILE_0                  --- not supported ---
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                  --- not supported ---
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---
HEVC_MAIN_444_10               --- not supported ---
HEVC_MAIN_444_12               --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8
R8G8B8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8
R10G10B10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8
B10G10R10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8

Bitmap surface:

name              width height
------------------------------
B8G8R8A8          8192  8192
R8G8B8A8          8192  8192
R10G10B10A2       8192  8192
B10G10R10A2       8192  8192
A8                8192  8192

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     2048
VIDEO_SURFACE_HEIGHT             y        48     2048
CHROMA_TYPE                      y
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y
CSC_MATRIX                       y
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y
LUMA_KEY_MAX_LUMA                y

rik70
Iper Master
Iper Master
Messaggi: 2489
Iscritto il: gio 10 mar 2011, 9:21
Slackware: 15.0
Kernel: 5.15.x-generic
Desktop: Sway
Distribuzione: Arch Linux

Re: MPV e perdita sincronia audio/video

Messaggio da rik70 »

E va bene.

Codice: Seleziona tutto

vainfo
restituisce qualcosa di utile?

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3789
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: MPV e perdita sincronia audio/video

Messaggio da joe »

Codice: Seleziona tutto

$ vainfo
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Mesa Gallium driver 21.3.5 for NVA8
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
Qualcosa bolle in pentola, ma stando al sito nouveau sembrerebbe che per la mia scheda si debba passare per VDPAU, comunque non son sicuro di aver capito bene.
In ogni caso lì c'è il codename della mia scheda NVA8 (Geforce 210, GT218), che fa parte della famiglia NV50 (Tesla):
https://nouveau.freedesktop.org/CodeNames.html#NV50

Poi seguendo questa falsariga il codename NVA8 appare in questa pagina:
https://nouveau.freedesktop.org/VideoAcceleration.html
VP4.0: NVA3-NVA8, NVAF (GeForce 200, 300 series; corresponds to VDPAU feature set C)

In particolare quindi dovrebbero essere supportate le specifiche VP4 con le dovute note e con l'installazione del firmware esterno (proprietario nvidia https://slackbuilds.org/repository/15.0 ... -firmware/ ).

Codice: Seleziona tutto

        XvMC 	             VDPAU / VA-API(6)           Firmware
       MPEG1/2   MPEG1/2     H.264  	VC-1 	MPEG-4 	
VP4.0 	N/A1 	 DONE 	   DONE(4) 	DONE 	DONE 	  EXTFW
4 H.264 videos of movie trailers often end up rendering with some artifacts. Never seen in an actual movie though.
6 VA-API support is introduced in Mesa 11.2. Note that due to a shortcoming in VA-API itself, MPEG-4 can't be properly supported. To enable a hacky workaround, set VAAPI_MPEG4_ENABLED=true in the environment.
Il problema come sempre è il riscontro pratico: per testare la funzionalità VP4: https://nouveau.freedesktop.org/VP4.html
lì suggeriscono questo test:

Codice: Seleziona tutto

mplayer -vo vdpau -vc ffmpeg12vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau, <file>
Testando il comando col solito video del tutorial git, salta fuori parecchia roba, dice "system too slow" ecc, dopodiché inizia a perdere secondi di sincronia ben peggio che nelle prove precedenti con mpv e driver closed.
Soprattutto premendo "q" per interrompere, si è bloccato tutto, è rimasto solo il cursore del mouse con facoltà di movimento. Ho povato ctrl+alt+F2 ctrl+alt+ecc ecc anche ctrlaltcanc, ma niente alla fine ho dovuto premere l'hard reset elettrico per riavviare.

rik70
Iper Master
Iper Master
Messaggi: 2489
Iscritto il: gio 10 mar 2011, 9:21
Slackware: 15.0
Kernel: 5.15.x-generic
Desktop: Sway
Distribuzione: Arch Linux

Re: MPV e perdita sincronia audio/video

Messaggio da rik70 »

La tua scheda se rientra nella famiglia VP4.0 dovrebbe supportare vaapi dalle mesa 11.2 e l'output lo conferma.

Prova a vedere se salta fuori con mpv --hwdec=help

Nel caso prova a usarlo al posto di vdpau

Se però il sistema va in blocco c'è poco da fare.

Assicurati che l'accelerazione 3d sia attiva - vedi glxinfo, etc

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3789
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: MPV e perdita sincronia audio/video

Messaggio da joe »

Sì sì salta fuori ma poi non funziona.. Almeno nella prova che avevo fatto ieri sera, s'era bloccato tutto e anche lì avevo dovuto staccare la spina.
Spetta che incollo tutto a futura memoria.

Codice: Seleziona tutto

$ mpv -hwdec=help
Valid values (with alternative full names):
  vaapi (h263-vaapi)
  vaapi (h263p-vaapi)
  vaapi (h264-vaapi)
  vaapi (hevc-vaapi)
  vaapi (mjpeg-vaapi)
  vaapi (mpeg2video-vaapi)
  vaapi (mpeg4-vaapi)
  vaapi (vc1-vaapi)
  vaapi (vp8-vaapi)
  vaapi (vp9-vaapi)
  vaapi (wmv3-vaapi)
  vaapi (av1-vaapi)
  vdpau (h263-vdpau)
  vdpau (h263p-vdpau)
  vdpau (h264-vdpau)
  vdpau (hevc-vdpau)
  vdpau (mpeg1video-vdpau)
  vdpau (mpeg2video-vdpau)
  vdpau (mpeg4-vdpau)
  vdpau (vc1-vdpau)
  vdpau (vp9-vdpau)
  vdpau (wmv3-vdpau)
  vaapi-copy (h263-vaapi-copy)
  vaapi-copy (h263p-vaapi-copy)
  vaapi-copy (h264-vaapi-copy)
  vaapi-copy (hevc-vaapi-copy)
  vaapi-copy (mjpeg-vaapi-copy)
  vaapi-copy (mpeg2video-vaapi-copy)
  vaapi-copy (mpeg4-vaapi-copy)
  vaapi-copy (vc1-vaapi-copy)
  vaapi-copy (vp8-vaapi-copy)
  vaapi-copy (vp9-vaapi-copy)
  vaapi-copy (wmv3-vaapi-copy)
  vaapi-copy (av1-vaapi-copy)
  vdpau-copy (h263-vdpau-copy)
  vdpau-copy (h263p-vdpau-copy)
  vdpau-copy (h264-vdpau-copy)
  vdpau-copy (hevc-vdpau-copy)
  vdpau-copy (mpeg1video-vdpau-copy)
  vdpau-copy (mpeg2video-vdpau-copy)
  vdpau-copy (mpeg4-vdpau-copy)
  vdpau-copy (vc1-vdpau-copy)
  vdpau-copy (vp9-vdpau-copy)
  vdpau-copy (wmv3-vdpau-copy)
  v4l2m2m-copy (h263_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (h264_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (hevc_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (mpeg4_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (mpeg1_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (mpeg2_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (vc1_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (vp8_v4l2m2m-v4l2m2m-copy)
  v4l2m2m-copy (vp9_v4l2m2m-v4l2m2m-copy)
  auto (yes '')
  no
  auto-safe
  auto-copy
  auto-copy-safe
Caspita quanta roba... Fammi provare il -vo=help

Codice: Seleziona tutto

$ mpv -vo=help
Available video outputs:
  libmpv           render API for libmpv
  gpu              Shader-based GPU Renderer
  vdpau            VDPAU with X11
  wlshm            Wayland SHM video output (software scaling)
  xv               X11/Xv
  vaapi            VA API with X11
  x11              X11 (software scaling)
  null             Null video output
  image            Write video frames to image files
  tct              true-color terminals
  caca             libcaca
  drm              Direct Rendering Manager (software scaling)
Bo, e ora cosa andrebbe selezionato per testare l'accelerazione hardware?
Chi lo sa...
Cosa mettere in -vo= e in -hwdec= ???

L'accelerazione 3d attiva, In glxinfo c'è "direct rendering" mi pare...
Allego l'output in un file perché non finisce più..
Allegati
glxinfo.txt
(113.79 KiB) Scaricato 67 volte

rik70
Iper Master
Iper Master
Messaggi: 2489
Iscritto il: gio 10 mar 2011, 9:21
Slackware: 15.0
Kernel: 5.15.x-generic
Desktop: Sway
Distribuzione: Arch Linux

Re: MPV e perdita sincronia audio/video

Messaggio da rik70 »

joe ha scritto:
sab 28 mag 2022, 20:52
Cosa mettere in -vo= e in -hwdec= ???
Per testare vaapi --hwdec=vaapi. L'uscita video dovrebbe essere gpu(default) oppure vaapi.
vaapy-copy dovrebbe essere per le GPU integrate.

Ma se hai già provato e si blocca il sistema, torna a nvidia e lascia perdere.

Rispondi