Opened 5 years ago
Last modified 4 years ago
#8036 new defect
avcodec_open2 with h264_qsv fails with "Internal error - this should not happen" on Windows 10
| Reported by: | Patrick Weber | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | git-master | Keywords: | qsv |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug: Using version 4.1.4 source built with both NVIDIA and Intel (MFX) libraries on a Windows 10 OS, when using the codec named h264_qsv: avcodec_open2 fails with "Internal error - this should not happen." Sample code attached.
How to reproduce:
encodingFormat = AV_PIX_FMT_QSV;
codec = avcodec_find_encoder_by_name ("h264_qsv");
avFrame = av_frame_alloc ();
encodingContext = avcodec_alloc_context3 (codec);
avFrame->format = encodingFormat;
avFrame->width = width;
avFrame->height = height;
swsContext = sws_getContext (width, height, framePixFormat, width, height, encodingFormat, SWS_BICUBIC, 0, 0, 0);
encodingContext->width = width;
encodingContext->height = height;
encodingContext->time_base = av_make_q (1, framesPerSecond);
encodingContext->bit_rate = bitRate;
encodingContext->gop_size = 30;
encodingContext->max_b_frames = 4;
encodingContext->pix_fmt = encodingFormat;
Other options:
zerolatency=1
slice-max-size=20000
ps=30000
threads=4
cabac=0
max_nal_size=30000
allow_skip_frames=1
slice_mode=dyn
preset=veryfast
profile=main
Now call avcdec_open2:
errNum = avcodec_open2 (encodingContext, codec, nullptr);
Results: "Internal Error - this should not happen".
ffmpeg version 4.1.4
built on Windows 10
Attachments (2)
Change History (3)
by , 5 years ago
| Attachment: | FFMpegEncodingAPI.cpp added |
|---|
comment:1 by , 4 years ago
| Keywords: | qsv added; API h264_qsv avcodec_open2 MSX removed |
|---|---|
| Version: | 4.1 → git-master |
There is no release support on this bug tracker: Is the issue reproducible with current FFmpeg git head?
Note:
See TracTickets
for help on using tickets.



Sample source code.