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

Plugin crashes VLC (green picture) on playing next udp multicast stream #58

Open
popy2k14 opened this issue Sep 26, 2019 · 18 comments
Open
Labels
C-bug Category: bug E-OS-windows Environment: OS: windows E-VLC-B-64 Environment: VLC bitness: 64 bit E-VLC-V-3.0 Environment: VLC version: 3.0 R-upstream-bug Resolution: upstream bug S-reproduced Status: reproduced

Comments

@popy2k14
Copy link

popy2k14 commented Sep 26, 2019

Self-troubleshooting
Software

OS: Windows 10 x64 Build 1903 with all Updates
VLC version: 3.0.8 & 3.0.7.1
VLC bitness: 64
Plugin version: 2.1.0 (latest)
Plugin bitness: 64

Issue description

With plugin activated:
I am opening VLC and load an playlist.m3u (see attachment).
This playlist just has some udp multicast streams in it.
The first plays well, but when i am pressing "next" at the bottom,
the stream loads somehow and audio is working, but the picture is just green!

With plugin deactivated:
All is working like it should.

Can you please look into the issue?
Is there anything i can help, logs...?
`
thx

playlist.zip

@nurupo
Copy link
Owner

nurupo commented Sep 28, 2019

Which OS is that? You kept the "Windows / Linux / macOS" placeholder text.

@popy2k14
Copy link
Author

Sorry, added the info in the OP.

@nurupo
Copy link
Owner

nurupo commented Sep 30, 2019

Ok, will test it later this week.

Can't think of why it would make the picture green off the top of my head.
Does the same happen when you use spacebar to pause/play?

@nurupo
Copy link
Owner

nurupo commented Oct 1, 2019

Does the same happen when you use spacebar to pause/play?

Sorry, missed that you don't even pause, you just go to the next item in the playlist.

I have tried to reproduce the issue, but I'm unable to connect to the 239.200.199.x addresses in the playlist. These are multicast addresses, they are accessible to you due to the services you use. I don't have any multicast services, so VLC simply fails to connect to them. So I'm unable to reproduce the issue.

@nurupo nurupo added E-OS-windows Environment: OS: windows S-cannot-reproduce Status: cannot reproduce S-help-wanted Status: help wanted C-bug Category: bug E-VLC-B-64 Environment: VLC bitness: 64 bit E-VLC-V-2.1 Environment: VLC version: 2.1 E-VLC-V-3.0 Environment: VLC version: 3.0 and removed E-VLC-V-2.1 Environment: VLC version: 2.1 labels Dec 15, 2019
@anmiles
Copy link

anmiles commented Dec 23, 2019

Hi @nurupo I ran into the same problem recently and it keeps reproduced for several days.
Here is the only scenario how can I reproduce this problem:

  1. Add several videos to the playlist
  2. Play first video
  3. Wait until player switches to another video
  4. See green screen but audio is still ok.

So this cannot be reproduced when just playing a video or pause/play it.
It 100% reproduced when player switches to next video in the playlist.
Also toggling checkbox "Pause/Play video on mouse click" in [Advanced -> Video -> Filters] affects this. Problems is not reproduced when checkbox is off but is exists when checkbox is on.

Here is my configuration:

  • Windows 10 x64 version 1909
  • VLC 3.0.8
  • Plugin vlc-3.0-64bit-win.zip

Also I reinstalled VLC, downloaded the plugin again from releases page and copied dll file to video_filter again. Nothing helped.

@nurupo
Copy link
Owner

nurupo commented Dec 23, 2019

Also I reinstalled VLC, downloaded the plugin again from releases page and copied dll file to video_filter again. Nothing helped.

Could you try manually deleting the whole %AppData%\vlc directory too? It's possible that the VLC uninstaller could keep VLC settings in there just in case you would install it back later.

@nurupo
Copy link
Owner

nurupo commented Dec 23, 2019

Just to make it clear, in your reproduction steps, you never clicked on the video image to pause it? You can add several videos in the playlist, play the first one, not touch mouse and keyboard, and it's still reproducible?

Also, do you have any non-default settings set? Like a different video output module or any extra video filters you are enabling?

@nurupo
Copy link
Owner

nurupo commented Dec 23, 2019

Also, could you provide the logs of your reproduction? Someone has pointed out that it could be a decoding issue of sorts, which could appear in the logs.

vlc.exe -vv --logfile=c:\vlclog.txt

@anmiles
Copy link

anmiles commented Dec 23, 2019

@nurupo
I tried with clicking the video image and without doing this. In both cases I saw green screen once VLC switched to next video.
Also I tried to reset all settings, then setup the plugin as described in documentation. The problem is still reproduced.
But I noticed that not all the videos can reproduce this. I tried a lot of videos, some of them work, some not. Don't know why - maybe depend of how they encoded or so.
https://www.dropbox.com/sh/o8xcrrruacr2l37/AAC6FUVAYpqM19oq1ZPD4f7ha?dl=0 - here are link on a shared dropbox folder that contains two videos - I managed to always reproduce the problem with those 2 videos. Here is how I recently reproduced:

  1. Install fresh VLC player with resetting preferences
  2. Follow instructions to install the plugin
  3. Restart VLC
  4. Add two videos ("domovenok_1", "domovenok_2" to the playlist)
  5. Double-click first video on playlist
  6. Wait until it finished
  7. Then VLC started second video and shown me green screen. Video is going but nothing shown but just a green frame.

Also I tried to not wait in the step "6" but just scroll to the very end of the video. The same result: video finished and new video started - and nothing but green frame. So it doesn't depend whether I interact with any controls with mouse/keyboard.

Here are logs. I used the same videos that I attached above. I enabled log file in advanced preferences. Every time I renamed log file and let new log file be created.

With pauseclick - green screen (scrolled to the end and wait for switch to the next video)
With pauseclick - green screen (didn't do anything, just waited until first video ended and next video started)
Without pauseclick - ok

@nurupo
Copy link
Owner

nurupo commented Jan 13, 2020

Couldn't reproduce with the provided video files and I don't see anything suspicious in the logs. Have no idea why your are having this issue.

Logs say that VLC is using d3d11va hardware decoder module and Nvidia drivers - it could be something related to those, but that's just a guess. My system has only Sandy Bridge Intel integrated graphics and it doesn't support d3d11, so when I use VLC it uses something different for hardware decoding, which might be why I don't have the issue.

@nurupo
Copy link
Owner

nurupo commented Jan 15, 2020

Good news: reproduced on someone else's computer. Couldn't debug it, but there are a couple of workarounds I have figured out with some trial and error:

  1. Disable hardware acceleration.
    That's under Tools -> Preferences -> (Simple) -> Input/Codecs -> Hardware-accelerated decoding

    Changing the hardware acceleration to something other than d3d11 might work too - it fixed the green screen for me but the plugin stopped working for some reason, but maybe it will continue working for you?

  2. Enable d3d11_filters video filters.
    Go to Tools -> Preferences -> (All) -> Video -> Filters and look for filters with "D3D11" in name. I think there are 2 of them, both enabling the same d3d11_filters plugin, so it's enough to tick any one of them, or both.

    For some reason d3d11_filters shows up in the module list even if it's disabled, but explicitly enabling them makes it show up twice (and also doubles the GPU usage...) - once before the plugin and then once after it, which for some reason fixes the issue.

Use just one workaround, using both doesn't make sense (I don't think you can even use d3d11_filters with the hardware acceleration disabled).

@nurupo
Copy link
Owner

nurupo commented Jan 15, 2020

The bug must me somewhere outside the plugin, in VLC or its dependencies, given how even a simple no-op video filter plugin causes this:

#include <vlc_common.h>
#include <vlc_filter.h>
#include <vlc_plugin.h>

static int Create(vlc_object_t *);
static void Destroy(vlc_object_t *);

vlc_module_begin()
    set_description("Noop video filter")
    set_shortname("Noop video filter")
    set_capability("video filter", 0)
    set_category(CAT_VIDEO)
    set_subcategory(SUBCAT_VIDEO_VFILTER)
    set_callbacks(Create, Destroy)
vlc_module_end()

static picture_t *filter(filter_t *p_filter, picture_t *p_pic_in)
{
    // don't alter picture
    return p_pic_in;
}

static int Create(vlc_object_t *p_this)
{
    filter_t *p_filter = (filter_t *)p_this;
    p_filter->pf_video_filter = filter;
    return VLC_SUCCESS;
}

static void Destroy(vlc_object_t *p_this)
{
}

I have poked developers on IRC, will see what they say.

Ideally I'd open a bug report, but I can't as they require to provide logs and I don't have access to the computer that reproduces this to provide them. Even if I did get the logs, VLC developers would likely suggest to try changing some settings in VLC and see if that helps, which I can't do without having access to the computer that reproduces this.

Perhaps one of you could file a bug report instead? If you do, it would be better if you do so using the noop video filter the code of which I have posted above, as it triggers the same bug with less code. Here are dlls for it:

It shows up as "Noop video filter" under video filters.

@nurupo
Copy link
Owner

nurupo commented Jan 17, 2020

Mentioned the workarounds in README's Troubleshooting section.

@nurupo nurupo removed the S-cannot-reproduce Status: cannot reproduce label Feb 10, 2020
@mikeloeven

This comment has been minimized.

@AcidUser85

This comment has been minimized.

@nurupo nurupo added the R-upstream-bug Resolution: upstream bug label Aug 27, 2020
Repository owner locked as too heated and limited conversation to collaborators Aug 27, 2020
@nurupo
Copy link
Owner

nurupo commented Aug 27, 2020

Closing comments as the discussion of this issue has been exhausted.

I have asked earlier that if you are able to reproduce this bug -- file a bug report with VLC, as it appears to be a bug in VLC rather than the plugin, and I'm unable to reproduce it with my Intel iGPU, so I won't be able to provide any logs or anything like that if I file the bug report myself. As far as I know, so far no one has filed a bug report with VLC. Since no one seems to be willing to help fix this bug, I have filed the bug report myself just now https://trac.videolan.org/vlc/ticket/25057.

@nurupo nurupo pinned this issue Aug 31, 2020
@nurupo nurupo unpinned this issue Aug 31, 2020
Repository owner unlocked this conversation Sep 12, 2022
@nurupo
Copy link
Owner

nurupo commented Sep 29, 2022

An update.

I became an owner of an Nvidia GPU recently, so I was able to reproduce the bug. From my testing, there are a few things I have observed:

  • This bug appears to be triggered by interlaced videos. The first interlaced video will play just fine, but any interlaced video after that will have this green picture bug.
  • It is a bug in VLC, not vlc-pause-click-plugin, as even the built-in "FPS conversion video filter" triggers the bug.

I have shared my findings and logs with the VLC team, hopefully they can pin down the bug and fix it.

I implemented a workaround for the bug (at the cost of a slight efficiency loss), allowing vlc-pause-click-plugin to work with interlaced videos without turning them green. I intended to use that workaround until the VLC team properly fixes the bug, at which point I would remove the workaround, but the workaround triggered yet another bug with interlaced videos, so my workaround can't be used until VLC fixes that second bug.

Scrapping the workaround, I implemented a compromise: disable vlc-pause-click-plugin on interlaced videos on Windows -- this would prevent VLC from breaking itself with the green picture. Alas, this compromise implementation was foiled by how VLC detects interlaced videos -- if you play an interlaced video, no matter if the next video is interlaced or not, VLC will treat is as interlaced for 30 seconds, at which point it will change its mind if it is, in fact, not interlaced. So vlc-pause-click-plugin ends up being disabled for the first 30 seconds of a progressive, i.e. non-interlaced, video, that is played after an interlaced video, and then it gets enabled after those 30 seconds end, which is quite a jarring user experience, so this compromise was also scrapped.

I'm out of ideas on how this bug can be addressed on the plugin level. These are bugs in VLC and need to be addressed on the VLC level. So we will have to wait on the VLC team to fix the mentioned bugs until there is anything we can do.

@nurupo nurupo added S-reproduced Status: reproduced S-on-hold Status: on hold and removed S-help-wanted Status: help wanted labels Sep 29, 2022
@nurupo
Copy link
Owner

nurupo commented Oct 6, 2022

The bug appears to be fixed in the nightly VLC 4.0, unable to reproduce the bug using that version. Sadly, it's unlikely that it will get fixed in VLC 3.0.

@nurupo nurupo removed the S-on-hold Status: on hold label Nov 24, 2022
nurupo added a commit that referenced this issue Nov 28, 2022
The workaround resulted in another VLC bug being triggered:
https://code.videolan.org/videolan/vlc/-/issues/27360

See the discussion in:
#58 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug E-OS-windows Environment: OS: windows E-VLC-B-64 Environment: VLC bitness: 64 bit E-VLC-V-3.0 Environment: VLC version: 3.0 R-upstream-bug Resolution: upstream bug S-reproduced Status: reproduced
Projects
None yet
Development

No branches or pull requests

5 participants