# Can't get omxplayer to output video over HDMI, only audio is working

**URL:** <https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674>\
**Category:** Product support\
**Tags:** support\
**Created:** [August 28, 2019, 7:45pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674 "2019-08-28T19:45:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 28, 2019, 7:45pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/1 "2019-08-28T19:45:10Z")

</div>

I have a project, part of which involves playing a video using omxplayer, but when I trigger the video I can hear the audio but the screen just stays showing the BalenaCloud logo.

I’ve tried stripping everything back so that it’s as simple as possible. I now have a container that installs omxplayer and then runs `omxplayer --display=5 /home/pi/videos/default.mp4`, but I still just hear the audio and see the BalenaCloud logo.

To check the container can reach the screen I’ve tried displaying an image with `feh test.jpeg` and that worked fine, I’m at a loss as what to try next.

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [August 28, 2019, 7:48pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/2 "2019-08-28T19:48:31Z")

</div>

Hey @s.ince welcome to the forums! Could you let us know what device and what OS version you’re using?

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 28, 2019, 7:54pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/3 "2019-08-28T19:54:02Z")

</div>

Hey @chrisys,

The device is a raspberry pi 3b+

And the OS version is v2.41.0+rev3

Thank you!

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [August 28, 2019, 10:04pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/4 "2019-08-28T22:04:53Z")

</div>

Thanks for getting back to me - is there any chance you can share your `Dockerfile` as well, then we can try to reproduce this and work out what’s happening.

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 29, 2019, 8:27am UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/6 "2019-08-29T08:27:56Z")

</div>

My project is a copy of the [simple-server-python repo](https://github.com/balena-io-projects/simple-server-python), I’ve added the install of omxplayer, and I have a folder in my project called `./videos` that gets but into `/home/pi/videos`:

```
# base-image for python on any machine using a template variable,
# see more about dockerfile templates here: https://www.balena.io/docs/learn/develop/dockerfile/
FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3-stretch-run

# use `install_packages` if you need to install dependencies,
# for instance if you need git, just uncomment the line below.
RUN install_packages git omxplayer

COPY ./videos /home/pi/videos

# Set our working directory
WORKDIR /usr/src/app

# Copy requirements.txt first for better cache on later pushes
COPY requirements.txt requirements.txt

# pip install python deps from requirements.txt on the resin.io build server
RUN pip install -r requirements.txt

# This will copy all files in our root to the working directory in the container
COPY . ./

# Enable udevd so that plugged dynamic hardware devices show up in our container.
ENV UDEV=1

# main.py will run when container starts up on the device
CMD ["python","-u","src/main.py"]

```

To test if omxplayer works I then ssh in and run `omxplayer --display=5 /home/pi/videos/default.mp4`.

---

<div class="post-metadata">

**Author:** ![dfunckt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dfunckt/32/56_2.png) [@dfunckt](https://forums.balena.io/u/dfunckt)\
**Post date:** [August 29, 2019, 1:53pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/7 "2019-08-29T13:53:24Z")

</div>

Hello, I didn’t get a chance to try your Dockerfile, but did you happen to test this on balenaOS 2.38.0 instead of 2.41.0? Could you give it a shot?

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 29, 2019, 2:10pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/9 "2019-08-29T14:10:18Z")

</div>

@dfunckt I’ll try that now.

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 29, 2019, 2:51pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/11 "2019-08-29T14:51:49Z")

</div>

@dfunckt Things seem worse on 2.38.0. Now, omxplayer won’t do anything, it just hangs with no output at all. I ran it with `--genlog` and the only line in the logfile is `DEBUG: DllBcm: Using omx system library`.

On 2.41.0 omxplayer runs with no errors and exits as expected, the audio is played over HDMI but the screen just shows the Balena logo.

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [August 29, 2019, 2:58pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/12 "2019-08-29T14:58:24Z")

</div>

What output do you get from `oxmplayer` under 2.41.0? Did you try with `--genlog` enabled?

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 29, 2019, 3:10pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/13 "2019-08-29T15:10:33Z")

</div>

@wrboyce I’ve just switched back to 2.41.0 and things have gone back to as before.

I ran `omxplayer --display=5 --genlog /home/pi/videos/default.mp4` and then used [transfer.sh](https://transfer.sh/) to pull the log file, which I have attached.[omxplayer.log](https://forums.balena.io/uploads/short-url/oFrUTzYWYP2u6XEZ4emLypkAfcn.log) (141.2 KB)

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [August 29, 2019, 3:12pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/14 "2019-08-29T15:12:10Z")

</div>

Thanks, I’m taking a look at those logs now and I’ve just built a quick test app using `omxplayer` which I’m building too. I’ll let you know if I find anything.

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 29, 2019, 3:14pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/15 "2019-08-29T15:14:27Z")

</div>

Thank you @wrboyce, I thought it could be helpful to share the stdout from omxplayer, it exits as if everything went ok:

```
root@dcb0d00:/usr/src/app# omxplayer --display=5 --genlog /home/pi/videos/default.mp4
Video codec omx-h264 width 1080 height 1920 profile 77 fps 25.000000
Audio codec aac channels 2 samplerate 48000 bitspersample 16 
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: 1080x1920@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:5 
layer:0 alpha:255 aspectMode:0
have a nice day ;)
root@dcb0d00:/usr/src/app#
```

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [August 29, 2019, 3:26pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/16 "2019-08-29T15:26:07Z")

</div>

Thanks, I’ve got my test app built and am seeing exactly as you describe. I will dig around for a bit locally and see if I can work anything out. At least you know it isn’t just you 🙂

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [August 29, 2019, 5:19pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/19 "2019-08-29T17:19:20Z")

</div>

Okay, got there in the end. If you set `RESIN_HOST_CONFIG_dtoverlay` to `"vc4-fkms-v3d"` then it will work as expected (or you can set dtoverlay in config.txt if you wish).

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [August 29, 2019, 7:23pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/21 "2019-08-29T19:23:17Z")

</div>

Hi @wrboyce, incredible, it works!

Thank you so much for your help, I don’t think I’d have ever figured that out on my own.

`RESIN_HOST_CONFIG_dtoverlay` was already set, but to `"vc4-kms-v3d"` by default.

Can I ask what `RESIN_HOST_CONFIG_dtoverlay` does and how setting it to `"vc4-fkms-v3d"` helped? Also, how did you figure this out?

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [August 29, 2019, 7:48pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/22 "2019-08-29T19:48:37Z")

</div>

Awesome, glad it worked! If I’m honest I’m not sure why the overlay has been set to that by default, but I did see the same on my side.

As for how I worked it out… I’d love to tell you a tale of hardcore debugging but the truth of the matter is I asked my colleagues who were already aware of a similar issue and suggested I give the alternative dtoverlay a try. I do know we’ve been having issues with the latest BalenaOS builds due to Pi firmware changes, but that is a bit beyond my remit and I don’t have too many details I’m afraid. Happy to summon somebody from the devices team if you’d like an in depth explanation though?

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [September 2, 2019, 11:54am UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/24 "2019-09-02T11:54:59Z")

</div>

[@wrboyce](https://forums.balena.io/u/wrboyce) I’ve just added a new device and now `2.41.0` isn’t an option, has this version been removed?!

I’ve used 2.38.0 but with this version omxplayer just hangs with no output of any kind. ![:disappointed:](https://global.discourse-cdn.com/balena/original/2X/6/65d0c80051da44b1a131632a2dd799918a80a306.png ":disappointed:")

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [September 2, 2019, 1:47pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/25 "2019-09-02T13:47:01Z")

</div>

Hi @s-ince, we’ve had to pull 2.41.0 as it was causing some issues but I believe your app should work with 2.38.0. Let me try my similar test app on 2.38.0 and see if I can work out what is going on. I’ll get back to you if I find anything interesting.

---

<div class="post-metadata">

**Author:** ![s.ince](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/s.ince/32/2437_2.png) [@s.ince](https://forums.balena.io/u/s.ince)\
**Post date:** [September 2, 2019, 1:51pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/27 "2019-09-02T13:51:03Z")

</div>

Thank you @wrboyce, the problem is a little difference with 2.38.0. Now running `omxplayer --display=5 --genlog /home/pi/videos/default.mp4` results in no output at all, nothing from stdout nothing from the HDMI and nothing in the logfile, it’s really odd, it seems like omxplayer just freezes the second you try and run it.

---

<div class="post-metadata">

**Author:** ![gelbal](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/gelbal/32/1109_2.png) [@gelbal](https://forums.balena.io/u/gelbal)\
**Post date:** [September 6, 2019, 3:01pm UTC](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674/31 "2019-09-06T15:01:00Z")

</div>

Hi @s.ince, I pinged Will about it and he’s still investigating it. He might reply if he finds a workaround. Then it’s probably best for you to wait for the next release – as we know that solves this issue.

[Next page](https://forums.balena.io/t/cant-get-omxplayer-to-output-video-over-hdmi-only-audio-is-working/28674.md?page=2)
