Mac VideoComponent blank screen

Our app uses VideoComponent to playback mp4 videos. It works just fine for 99% of our users. But every once in a while we get a user that reports the videos playing back with a blank screen. And by blank I don’t just mean black. It’s invisible, showing the background that’s behind it. It does however play the audio fine.

I’ve tried providing them with any codecs they might be missing in /Library/Quicktime (though I’m not sure if this would matter since the VideoComponent uses AVFoundation now) but that doesn’t seem to work.

Has anyone else experienced this? Does anyone have any theories? I’m drawing a blank (no pun intended).

Hi, I’m having the same problem on Windows, the videoComponent either stays grey or invisible as you described. However it’s perfectly working on Mac. Have you found any solution ? Thanks

We ended up switching to libVLC for unrelated reasons, but no we never did find a solution to this. Sorry.

Ok thanks for your answer. I did not find the solution but it seems that the video is well loaded on MainComponent but can not be displayed on a child component. The VideoComponent stays either grey or invisible.

Do you have any example of libVlc implementation in Juce ? Thanks

On windows the codec matters a lot, but I never found one that really works, it’s mostly glitchy, if you got better luck, let me know

This discussion would be a good starting point from a code perspective.

If you run into any snags (I ran into a lot) I’m happy to help with specifics here.

Or you can do what I did and hire the guys at VideoLabs on a consulting basis to help get things set up and integrated. This was their first time doing a JUCE integration, but they did an excellent job, and now that they know how to integrate libVLC in JUCE, could probably help you even quicker.

Thank you for replying. Indeed, I followed the discussion which is very interesting. I was able to get and modify the code to create a Juce VLCComponent and it compiles well. I only needed to remove exceptions that are not considered anymore in the player apparently.

I’m sure I’m not that far, the problem now is that there is no link to libVlc_API (VS LNK2019 error) in the header file libvlc_media_player.h.

I guess it is a missing link to the library, however I have no clue about how to fix this.

Does anyone can help me with that ?

I also contacted VideoLabs guys but still waiting for an answer. I’d like to solve this by myself with some help if possible :wink:

Thanks,

There are several libvlc assets you need:

Compiling

  • libvlc.lib: place this anywhere and in Projucer add its path to the Visual Studio “External Libraries to Link” section
  • The “vlc” folder containing all of the libvlc header files: place anywhere and in Visual Studio go into your project’s properties → VC++ Directories → Include Directories and add the path to its parent folder here

Runtime

  • libvlc.dll: Place in the same directory as your executable and libvlc will find it automatically
  • libvlccore.dll: same
  • the libvlc “plugins” folder: same
1 Like