Unsupported stream and h264

Hi everyone,

i am currently developing a video player application for mac and windows making use of the VideoComponent. All our video files use the h264 codec (i read this is a very common one). On MacOS everything works fine, but on Windows I get the message “unsupported stream”. Looking around here in the forum i realized i am not the only person who has that problem or similar ones. I don’t fully comprehend the cause for this problem (i am an audio person, no a video guy), but it appears to me that JUCE uses Windows APIs to playback video files and that for some reason this does not work with h264 files.
I installed k-lite (a bundle of codecs for windows) which solved the problem. But unfortunatly on the long run this is not an option for us, since we don’t want to make our customers install third party software. Using a different codec for our files is also not a valid option, since this would mean converting hundreds (or maybe thousands) of video files.

My questions now are:

Is there a realistic chance that this gets fixed in future versions of JUCE?

Did anyone find out a workaround to enable playback of h264 using JUCE’s VideoComponent on windows?

Would it be realistic (for an audio guy) to write something myself? (or is this simply insane?)

Can anyone point me to more information about this topic?

Thanks
Clemens

This won’t be handled by JUCE. All they do is wrapping a OS player widget into JUCE.
h264 is a pretty standard codec, so I am surprised it is not included in the default installation.

The only options you have is indeed add a FAQ for the users they have to install the codec if they don’t have them already or bundle an installer with your product that adds the option to install the codec.

There is a setting in windows media player to automatically download codecs:

Resolution

To resolve this problem, configure Windows Media Player to download codecs automatically. To do so, follow these steps in Windows Media Player 11:

  1. On the Tools menu, select Options .
  2. Select the Player tab, select the Download codecs automatically check box, and then select OK .
  3. Try to play the file.

If you’re prompted to install the codec, select Install . If you still can’t play the file correctly, try the steps in the Advanced troubleshooting section. If you aren’t comfortable with advanced troubleshooting, ask someone for help, or contact Microsoft Support.

It is insane. Wrapping a codec is already quite a task, I did that with my foleys_video_engine. Writing a codec is even more work.

Good luck

1 Like

Hi Daniel,

thanks for your in depth answer!

The thing is: Windows Media Player can playback the files! So the codec is actually installed! So the problem must be somewhere else.

I will try to sum up what we’ve found out:

  • We know that JUCE wraps OS capabilities in order to play back video files
  • I think Windows provides to approaches for media playback: the first is Direct Show (older/outdated) and the second is “Windows Media Foundation” (current).
  • Unfortunatly JUCE uses Direct Show.
  • Windows Media Player uses Windows Media Foundation, therefore it can playback h264 files.

So my question to the JUCE developers: is it realistic to hope, that JUCE provides playback via Windows Media Foundation in the near furture? I feel i am not the only person struggling with this. There are several threads in this forum that seem to be somewhat related (some are really old). To me this feels like something pretty basic just does not work in JUCE as expected. Of course it would be the nicest solution if this gets fixed. But i can imagine, tha this is just not a priority for the JUCE Team.

Has someone already tried to modify the Video Component so it uses Windows Media Foundation? Maybe someone found a solution but never mentioned it in the forums.

Are there any suggestions for a workaround?

Again: installing third party stuff is not an option. Converting all of our files neither :frowning:

Clemens

Add you vote to this FR: AudioFormatReader - AAC - MP4 Reader For Windows