dividuum / info-beamer

The Multimedia Presenter for Lua (for commercial projects, use info-beamer pi instead)
https://info-beamer.com/
Other
227 stars 48 forks source link

no sound in videos #44

Closed OliverHering closed 8 years ago

OliverHering commented 8 years ago

Hi,

Info-Beamer is not playing any sound, if i start a video. But if I play the same video with the omxplayer everything works fine.

The environment variable is set to: INFOBEAMER_AUDIO_TARGET=hdmi Audio Output is set to HDMI: amixer cset numid=3 2

And this is my very short script:

gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)

local video = resource.load_video{
    file = "VID_20160815.mp4";
    audio = true;
    looped = false;
    paused = false;
}

function node.render()
    video:draw(0, 0, WIDTH, HEIGHT)
end

I'm using Info-Beamer Pi on RASPBIAN JESSIE (Raspberry Pi B).

Any idea what is going wrong? I'm quite new to Linux and I'm thankful for any help.

Cheers Mickey

dividuum commented 8 years ago

On first sight that looks fine. Could you send me the output of running

$ INFOBEAMER_AUDIO_TARGET=hdmi INFOBEAMER_LOG_LEVEL=3 info-beamer /some/path

Either here or to the mail address on https://info-beamer.com/doc/about

OliverHering commented 8 years ago

It works with the INFOBEAMER_AUDIO_TARGET=hdmi parameter! So i looked in printenv and the environment variable was gone. If I write export INFOBEAMER_AUDIO_TARGET=hdmi the variable is only working till the next reboot.

dividuum commented 8 years ago

When you have a shell running, setting environment variables is temporary. By default they are not inherited by programs you call from your shell. You have to either

In both cases once you close the shell the assignment is gone. My suggestion would be to write a small wrapper script that sets the correct values. Something like this:

#!/bin/sh
export INFOBEAMER_AUDIO_TARGET=hdmi
exec info-beamer /some/path
OliverHering commented 8 years ago

Ok, Thanks. Didn't know that. I will add the command to the other script, which is calling info-beamer.