jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4
GNU General Public License v2.0
180 stars 61 forks source link

Audio ALSA support #101

Closed magdesign closed 6 years ago

magdesign commented 7 years ago

Since original omxplayer supports ALSA sound, for example: omxplayer -o alsa:hw:1,0 /location/of/video.mp4

It would be amazing to get also ALSA support on ofxOMXPlayer.

timonsku commented 7 years ago

Oh wow, I totally missed that they implemented that! Big +1 for adding alsa support for ofxOMXPlayer. By far the biggest issue I usually have.

magdesign commented 7 years ago

I think this will never come :-(

jvcleave commented 7 years ago

@magdesign yes - I've been on other non-RPi projects so it's unlikely to come from me.

jvcleave commented 6 years ago

Hey all,

with the rehaul the OMXAlsa stuff is there but may need some tweaks to be enabled? I'm not sure what the application use is as I typically just use the HDMI port.

jvcleave commented 6 years ago

the way you can enable it is to use

omxPlayer.engine.m_config_audio.device = "omx:alsa";

before calling omxPlayer.setup();

on my config is it currently causing errors and stopping video from playing but the component is passing. I don't know if I need other config tweaks in order to work as expected

timonsku commented 6 years ago

Odd but would definitely be great to have! Main use is having an i2s audio hat or a usb audio interface.

jvcleave commented 6 years ago

ok - i do have a usb sound card so I can try that. It's probably just a matter of passing the correct hardware id

jvcleave commented 6 years ago

it does work - use the syntax

omxPlayer.engine.m_config_audio.device = "omx:alsa";
omxPlayer.engine.m_config_audio.subdevice = "hw:1,0";

//works but sounded weird with my config
//omxPlayer.engine.m_config_audio.subdevice = "default"; 
timonsku commented 6 years ago

thats really great!