Display mp4 video in Vision

I need to display mp4 videos in a Vision client. I don’t see a control in Vision that allows me to do that, so I thought I’d be clever and create a Perspective view to display the videos, and then use a web browser control in Vision to display the view. When I launch the view in my browser, I can see the videos just fine. When I run the Vision project and attempt to display the videos using the Perspective view, the view loads but the videos will not display. I get an error that says “Error Loading Media: File not valid”. The videos that I am attempting to display are stored on a web server, and I’m using Ignition 8.1.7. Any help would be appreciated. Thanks.

The web view component, based on JXBrowser, is limited in what video codecs it supports. I don’t think mp4 is one of them. See this table; I think only the codecs in the Chromium column are supported.

Unfortunately I don’t understand how the technology passes through the layers that I’ve built, but the video player in the Perspective view does actually display the mp4 when just displayed in a browser. What you’re saying is that the web browser control in Vision can not display the mp4, even though the Perspective view that it points to can?

Google, Microsoft, Mozilla, etc… have all paid a large sum of money to MPEG LA (or whoever else) for an unlimited use license to distribute support for these video codecs in their browsers.

The Vision web browser component (and consequently Perspective Workstation), being based on JXBrowser, which is based on Chromium, not Chrome, does not include a license for any of these codecs, and therefore will not be able to play videos encoded with them.

I guess that’s my answer then. So the video player component in Perspective is otherwise licensed? Are there any other options for displaying an mp4 in Vision?

Perspective's video component doesn't have the license - your browser does.

I don't think there's anything available from IA to make this work, but maybe a 3rd party module author? I think @mazeyrat maybe had some kind of module that relied on VLC to play video streams?

got it, that makes sense. thanks for helping out.

Yes, we have a component for vision only.
We finally not using VLC, but a pure java H264 decoder with rtsp and ptz onvif support.
It is restricted to H264 low and main profil and need a powerfull CPU.
For vision a component based on VLCJ could certainly be an interesting alternative

The easiest answer for me was to convert my videos to a different format that would play in Ignition. I just used the web browser control in HTML mode, and bound (part of) the HTML to a dropdown list that contained a list of videos to choose from. Works like a charm.

2 Likes