Unsupported streams in VideoComponent

Hi,

MP4 and FLV video is “Unsupported stream”. How to solve this problem?

Unsupported stream

The VideoComponent uses a widget of the OS, IIRC in the case of windows it is ActiveX (or maybe there is a newer technology now). If the streams are not readable, you need to install the decoders on the OS. This cannot be fixed in juce.

If you encounter this writing your own software, you need either to choose a video format that is always supported or you bundle an installer for the missing codecs with your own installer.

For additional tips we would need to know which OS you are targeting and if you have control over the videos, or if it is a general purpose player, in which case you might need to educate the users how to get and install additional codecs.

1 Like

OK, thanks! I want to make a video player with special functions for Raspberry Pi on Linux.

Does VideoComponent work on Linux? When assembling on a PC Linux, I got similar errors:
undefined reference to “juce::VideoComponent::load()”
undefined reference to “juce::VideoComponent::play()”

And on Windows everything built and worked.

I don’t know what backend is used on linux, but maybe installing ffmpeg helps?
I could imagine that v4l is used, but that is guessing.

The Juce demo does not have video support for Linux.

// VideoDemo
#if JUCE_MAC || JUCE_WINDOWS
...
#elif JUCE_IOS || JUCE_ANDROID
...
#elif JUCE_LINUX
 #error "This demo is not supported on Linux!"
#endif

Ah sorry, my bad.
Maybe my video engine foleys_video_engine is an alternative. It uses ffmpeg. I haven’t compiled it in a while especially on Linux though…

1 Like

Thanks! I will try this code.

All clear. The macro in juce_VideoComponent.cpp file disables the code when building on Linux.

#if ! (JUCE_LINUX || JUCE_PROJUCER_LIVE_BUILD)

#if JUCE_MAC || JUCE_IOS
 #include "../native/juce_mac_Video.h"
#elif JUCE_WINDOWS
 #include "../native/juce_win32_Video.h"
#elif JUCE_ANDROID
 #include "../native/juce_android_Video.h"
#endif
...
#endif