# Which Video Library for Playing Video From RPI

**URL:** <https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962>\
**Category:** Processing for Pi\
**Created:** [June 14, 2018, 2:25pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962 "2018-06-14T14:25:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 14, 2018, 2:25pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/1 "2018-06-14T14:25:45Z")

</div>

I only need to play a video file loaded on Pi–it’s not coming from another source. I noticed there is a regular video library for Processing, but then there is another one for RPI that talks about hardware.

---

<div class="post-metadata">

**Author:** ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)\
**Post date:** [June 14, 2018, 11:07pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/2 "2018-06-14T23:07:04Z")

</div>

Have you looked at this Wiki, toward the bottom of the page , regarding the Raspberry Pi video Hardware? - [https://github.com/processing/processing/wiki/Raspberry-Pi](https://github.com/processing/processing/wiki/Raspberry-Pi)

---

<div class="post-metadata">

**Author:** ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)\
**Post date:** [June 14, 2018, 11:11pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/3 "2018-06-14T23:11:05Z")

</div>

I would also look at this example - [https://github.com/gohai/processing-glvideo/tree/master/examples/SingleVideo](https://github.com/gohai/processing-glvideo/tree/master/examples/SingleVideo) hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 15, 2018, 12:20am UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/4 "2018-06-15T00:20:44Z")

</div>

Thanks for replying :). Unfortunately been all over the wiki and examples. Also just gave regular Video Processing library a try (which failed as predicted). I do have a lead from an old forum post talking about Pulse Audio. Going to try to install that next.

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [June 15, 2018, 5:35am UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/5 "2018-06-15T05:35:51Z")

</div>

GLVideo library works for me, the reason is that RaspberryPI and a number of linux distributions use GStreamer-1.x.x whereas original video library use GStreamer-0.1.x, however I believe a fix is in the works.

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 15, 2018, 5:52am UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/6 "2018-06-15T05:52:47Z")

</div>

Good to know. So far GL Video looks great–I just can’t get the audio. I’ve done a bunch of updates, so hopefully tomorrow I’ll try a different monitor, as the one I have at home is HDMI but with separate speakers for audio. I fear that could be the issue since many have complained with similar problems with how HDMI is seen. I’ve tried forcing local audio and other workarounds, but so far nothing. Are your speakers built into your monitor?

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [June 15, 2018, 11:09am UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/7 "2018-06-15T11:09:10Z")

</div>

Try [https://github.com/processing/processing-video/releases/tag/r3-v2.0-beta1](https://github.com/processing/processing-video/releases/tag/r3-v2.0-beta1) which uses GStreamer 1.x

It is (was) GStreamer 0.10.x, not 0.1.x.

GL Video is still likely to work better on the Pi in the short term, if with less features - OpenGL support still needs to be added to the GStreamer Java bindings - I’ll be working on that over the next couple of months.

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [June 15, 2018, 5:34pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/8 "2018-06-15T17:34:10Z")

</div>

I am using domestic TV as a monitor sounds fine from HDMI. There is some stuff you could try  
`omxplayer video.mp4` rather than always using processing, and `amixer cset numid=3 2` or at the death edit `/boot/config.txt and setting hdmi_drive=2` requires reboot.

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 15, 2018, 8:46pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/9 "2018-06-15T20:46:02Z")

</div>

Honestly GL Video looks great–just need to get the audio working–very perplexing despite setting HDMI in config file.

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 15, 2018, 8:47pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/10 "2018-06-15T20:47:41Z")

</div>

Hey Monkstone, thanks for the detail. I want to use Processing because I will be triggering the video with a sensor and I happen to only be literate in Arduino-speak. Today on the monitor at the art center I was able to get audio using OMX Player, but still not GL Video. Ack!

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 15, 2018, 8:49pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/11 "2018-06-15T20:49:17Z")

</div>

It would be nice to know whether the SingleVideo example in Processing allows for audio. Maybe there is another statement that needs to be made in the code?

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [June 16, 2018, 2:24pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/12 "2018-06-16T14:24:02Z")

</div>

Tagging @gohai as he might be able to help.

Kf

---

<div class="post-metadata">

**Author:** ![gohai](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gohai/32/25_2.png) [@gohai](https://discourse.processing.org/u/gohai)\
**Post date:** [June 16, 2018, 6:59pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/13 "2018-06-16T18:59:31Z")

</div>

@Zengirl2 What’s the problem exactly? There is no sound playing _at all_, or is it just not coming through HDMI? (i.e. what happens if you plug in headphones to the Pi’s audio jack?)

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 19, 2018, 7:35pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/14 "2018-06-19T19:35:56Z")

</div>

Hi, Gohai! Cool to meet you and sorry for the delay, but I wanted to test one more thing before responding. So, if I try to use the Rasp Pi with OMX Video Player it works fine with HDMI for video and audio. However, if I use GL Video on Processing with the Single Video example (using my video), I get the video, but not the audio using HDMI (nothing on headphones). I have tried forcing HDMI for audio as well as analog in Raspi-Config. I did not try the hotplug setting because my Pi config is in a menu and I don’t see that option. Am I missing anything or is there any special code that needs to be in the example to play audio? I have done all updates/upgrades on my PiB and have enabled 128k memory.

---

<div class="post-metadata">

**Author:** ![gohai](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gohai/32/25_2.png) [@gohai](https://discourse.processing.org/u/gohai)\
**Post date:** [June 19, 2018, 9:06pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/15 "2018-06-19T21:06:32Z")

</div>

@Zengirl2 Could you upload perhaps a snippet of your video file for me to have a look? Guessing that perhaps the GStreamer that is part of the library can’t decide the codec of your audio track… you could also try downloading the infamous Big Bucks Bunny h264 test file, and test if you hear audio with this one (you should!). Best

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [June 19, 2018, 10:45pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/16 "2018-06-19T22:45:59Z")

</div>

Ah, Big Bucks Bunny, everyone’s favourite test file 😄

You could also try using `gst-play-1.0 FILE` from a terminal which should tell you whether this is a GStreamer or library issue.

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 20, 2018, 7:26pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/17 "2018-06-20T19:26:07Z")

</div>

Neil, can you clarify the FILE part–should that be my video file name or is FILE part of the command. If so, I’m getting a _command not found_ error.

---

<div class="post-metadata">

**Author:** ![Zengirl2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zengirl2/32/448_2.png) [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Post date:** [June 20, 2018, 8:40pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/18 "2018-06-20T20:40:56Z")

</div>

@gohai and crew–Well, I spent the time to download Big Buck and guess what??? I’ve got audio people!!! This is strange since I had an MP4 test file, but I will be sure that I do the correct H264 codec when creating my own video. Anyway, this is all great because it means I can move onto GPIO for the light sensor. I suspect with the lag using my PiB that I may have to upgrade to a more recent Pi, but this is a great start. Thanks to everyone for their help on this forum.

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [June 21, 2018, 3:34pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/19 "2018-06-21T15:34:32Z")

</div>

Yes, that’s right. You can try typing `gst<TAB>` and see if any of the GStreamer command line tools are installed. Could be just named `gst-play`. Still, if you’ve got good old Big Buck working it looks like it’s an issue with your file. The command line tools can be good for debugging GStreamer things so are useful to have handy if you haven’t got them installed.

---

<div class="post-metadata">

**Author:** ![gohai](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gohai/32/25_2.png) [@gohai](https://discourse.processing.org/u/gohai)\
**Post date:** [June 21, 2018, 9:37pm UTC](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962/20 "2018-06-21T21:37:43Z")

</div>

@Zengirl2 Glad it works - sorry for all the hoops to jump trough! If you find out what audio codec your file had, do let us know (so that we can look into making this one work as well in a future build).

[Next page](https://discourse.processing.org/t/which-video-library-for-playing-video-from-rpi/962.md?page=2)
