Menu

GSPipeline no sound

Help
Offlink
2010-06-25
2012-12-26
  • Offlink

    Offlink - 2010-06-25

    Hi

    Thank you for this excellent library :D

    We want make a client live streaming, the source no matters, mp4, flv, avi etc

    We use a pipeline of GStreamer for this, but we have a mistake with the audio, in test "audiotestsrc"

    Saving a file mp3 when this test, is ok

    pipe = new GSPipeline(this, "audiotestsrc ! audioconvert ! lame ! filesink location=file.mp3 ");

    But no sound live, taken the example of "Test.pde" use the following pipeline for audio:

    pipe = new GSPipeline(this, "audiotestsrc ! audioconvert ! audio/x-raw-int,rate=8000,channels=1");

    But get the following error

    JNA: Callback org.gstreamer.Element$4@1b09282 threw the following exception:
    org.gstreamer.Structure$InvalidFieldException: Structure does not contain integer field 'height'
    at org.gstreamer.Structure.getInteger(Structure.java:123)
    at org.gstreamer.elements.RGBDataSink$VideoHandoffListener.handoff(RGBDataSink.java:109)
    at org.gstreamer.Element$4.callback(Element.java:530)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:384)
    at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:414)

    The pipeline is wrong?  :(  or exist another way to sound the audio

    Sorry my English

    Thanks

     
  • Andres Colubri

    Andres Colubri - 2010-06-26

    Thanks for pointing this out!

    I'm adding a new parameter for GSPipeline, which allows you to indicate that the pipeline is audio-only. Something like this:

    pipe = new GSPipeline(this, "audiotestsrc ! audioconvert ! alsasink", GSVideo.AUDIO);

    I'll upload the version of gsvideo with this new feature soon.

     
  • Offlink

    Offlink - 2010-06-27

    Hehe perfect , that's great

    I'll be waiting for the new version

    Thank you

     
  • Andres Colubri

    Andres Colubri - 2010-06-28

    Forgot to mention, I put the sample pipeline in Examples/Pipelines/Test. Only the Linux version, for windows would be:

    pipe = new GSPipeline(this, "audiotestsrc ! audioconvert ! directsoundsink", GSVideo.AUDIO);

     
  • Offlink

    Offlink - 2010-07-29

    Works !!  that's great

    Excelent thank you

    Tested in Windows and Ubuntu

     

Log in to post a comment.