Opened 6 years ago

Last modified 20 months ago

#6827 reopened defect

Intel QSV: "Failed to create Direct3D device" on Core i7-7700K (Skylake) on Windows 10

Reported by: bubbleguuum Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg used: v3.4 64-bit Windows build from zeranoe: https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20171109-723b6ba-win64-static.zip

Attempting to use qsv hwaccel on a Skylake CPU with an Intel GPU recognized by dxdiag and connected to the monitor (see attached dxdiag report for details on the system and the igpu) systematically fails when dxv2 hwaccel creates a D3D device for the igpu.
Note that this system also has a second D3D device (AMD RX 480), but I cannot see how it would get in the way, as ffmpeg (by default) tries to initialize the primary device.

forcing the hardware device (adding to command line below: -init_hw_device dxva2=intel:0 -init_hw_device qsv@intel) does not fix it and the error is the same

Looking at the code (libavutil/hwcontext_dxva2.c),
function IDirect3D9Ex_CreateDeviceEx() is failing and the fallback IDirect3D9_CreateDevice() as well. Unfortunately there is no way to log the error code returned by these function, for having a hint about the failure.

Given the igpu is listed in dxdiag, there is no obvious reason why it is failing. Maybe the arguments passed to these functions are incorrect for this igpu.

Note that on a very different system (Intel Atom x5-z8350, which has an integrated intel GPU and supports qsv), ffmpeg has no problem creating the D3D9 device.

How to reproduce:

% ffmpeg -y -async 1 -seekable 0 -v verbose -c:v h264_qsv -hwaccel qsv -fflags +genpts -i http://bubblesoftapps.com/bubbleupnpserver/transcode_test/tos_sample_h264.mkv -map 0:0 -c:0 h264_qsv -profile:v high -level 4.1 -b:v 8000k -f matroska NUL

ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[h264 @ 000002640fea3800] Reinit context to 1920x800, pix_fmt: yuv420p
Input #0, matroska,webm, from 'http://bubblesoftapps.com/bubbleupnpserver/transcode_test/tos_sample_h264.mkv':
  Metadata:
    COMPATIBLE_BRANDS: mp42isomavc1
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 0
    ENCODER         : Lavf57.72.101
  Duration: 00:00:02.00, start: 0.000000, bitrate: 1359 kb/s
    Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 1920x800 [SAR 1:1 DAR 12:5], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
    Metadata:
      ENCODER         : Lavc57.93.100 libx264
      DURATION        : 00:00:02.000000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
[AVHWDeviceContext @ 000002641041c6c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041ce40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cb40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cc00] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c420] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c900] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cd20] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c240] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cd80] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cde0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c000] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c1e0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c420] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041cea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c300] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c2a0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c3c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c000] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c060] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c480] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c3c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c3c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c420] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c6c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c600] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8c60] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8f00] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9080] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8e40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8d80] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8c60] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8c00] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c6c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8c60] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c3c0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002641041c480] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ba0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8cc0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8cc0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8cc0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8ea0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8cc0] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea8b40] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Operation not permitted
[AVHWDeviceContext @ 000002640fea9200] Failed to create Direct3D device
Error creating a QSV device
qsv hwaccel requested for input stream #0:0, but cannot be initialized.
[h264_qsv @ 000002640fea4ca0] Too many errors when draining, this is a bug. Stop draining and force EOF.
Error while decoding stream #0:0: Internal bug, should not have happened
No more output streams to write to, finishing.
Finishing stream 0:0 without any data written to it.
[graph 0 input from stream 0:0 @ 000002640ff77240] w:1920 h:800 pixfmt:yuv420p tb:1/1000 fr:24/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 000002640fed6dc0] w:iw h:ih flags:'bicubic' interl:0
[format @ 000002640ff7bd40] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scaler_0 @ 000002640fed6dc0] w:1920 h:800 fmt:yuv420p sar:1/1 -> w:1920 h:800 fmt:nv12 sar:1/1 flags:0x4
[h264_qsv @ 000002640ffe00a0] No device available for encoder (device type qsv for codec h264_qsv).
[h264_qsv @ 000002640ffe00a0] Initialized an internal MFX session using hardware accelerated implementation
[h264_qsv @ 000002640ffe00a0] Using the VBR with lookahead (LA) ratecontrol method
[h264_qsv @ 000002640ffe00a0] profile: high; level: 40
[h264_qsv @ 000002640ffe00a0] GopPicSize: 250; GopRefDist: 4; GopOptFlag: closed ; IdrInterval: 0
[h264_qsv @ 000002640ffe00a0] TargetUsage: 4; RateControlMethod: LA
[h264_qsv @ 000002640ffe00a0] TargetKbps: 8000; LookAheadDepth: 40
[h264_qsv @ 000002640ffe00a0] NumSlice: 1; NumRefFrame: 2
[h264_qsv @ 000002640ffe00a0] RateDistortionOpt: OFF
[h264_qsv @ 000002640ffe00a0] RecoveryPointSEI: OFF IntRefType: 0; IntRefCycleSize: 0; IntRefQPDelta: 0
[h264_qsv @ 000002640ffe00a0] MaxFrameSize: 576000; MaxSliceSize: 0; 
[h264_qsv @ 000002640ffe00a0] BitrateLimit: ON; MBBRC: OFF; ExtBRC: OFF
[h264_qsv @ 000002640ffe00a0] Trellis: auto
[h264_qsv @ 000002640ffe00a0] RepeatPPS: ON; NumMbPerSlice: 0; LookAheadDS: 2x
[h264_qsv @ 000002640ffe00a0] AdaptiveI: unknown; AdaptiveB: unknown; BRefType: off
[h264_qsv @ 000002640ffe00a0] MinQPI: 0; MaxQPI: 0; MinQPP: 0; MaxQPP: 0; MinQPB: 0; MaxQPB: 0
[h264_qsv @ 000002640ffe00a0] Entropy coding: CABAC; MaxDecFrameBuffering: 2
[h264_qsv @ 000002640ffe00a0] NalHrdConformance: OFF; SingleSeiNalUnit: ON; VuiVclHrdParameters: OFF VuiNalHrdParameters: OFF
Output #0, matroska, to 'pipe:':
  Metadata:
    COMPATIBLE_BRANDS: mp42isomavc1
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 0
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (h264_qsv), 1 reference frame (H264 / 0x34363248), nv12(left), 1920x800 [SAR 1:1 DAR 12:5], q=2-31, 8000 kb/s, 24 fps, 1k tbn, 24 tbc (default)
    Metadata:
      DURATION        : 00:00:02.000000000
      encoder         : Lavc57.107.100 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 0/0/8000000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (http://bubblesoftapps.com/bubbleupnpserver/transcode_test/tos_sample_h264.mkv):
  Input stream #0:0 (video): 48 packets read (338524 bytes); 0 frames decoded; 
  Total: 48 packets (338524 bytes) demuxed
Output file #0 (pipe:):
  Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes); 
  Total: 0 packets (0 bytes) muxed
Conversion failed!

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

DxDiag_7700K.txt (13.3 KB ) - added by bubbleguuum 6 years ago.

Download all attachments as: .zip

Change History (8)

by bubbleguuum, 6 years ago

Attachment: DxDiag_7700K.txt added

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: avutilundetermined
Version: unspecified

Is the issue also reproducible with current FFmpeg git head?

comment:2 by bubbleguuum, 6 years ago

I cannot test FFmpeg git myself since I do not own the system for which this issue was reported. It was reported to me by a user of a software I work on, that makes use of QSV.

However, since the last potentially relevant commit in hwcontext_dxva2.c is from May 17th 2017, I doubt the git head version would change anything. I can ask that user to test and report, if necessary.

comment:3 by Carl Eugen Hoyos, 6 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen this ticket of you can test current FFmpeg git head.

comment:4 by bubbleguuum, 6 years ago

It also happens with lZeranoe's latest FFmpeg build as of today. But I really do not feel like opening a new bug report. Let's bury that issue instead and pretend it does not exist:

ffmpeg version N-88668-g723b6baaf8 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      56.  0.100 / 56.  0.100
  libavcodec     58.  1.100 / 58.  1.100
  libavformat    58.  2.100 / 58.  2.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  0.101 /  7.  0.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[h264 @ 000001f51819e080] Reinit context to 1920x800, pix_fmt: yuv420p
Input #0, matroska,webm, from 'http://bubblesoftapps.com/bubbleupnpserver/transcode_test/tos_sample_h264.mkv':
  Metadata:
    COMPATIBLE_BRANDS: mp42isomavc1
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 0
    ENCODER         : Lavf57.72.101
  Duration: 00:00:02.00, start: 0.000000, bitrate: 1359 kb/s
    Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 1920x800 [SAR 1:1 DAR 12:5], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
    Metadata:
      ENCODER         : Lavc57.93.100 libx264
      DURATION        : 00:00:02.000000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
[AVHWDeviceContext @ 000001f518a140e0] Failed to create Direct3D device
Error creating a QSV device
...
repeated zillions times.

comment:5 by Carl Eugen Hoyos, 6 years ago

Resolution: needs_more_info
Status: closedreopened

comment:6 by bubbleguuum, 6 years ago

I finally found the cause of the failure:

The log trace in the bug report was from ffmpeg.exe spawn from a Windows service.
D3D is not available from a Windows service and require the program to be launched from an interactive user session:

https://support.microsoft.com/en-us/help/978635/direct3d-9-is-not-supported-in-the-context-of-a-windows-service
http://xboxforums.create.msdn.com/forums/t/1711.aspx

This is really unfortunate and I cannot see an easy workaround (except that to not use a Windows service), but ffmpeg is not the cause of the problem.

Maybe it would useful to log error codes of IDirect3D9Ex_CreateDeviceEx() and IDirect3D9Ex_CreateDevice(), to make this special failure case easier to identify.

comment:7 by Balling, 20 months ago

Does it still not logging error codes?

Note: See TracTickets for help on using tickets.