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

Unable to play this AVC video format (black screen with audio) #105

Closed
molitar opened this issue Nov 18, 2023 · 26 comments
Closed

Unable to play this AVC video format (black screen with audio) #105

molitar opened this issue Nov 18, 2023 · 26 comments

Comments

@molitar
Copy link

molitar commented Nov 18, 2023

Unable to play this video type in mkv container. Standard custom renderer plays video fine but this one has black screen.

ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L4
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 16 frames
Muxing mode : Header stripping
Codec ID : V_MPEG4/ISO/AVC
Duration : 29 min 14 s
Bit rate : 862 kb/s
Width : 712 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.105
Stream size : 180 MiB (68%)
Writing library : x264 core 152 r2851 ba24899
Encoding settings : cabac=1 / ref=16 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=10 / psy=1 / psy_rd=0.60:0.20 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=17.0 / qcomp=0.70 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.10
Default : Yes
Forced : No
Color range : Limited
Matrix coefficients : BT.470 System B/G

Any suggestions? This is the second video file like this I have not been able to play and had to switch to default video renderer.

@Aleksoid1978
Copy link
Owner

Upload file.

@v0lt
Copy link
Collaborator

v0lt commented Nov 18, 2023

I don't confirm. I will also not provide information about the hardware, system, player and renderer versions.

@clsid2
Copy link
Contributor

clsid2 commented Nov 18, 2023

Mention your GPU and driver version.

Probably P010 issue with video processor?

@molitar
Copy link
Author

molitar commented Nov 18, 2023

Here is the video file I have not been able to play. Warning: It is adult content.
https://www.mediafire.com/file/iedlx325p29ps0y/Slaves_To_Passion_-_01_%255BCal%255D.mkv/file

Radeon RX 5600XT
Driver: 23.11.1

Windows 10 64 bit 20H2
Dolby Atmos Audio
32 GB Ram
MPC 2.1.1

@Aleksoid1978
Copy link
Owner

Enable statistics in renderer, make screenshot and upload here.

@Aleksoid1978
Copy link
Owner

99.9% - a bug in the driver, uncheck P010 and check what happens.

@Aleksoid1978
Copy link
Owner

I checked your file - everything works fine.

@molitar
Copy link
Author

molitar commented Nov 19, 2023

99.9% - a bug in the driver, uncheck P010 and check what happens.

OK did uncheck that and sure enough got video so looks like your right a bug in the driver for that video processor.
Statilstics p10 enabled
statistics p10 disabled

@v0lt
Copy link
Collaborator

v0lt commented Nov 19, 2023

Please take a screenshot of the DXVA Checker of the Processor Device > D3D11 > Processor Caps tab. So that the InputFormat and OutputFormat fields are visible.
Example: https://ibb.co/8P5v4DH

@clsid2
Copy link
Contributor

clsid2 commented Nov 19, 2023

Also test the swap effect setting.

@molitar
Copy link
Author

molitar commented Nov 20, 2023

Swap Effect flip or discard did not make any difference only the p010. I did two DXVA checkers one with p10 unchecked and the second with it p010 enabled.

P010 disabled
Screenshot_1

P010 enabled
Screenshot_2

@v0lt
Copy link
Collaborator

v0lt commented Nov 20, 2023

Thank you.
Try leaving the default settings again (to enable P010/P016), and set Texture format to 8-bit Integer. It might also work, check it out.

@molitar
Copy link
Author

molitar commented Nov 20, 2023

Thank you. Try leaving the default settings again (to enable P010/P016), and set Texture format to 8-bit Integer. It might also work, check it out.

Ok tried that and it is interesting that worked even when my monitor is actually set to 10-bit so the 10 bit integer does not work at all. Is this a bug in this release?

@clsid2
Copy link
Contributor

clsid2 commented Nov 21, 2023

Does 16-bit work?

Maybe v0lt can make a debug build to figure out what goes wrong.

Another idea: add a new line to the OSD that is shown only whenever an anomaly has occurred during the processing. Such as some of the if (FAILED(hr)) situations.

#define ANOMALY_A 1
#define ANOMALY_B 2
#define ANOMALY_C 4
#define ANOMALY_D 8
int anomalies = 0;
if (FAILED(hr)) {anomalies |= ANOMALY_A;}

Then we can see better what goes wrong even with release builds.

@molitar
Copy link
Author

molitar commented Nov 21, 2023

Does 16-bit work?

Maybe v0lt can make a debug build to figure out what goes wrong.

Another idea: add a new line to the OSD that is shown only whenever an anomaly has occurred during the processing. Such as some of the if (FAILED(hr)) situations.

#define ANOMALY_A 1
#define ANOMALY_B 2
#define ANOMALY_C 4
#define ANOMALY_D 8
int anomalies = 0;
if (FAILED(hr)) {anomalies |= ANOMALY_A;}

Then we can see better what goes wrong even with release builds.

16 bit same result black screen.

@v0lt
Copy link
Collaborator

v0lt commented Nov 22, 2023

You can use the Debug version. First run DebugView, then play the video file when you have a black screen instead of a frame. Show the resulting log file.

@v0lt
Copy link
Collaborator

v0lt commented Nov 22, 2023

mpcvr-0.7.0.2155_d3d11vp_p010-rgb10_test1_Debug.zip
Please check with default settings.

@molitar
Copy link
Author

molitar commented Nov 23, 2023

mpcvr-0.7.0.2155_d3d11vp_p010-rgb10_test1_Debug.zip Please check with default settings.

This one works great only had to turn off the HDR auto switching to stop the black screen before playing back. I tested 8-bit, 10-bit, and 16-bit only also and they all worked. So default settings except the auto enable HDR since monitor is already set to HDR maybe that is why it blanks out to a black screen when it manually enables it.

@v0lt
Copy link
Collaborator

v0lt commented Nov 23, 2023

mpcvr-0.7.0.2155_d3d11vp_p010-rgb10_test2_Debug
There was a bug in the first version, it was fixed.

@molitar
Copy link
Author

molitar commented Nov 23, 2023

mpcvr-0.7.0.2155_d3d11vp_p010-rgb10_test2_Debug There was a bug in the first version, it was fixed.

Actually first version works better. The first version the change from use always or do not use for HDR took effect immediately. New version requires me to exit and restart MPC and a couple of times took 2 tries to get it to change.

The only way HDR seems to work is using full screen for HDR because that screen going entire black like monitor is losing signal for a few seconds is just a pain. Since HDR is always on for my system I just turn that to always off to stop the full black screen.

@v0lt
Copy link
Collaborator

v0lt commented Nov 23, 2023

There was no mention of any HDR video or displays in the first post.

I suggest testing on this - https://www.koi-sama.net/files/hi10/

@molitar
Copy link
Author

molitar commented Nov 23, 2023

There was no mention of any HDR video or displays in the first post.

I suggest testing on this - https://www.koi-sama.net/files/hi10/

No I just meant that the default should just have that turned off because when it's set to auto to seems to always turn it on nobody what your playing. Maybe you want to set default to be only on when going full screen but when viewing in a window it re-initializes the entire monitor making it go black for a few seconds.

So since my monitor is set to HDR I turn that setting to always off or full screen display only.

Second problem is the new debug 2 no longer takes effect when changing setting unless I restart MPC-HC before it took effect immediately on restarting the video.

@v0lt
Copy link
Collaborator

v0lt commented Nov 23, 2023

I don’t understand whether the problem with playing 10-bit AVC videos on AMD video cards has been resolved or not.
We are not talking about support for HDR displays right now.

@clsid2
Copy link
Contributor

clsid2 commented Nov 23, 2023

He said the problem was fixed.

I have submitted a PR for improving the Auto Display HDR switch option.

@molitar
Copy link
Author

molitar commented Nov 23, 2023

There was no mention of any HDR video or displays in the first post.

I suggest testing on this - https://www.koi-sama.net/files/hi10/

Ok for you the problem is debug version 2 actually has a worst bug.. did not see the bug in debug version 1. That is that the HDR switch options do not take effect unless I completely restart mpc-hc player. First version and release version does not have this problem.

Both debug versions fixed playing in Auto 8/10 bit, 8-bit, 10-bit, and 16-bit so that problem is resolved by the debug.

@molitar
Copy link
Author

molitar commented Nov 23, 2023

He said the problem was fixed.

I have submitted a PR for improving the Auto Display HDR switch option.

Ok Great ;)

v0lt added a commit that referenced this issue Nov 24, 2023
… на некоторых адаптерах AMD. Проверяем возможность преобразования форматов до инициализации ID3D11VideoProcessor.

Касается Issues #94 и #105.
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

4 participants