wrong audio output on raspberry pi3 running processing sketch

edited March 2018 in Raspberry PI

Hi everyone, I'm working with GLvideo library on Rpi (Raspbian) and I'm having this problem: The sound of my video goes straight through the HDMI out, and never through my usb soundcard, even though I've setted it as "default" with alsamixer. I found on an old forum that it could be a problem from java wich don't respect the default audio output... Anyone has an idea? Thanks for any help, and sorry for my my french-english style.


  • I found on an old forum that it could be a problem from java wich don't respect the default audio output

    Can you provide a link to that post? Also, tagging @gohai as he might be able to help.


  • No sorry, I don't have an answer to this one.

  • edited March 2018

    Hi kfrajer! Thanks for your quick answer. Hi Gohai! Quite sad you don't have the answer :/ But Great work for your lib!. The sound works fine for you?

    This is what i read: https://raspberrypi.stackexchange.com/questions/1337/how-can-i-get-java-sound-to-work It says that with a command line he is able to play a song but not with his java app on raspbian. In fact, OMX player works but not my processing app, so i thought it could be an idea. BUT, it was posted 5 years ago. Thanks again for your answers.

  • It's definitely not a issue with Java, as the GLVideo library uses GStreamer for video decoding and handling of the audio

  • Okay, so do you think it could be a problem of encoding? I didn't found indication on encoding audio for glvideo, but I tried on my Mac and it works.

  • If it is playing back, just on a different output than the one you like it to play: no, I don't believe this is related to encoding.

  • You must be right. I'll try to reinstall the entire OS and re-check every audio settings. Thanks! Still, if anyone has an other idea...

  • Hi! Still not working. YouTube works perfect, but not my processing sketch! I verified my audio configuration. @gohai is there a trick with the volume() function? My movie is declared as GLMovie, is that right or is this GLVideo? Thanks.

  • As it doesn't works with processing, I'm thinking about gstreamer. Is there something to install ?

  • @hugodb Try playing back your video using gst-launch-1.0.

    Something like this should work: gst-launch-1.0 playbin uri=file:///path/to/movie.mp4

  • Good morning, gst-launch-1.0 didn't work, but gst-launch gave me this error:

    gst-launch playbin uri=file:/pathtovideo.mp4 (wich is H264, audio AAC) Setting pipeline to PAUSED ... ** Message: don't know how to handle video/quicktime, variant=(string)iso Pipeline is PREROLLING ... Missing element: Quicktime demuxer ERROR: from element /GstPlayBin:playbin0/GstDecodeBin:decodebin0: A Quicktime demuxer plugin is required to play this stream, but not installed. Additional debug info: gstdecodebin.c(1003): close_pad_link (): /GstPlayBin:playbin0/GstDecodeBin:decodebin0: No decoder to handle media type 'video/quicktime' ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ...

  • My gst version is the 0.10. Is i the right one?

  • Answer ✓

    I got the answer!!! After a long long time searching for soluttions, I found on forums discussions that some users of RPi installed Pulse Audio to route audio from different apps to a audoi output. So, if you hve thi problem: -->apt-get install pulseaudio -->apt-get install pavucontrol -->reboot --> nano /etc/pulse/default.pa -->find and uncomment the line "load-module module-alsa-sink and...that's it! Thanks again gohai for your answers.

Sign In or Register to comment.