Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Compatibility #246

Closed
thx4ever opened this issue Apr 28, 2023 · 10 comments
Closed

[Feature Request] Compatibility #246

thx4ever opened this issue Apr 28, 2023 · 10 comments

Comments

@thx4ever
Copy link

Hi, its possible to add compatibility with Media Server Studio plugins again? I can see load_plugins options but it doesnt work without intel GPU since ffmpeg version 4.5 in software mode using libmfxsw64.dll and 2fca99749fdb49aeb121a5b63ef568f7 (mfxplugin64_hevce_sw.dll), why with ffmpeg 4.5 it works but in this newer ffmpeg versions 5 or 6 it doesnt?
Until now i can only use software mode wihthout intel GPU, but i have plans to buy Intel ARC A380 graphics card
My build have libmfx and libvpl
My ffmpeg command line options:

ffmpeg -v verbose -hide_banner -i C:\Users\Administrator\Desktop\Source2.264 -c:v hevc_qsv -pix_fmt nv12 -load_plugin hevc_sw -profile:v main -preset:v veryslow -bsf:v hevc_metadata=transfer_characteristics=1:colour_primaries=1:video_full_range_flag=0:matrix_coefficients=1 -b:v 2500k C:\Users\Administrator\Desktop\teste.hevc

This message i get when try to use ffmpeg above version 4.5
[hevc_qsv @ 000001AA94A52A00] Error initializing a MFX session: unsupported (-3)
[vost#0:0/hevc_qsv @ 000001AA94A48080] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.

Regards

@nyanmisaka
Copy link

nyanmisaka commented Apr 28, 2023

AFAIK the Media SDK is discontinued and its plugins are no longer supported and required by oneVPL.

So you have to build FFmpeg with --enable-libmfx instead of --enable-libvpl to get plugin support on legacy platforms.

@thx4ever
Copy link
Author

thx4ever commented Apr 28, 2023

I have now enabled --enable libmfx but it always show error -3, its possible to add support to use software mode libmfxsw64.dll use?
Any command line options or something? Because it doesnt allow software mode currently?

@xhaihao
Copy link
Contributor

xhaihao commented May 4, 2023

@thx4ever There isn't a tag for version 4.5 in http://git.videolan.org/?p=ffmpeg.git;a=tags, are you using an official version ?

@nyanmisaka
Copy link

I think he is referring to the n4.5-dev tag, which is a branch point after 4.4 release.

@xhaihao
Copy link
Contributor

xhaihao commented May 5, 2023

@nyanmisaka thanks for the comment.

@thx4ever I'm sorry I don't have the environment to try libmfxsw64.dll, could you help to try FFmpeg 5.0 (which doesn't support oneVPL, we shouldn't change too much for QSV) ?

@thx4ever
Copy link
Author

thx4ever commented May 5, 2023

Yes i did test it it show error -3 because i dont have a Intel GFX or GPU installed, but it works fine without it on ffmpeg 4.5 old version, since i dont have a intel GPU it doesnt work in old version ffmpeg 4.5 it doesnt matter it load libmfxsw64.dll and works

@xhaihao
Copy link
Contributor

xhaihao commented May 6, 2023

@thx4ever could you try intel-media-ci/ffmpeg#649 ?

@thx4ever
Copy link
Author

thx4ever commented May 6, 2023

OK i will try and report back

@thx4ever
Copy link
Author

thx4ever commented May 6, 2023

It works now
[h264 @ 000001F3CF28CB40] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 000001F3D13BA5C0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:24000/1001 sar:1/1
[auto_scale_0 @ 000001F3D13B79C0] w:iw h:ih flags:'' interl:0
[format @ 000001F3D13B91C0] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 000001F3D13B79C0] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1920 h:1080 fmt:p010le sar:1/1 flags:0x00000004
[hevc_qsv @ 000001F3CF28BF40] Encoder: input is system memory surface
[hevc_qsv @ 000001F3CF28BF40] Use Intel(R) Media SDK to create MFX session, the required implementation version is 1.1
[hevc_qsv @ 000001F3CF28BF40] Error initializing a MFX session: unsupported (-3)
[hevc_qsv @ 000001F3CF28BF40] The current impl is not supported, try next impl.
[hevc_qsv @ 000001F3CF28BF40] Use Intel(R) Media SDK to create MFX session, the required implementation version is 1.1
[hevc_qsv @ 000001F3CF28BF40] Initialized an internal MFX session using software implementation
[hevc_qsv @ 000001F3CF28BF40] Using the constant quantization parameter (CQP) ratecontrol method
[hevc_qsv @ 000001F3CF28BF40] profile: hevc main10; level: 40
[hevc_qsv @ 000001F3CF28BF40] GopPicSize: 0; GopRefDist: 8; GopOptFlag:; IdrInterval: 1
[hevc_qsv @ 000001F3CF28BF40] TargetUsage: 1; RateControlMethod: CQP
[hevc_qsv @ 000001F3CF28BF40] QPI: 18; QPP: 23; QPB: 30
[hevc_qsv @ 000001F3CF28BF40] NumSlice: 1; NumRefFrame: 4
[hevc_qsv @ 000001F3CF28BF40] RateDistortionOpt: unknown
[hevc_qsv @ 000001F3CF28BF40] RecoveryPointSEI: unknown
[hevc_qsv @ 000001F3CF28BF40] VDENC: unknown
[hevc_qsv @ 000001F3CF28BF40] NalHrdConformance: unknown; VuiNalHrdParameters: unknown
[hevc_qsv @ 000001F3CF28BF40] FrameRateExtD: 1001; FrameRateExtN: 24000
[hevc_qsv @ 000001F3CF28BF40] IntRefType: 0; IntRefCycleSize: 0; IntRefQPDelta: 0
[hevc_qsv @ 000001F3CF28BF40] MaxFrameSize: 0; MaxSliceSize: 0
[hevc_qsv @ 000001F3CF28BF40] BitrateLimit: unknown; MBBRC: ON; ExtBRC: unknown
[hevc_qsv @ 000001F3CF28BF40] Trellis: auto
[hevc_qsv @ 000001F3CF28BF40] RepeatPPS: unknown; NumMbPerSlice: 0; LookAheadDS: unknown
[hevc_qsv @ 000001F3CF28BF40] AdaptiveI: OFF; AdaptiveB: unknown; BRefType:auto
[hevc_qsv @ 000001F3CF28BF40] MinQPI: 0; MaxQPI: 0; MinQPP: 0; MaxQPP: 0; MinQPB: 0; MaxQPB: 0
[hevc_qsv @ 000001F3CF28BF40] DisableDeblockingIdc: 0
[hevc_qsv @ 000001F3CF28BF40] SkipFrame: no_skip
[hevc_qsv @ 000001F3CF28BF40] PRefType: default
[hevc_qsv @ 000001F3CF28BF40] GPB: OFF
[hevc_qsv @ 000001F3CF28BF40] TransformSkip: unknown
[hevc_qsv @ 000001F3CF28BF40] IntRefCycleDist: 0
[hevc_qsv @ 000001F3CF28BF40] LowDelayBRC: unknown
[hevc_qsv @ 000001F3CF28BF40] MaxFrameSizeI: 0; MaxFrameSizeP: 0
[hevc_qsv @ 000001F3CF28BF40] ScenarioInfo: 0
[hevc_qsv @ 000001F3CF28BF40] NumTileColumns: 1; NumTileRows: 1
Output #0, hevc, to 'C:\teste.hevc':

xhaihao added a commit to xhaihao/ffmpeg-1 that referenced this issue May 15, 2023
…sion on Windows

The mfx implementation based on D3D11 is expected for an internal
session on Windows, however sometimes this implemntation is not
supported [1]. A fallback to the default mfx implementation is added in
this patch.

[1] intel/cartwheel-ffmpeg#246

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
xhaihao added a commit to xhaihao/ffmpeg-1 that referenced this issue May 23, 2023
…sion on Windows

The mfx implementation based on D3D11 is expected for an internal
session on Windows, however sometimes this implemntation is not
supported [1]. A fallback to the default mfx implementation is added in
this patch.

[1] intel/cartwheel-ffmpeg#246

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
BtbN pushed a commit to FFmpeg/FFmpeg that referenced this issue May 25, 2023
…sion on Windows

The mfx implementation based on D3D11 is expected for an internal
session on Windows, however sometimes this implemntation is not
supported [1]. A fallback to the default mfx implementation is added in
this patch.

[1] intel/cartwheel-ffmpeg#246

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
@xhaihao
Copy link
Contributor

xhaihao commented May 25, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants