Momentarily Black Screen on Resolution Change

This forum is about all development around libVLC.
Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Momentarily Black Screen on Resolution Change

Postby Moriquendi » 28 Jan 2019 09:05

Hello forum,

I have an udp input source and the resolution of the input may change due to the quality of the stream. For instance, by default the stream is 1080p but sometimes the quality of connection decreases, so the input resolution can decrease either to 720p or 480p. In this case, VLC 2.2.8 crashes a lot, but with VLC 3.0+ (testing with 3.0.4 now) this problem is fixed. However, every time VLC adjusts to the resolution change, there occurs a momentarily black screen (less than 1 second). I wonder if there is a workaround for this. I want the resolution changes to be smooth. For instance, when we change the resolution for a Youtube video, we dont see any black screen but the quality of the video only. I am open to any suggestions.

Regards.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: Momentarily Black Screen on Resolution Change

Postby mfkl » 31 Jan 2019 06:33

Logs please.
https://mfkl.github.io

Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Re: Momentarily Black Screen on Resolution Change

Postby Moriquendi » 01 Feb 2019 13:20

Hey mfkl,

You can check out the logs from this link. (Pastebin.com was unavailable)

https://justpaste.it/73zbu

I checked the logs and noticed that at line 1110, "avcodec" module is being restarted due to input format change. This may explain the momentarily black screen maybe? But is there a way to achieve resolution transition without restarting the vout module?

Regards.

Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Re: Momentarily Black Screen on Resolution Change

Postby Moriquendi » 08 Feb 2019 15:04

Hi there,

Further testing showed that only OpenGL video output (NOT the Windows one) doesn't show momentarily black screen if the resolution of the input source changes. One thing I've noticed in the VLC logs is that only OpenGL module doesn't release the scene and recreate a new one. This may be the reason for the black screen, right? Anyway, so I removed libdirect3d9_plugin.dll, libdirect3d11_plugin.dll and libglwin32_plugin.dll so that my embedded VLC media player uses OpenGL module.

1st problem is that the video is now somehow zoomed in and showed partially. It sort of needs "Always fit window" action. I tried passing "--autoscale" and "--qt-video-autoresize" arguments to libvlc_new without success.
2nd problem is; the video flickers. Every now and then (every 2-3 seconds), a frame is skipped or something.

Here is my OpenGL logs:
https://justpaste.it/1usdv

Once again, my goal is to have a video with smooth transition during resolution changes (just like youtube, no resizing the canvas or experiencing black frames etc.). Any help would be appreciated.

Regards.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 19 guests