# Need to play a video clip from webapps, not a live stream

**URL:** <https://forum.inductiveautomation.com/t/need-to-play-a-video-clip-from-webapps-not-a-live-stream/6298>\
**Category:** Ignition\
**Created:** [April 22, 2013, 7:47pm UTC](https://forum.inductiveautomation.com/t/need-to-play-a-video-clip-from-webapps-not-a-live-stream/6298 "2013-04-22T19:47:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![billmorone](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@billmorone](https://forum.inductiveautomation.com/u/billmorone)\
**Post date:** [April 22, 2013, 7:47pm UTC](https://forum.inductiveautomation.com/t/need-to-play-a-video-clip-from-webapps-not-a-live-stream/6298/1 "2013-04-22T19:47:03Z")

</div>

I need to play video clips (training/instructional). I have neen trying to get the mjpeg component to play a video from webapps main with no success thus far. I do not know if this will work.

I see this topic, it is locked:  
[viewtopic.php?f=70&t=9751&start=0&st=0&sk=t&sd=a&hilit=video](http://www.inductiveautomation.com/forum/viewtopic.php?f=70&t=9751&start=0&st=0&sk=t&sd=a&hilit=video)

Is this the way Inductive Automation recommends to display video clips from a webapps resource directory, install VLC media player?

If this is the way is there a more clear list of instructions, Has anyone done this?  
Should I create my own component?

What is the (Ignition) recommended way to move forward in playing video from a (local) file for me?

Thanks

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [April 22, 2013, 8:02pm UTC](https://forum.inductiveautomation.com/t/need-to-play-a-video-clip-from-webapps-not-a-live-stream/6298/2 "2013-04-22T20:02:07Z")

</div>

I’ve done it with VLC media player and the following code on a button:

`system.util.execute(["C:\Program Files\VideoLAN\VLC\VLC.exe",
"C:\Path\To\File", "--fullscreen", "--play-and-exit"])`

This has worked very well for me, of course the media file needs to be local to the client. I haven’t tried it with a file on a networked drive yet.

---

<div class="post-metadata">

**Author:** ![billmorone](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@billmorone](https://forum.inductiveautomation.com/u/billmorone)\
**Post date:** [April 23, 2013, 5:00pm UTC](https://forum.inductiveautomation.com/t/need-to-play-a-video-clip-from-webapps-not-a-live-stream/6298/3 "2013-04-23T17:00:14Z")

</div>

Thanks, Duff. Got it to work.

---

<div class="post-metadata">

**Author:** ![billmorone](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@billmorone](https://forum.inductiveautomation.com/u/billmorone)\
**Post date:** [April 26, 2013, 12:43pm UTC](https://forum.inductiveautomation.com/t/need-to-play-a-video-clip-from-webapps-not-a-live-stream/6298/4 "2013-04-26T12:43:26Z")

</div>

I executed this solution to get a demo up and running. The VLC solution is okay but VLC is more of a stand-a-lone viewer than something to be integrated into an app.

The command line interface is a little lacking (window) control wise and coupled with the simple execution mechanism of the `system.util.execute ` Ignition call there are some strange effects (I am not complaining). I will look into all things further to try to find the best possible way.

More than likely I will come up with a different solution for our production clients.

Some hints for followers of this path:  
If there is a “flash” after the viewer presents itself and your video starts to run and then another after the video plays, if you make the actual video the same size as your window dims you can minimize this effect.  
I used the following command line args to close the viewer window after play and to remove the display of the VLC cone in the viewer window:

```auto
system.util.execute(["C:\pathToVLC\VideoLAN\VLC\VLC.exe","C:\pathToFile\filename.mp4", "--height=480", "--width=720", "--no-qt-bgcone", "--play-and-exit"])
```

Good luck.
