Discussion:
[MPlayer-users] va-api with mplayer on skylake: FATAL: Could not initialize video filters (-vf) or video output (-vo)
Marc MERLIN
2016-03-10 01:45:37 UTC
Permalink
Howdy,

I have va-api working with mplayer on some videos (mp4) and not others:

I use this in my config file:
vo=vdpau,gl,
[vo.vdpau]
vc=ffh264vdpau,ffmpeg12vdpau,ffodivxvdpau,ffwmv3vdpau,ffvc1vdpau,
# Most video filters do not work with vdpau.
vf-clr=yes


vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.6.2
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD


mplayer a file with problems says:

mplayer -v outputs:
us/frame: 40000 (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames total: 116038 initial: 0
streams: 2
Suggested BufferSize: 0
Size: 352 x 288
==========================
list_end=0x10F4
==> Found video stream: 0
[aviheader] Video stream found, -vid 0
====== STREAM Header =====
Type: vids FCC: divx (78766964)
Flags: 0
Priority: 0 Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0 Len: 116038
Suggested BufferSize: 21018
Quality 10000
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======
biSize 40
biWidth 352
biHeight 288
biPlanes 1
biBitCount 24
biCompression 808802372='DX50'
biSizeImage 608256
===========================
Regenerating keyframe table for MPEG-4 video.
list_end=0x2186
==> Found audio stream: 1
[aviheader] Audio stream found, -aid 1
====== STREAM Header =====
Type: auds FCC: (0)
Flags: 0
Priority: 0 Language: 0
InitialFrames: 1
Rate: 15963/1 = 15963.000
Start: 0 Len: 74090988
Suggested BufferSize: 7981
Quality -1
Sample size: 1
==========================
Found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 15963
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=417
mp3.nFramesPerBlock=1
mp3.nCodecDelay=1393
==========================================================================
list_end=0x2292
AVI: dmlh found (size=248) (total_frames=116038)
list_end=0x2B56F2D6
Found movie at 0x280C - 0x2B56F2D6
Reading INDEX block, 232063 chunks for 116038 frames (fpos=727118558).
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x1F3A)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=651042469 (116038) audio size=74090988 (74090988)
VIDEO: [DX50] 352x288 24bpp 25.000 fps 1122.1 kbps (137.0 kbyte/s)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
[V] filefmt:3 fourcc:0x30355844 size:352x288 fps:25.000 ftime:=0.0400
Load subtitles in ./
get_path('sub/') -> '/home/merlin/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 3840x2160 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting doesn't honour any X atoms
pci id for fd 7: 8086:191b, driver (null)
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
==========================================================================
Forced video codec: ffh264vdpau
Forced video codec: ffmpeg12vdpau
Forced video codec: ffodivxvdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 55.68.100 (internal)
Configuration: --enable-gpl --enable-postproc
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] VDPAU accelerated decoding
[ffmpeg] aspect_ratio: 0.000000
VDec: vo config request - 352 x 288 (preferred colorspace: MPEG-4 Part 2 VDPAU acceleration)
Trying filter chain: vo
[VS] error (vdpDecoderCreate): decoder VDP_DECODER_PROFILE_MPEG4_PART2_ASP not implemented
[vdpau] Failed creating VDPAU decoder: VDP_STATUS_INVALID_DECODER_PROFILE
[VS] error (vdpDecoderCreate): decoder VDP_DECODER_PROFILE_MPEG4_PART2_ASP not implemented
[vdpau] Failed creating VDPAU decoder: VDP_STATUS_INVALID_DECODER_PROFILE
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[ffmpeg] aspect_ratio: 0.000000
INFO: libavcodec init OK!
Selected video codec: [ffodivxvdpau] vfm: ffmpeg (FFmpeg MPEG-4,DIVX-4/5 (VDPAU))
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
dec_audio: Allocating 4096 bytes for input buffer.
dec_audio: Allocating 9216 + 131072 = 140288 bytes for output buffer.
AUDIO: 44100 Hz, 2 ch, s16le, 127.7 kbit/9.05% (ratio: 15963->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying preferred audio driver 'pulse', options '[none]'
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: PulseAudio audio output
AO: Author: Lennart Poettering
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
Increasing filtered audio buffer size from 0 to 46144
XXX initial v_pts=0.000 a_pos=7981 (0.500)

FATAL: Could not initialize video filters (-vf) or video output (-vo).

Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
Carl Eugen Hoyos
2016-03-10 18:19:37 UTC
Permalink
Post by Marc MERLIN
vo=vdpau,gl,
[vo.vdpau]
vc=ffh264vdpau,ffmpeg12vdpau,ffodivxvdpau,ffwmv3vdpau,ffvc1vdpau,
# Most video filters do not work with vdpau.
vf-clr=yes
vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.6.2
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
I wish I'd understand your mail:
The subject mentions va-api which isn't supported
by MPlayer, your config file correctly references VDPAU
(supported by MPlayer).
You call vainfo instead of vdpauinfo but it tells you
that your hardware / driver combination cannot decode
asp. So you cannot hardware-accelerate decoding of
DX50 (the file you tested it on).

Nvidia hardware (and binary drivers) are able to
decoder asp here.

Sorry, Carl Eugen
Marc MERLIN
2016-03-10 18:44:38 UTC
Permalink
Post by Carl Eugen Hoyos
Post by Marc MERLIN
vo=vdpau,gl,
[vo.vdpau]
vc=ffh264vdpau,ffmpeg12vdpau,ffodivxvdpau,ffwmv3vdpau,ffvc1vdpau,
# Most video filters do not work with vdpau.
vf-clr=yes
vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.6.2
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
The subject mentions va-api which isn't supported
by MPlayer, your config file correctly references VDPAU
(supported by MPlayer).
Sorry for the confusion there, I thought I had to run the intel tool,
but I see vdpauinfo also works on intel (output pasted below)
Post by Carl Eugen Hoyos
You call vainfo instead of vdpauinfo but it tells you
that your hardware / driver combination cannot decode
asp. So you cannot hardware-accelerate decoding of
DX50 (the file you tested it on).
Which is fine.
Post by Carl Eugen Hoyos
Nvidia hardware (and binary drivers) are able to
decoder asp here.
Will not rely on binary drivers, so I'm not using nvidia.

So my question was unclear: how do I configure mplayer to continue
playing with -vo gl if -vo vdpau fails?
I understand I can't hardware decode everything, I just wanted it to
fall back to gl by itself instead of dying.

Makes sense?

Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
Marc MERLIN
2016-03-10 18:46:16 UTC
Permalink
Post by Marc MERLIN
Sorry for the confusion there, I thought I had to run the intel tool,
but I see vdpauinfo also works on intel (output pasted below)
forgot the paste, although I understand ultimately it's not relevant to
my question, but giving it anyway

display: :0.0 screen: 0
pci id for fd 5: 8086:191b, driver (null)
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
API version: 1
Information string: OpenGL/VAAPI/libswscale backend for VDPAU

Video surface:

name width height types
-------------------------------------------
420 1920 1080 NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
422 1920 1080 NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
444 1920 1080 NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8

Decoder capabilities:

name level macbs width height
----------------------------------------------------
MPEG1 --- not supported ---
MPEG2_SIMPLE --- not supported ---
MPEG2_MAIN --- not supported ---
H264_BASELINE 51 16384 2048 2048
H264_MAIN 51 16384 2048 2048
H264_HIGH 51 16384 2048 2048
VC1_SIMPLE --- not supported ---
VC1_MAIN --- not supported ---
VC1_ADVANCED --- not supported ---
MPEG4_PART2_SP --- not supported ---
MPEG4_PART2_ASP --- not supported ---
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 --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- 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 ---

Output surface:

name width height nat types
----------------------------------------------------
B8G8R8A8 0 0 -
R8G8B8A8 0 0 -
R10G10B10A2 0 0 -
B10G10R10A2 0 0 -
A8 0 0 -

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 -
DEINTERLACE_TEMPORAL_SPATIAL -
INVERSE_TELECINE -
NOISE_REDUCTION -
SHARPNESS -
LUMA_KEY -
HIGH QUALITY SCALING - L1 -
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 -
VIDEO_SURFACE_HEIGHT -
CHROMA_TYPE -
LAYERS -

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

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
Carl Eugen Hoyos
2016-03-10 19:15:00 UTC
Permalink
Post by Marc MERLIN
[vo.vdpau]
vc=ffh264vdpau,ffmpeg12vdpau,ffodivxvdpau,ffwmv3vdpau,ffvc1vdpau,
Please remove the (unsupported) ffodivxvdpau from this list.

Carl Eugen
Marc MERLIN
2016-03-11 01:00:56 UTC
Permalink
Post by Carl Eugen Hoyos
Post by Marc MERLIN
[vo.vdpau]
vc=ffh264vdpau,ffmpeg12vdpau,ffodivxvdpau,ffwmv3vdpau,ffvc1vdpau,
Please remove the (unsupported) ffodivxvdpau from this list.
Ah right, of course, that makes sense now, thanks.

Yes, it does the right thing if I only have:
vo=vdpau,gl,
[vo.vdpau]
vc=ffh264vdpau,
# Most video filters do not work with vdpau.
vf-clr=yes


Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
Loading...