AUDIOMIXER issue

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

AUDIOMIXER issue

00jmsmachado
Hi all,

I am trying to sync two wav samples with audiomixer gst plugin. 

After some atempts i end up with the following error with the followig pipeline. Can you kindly give some tips and tricks to get this pipe working?
 

C:\gstreamer\1.0\x86\bin>gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! autoaudiosink filesrc location=CLIP1.wav ! mix. filesrc location=CLIP1.wav ! mix.
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.224652851 10168   007B34F0 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported
0:00:00.224653262 10168   007B34C8 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported
0:00:00.235237197 10168   007B34F0 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported
0:00:00.244674471 10168   007B34C8 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported
0:00:00.255125388 10168   007B34F0 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<filesrc1> error: Internal data stream error.
0:00:00.265329566 10168   007B34C8 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<filesrc0> error: Internal data stream error.
0:00:00.279796057 10168   007B34C8 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<filesrc0> error: streaming stopped, reason error (-5)
0:00:00.273467865 ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data stream error.
10168Additional debug info:
gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming stopped, reason error (-5)
   007B34F0 ERROR: pipeline doesn't want to preroll.
WARN    Setti     ng pipeline to NULL ...
        basesrc gstbasesrc.c:2939:gst_base_src_loop:<filesrc1> error: streaming stopped, reason error (-5)
0:00:00.289064184 10168   007B34C8 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported
0:00:00.305881064 10168   007B34F0 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported
Freeing pipeline ...

Thanks in advance,
João M. 

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

Nicolas Dufresne-5
Le jeudi 14 septembre 2017 à 17:55 +0100, joao machado a écrit :
> C:\gstreamer\1.0\x86\bin>gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! autoaudiosink filesrc location=CLIP1.wav ! mix. filesrc location=CLIP1.wav ! mix.
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> 0:00:00.224652851 10168   007B34F0 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported

You need to transform the WAV to RAW data (basically parse and remove
the WAV HEADER). This is done by the wavparse element.

gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! autoaudiosink \
                               filesrc location=CLIP1.wav ! wavparse ! mix. \
                               filesrc location=CLIP1.wav ! wavparse ! mix.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

00jmsmachado
Great, thank you so much. 

The big next step is redirect the result to a WAV file, but neither do no work my attempts :)

gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. !  autoaudiosink filesrc location=CLIP1.wav ! wavparse ! mix. filesrc location=CLIP1.wav ! wavparse ! mix. wavenc ! filesink location=output.wav
 
Looking forward to have the final pipeline. 

Thank you so much. 


On Thu, Sep 14, 2017 at 7:04 PM, Nicolas Dufresne <[hidden email]> wrote:
Le jeudi 14 septembre 2017 à 17:55 +0100, joao machado a écrit :
> C:\gstreamer\1.0\x86\bin>gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! autoaudiosink filesrc location=CLIP1.wav ! mix. filesrc location=CLIP1.wav ! mix.
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> 0:00:00.224652851 10168   007B34F0 ERROR        audioaggregator gstaudioaggregator.c:453:gst_audio_aggregator_sink_event:<mix> Segment of type bytes are not supported, only TIME segments are supported

You need to transform the WAV to RAW data (basically parse and remove
the WAV HEADER). This is done by the wavparse element.

gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! autoaudiosink \
                               filesrc location=CLIP1.wav ! wavparse ! mix. \
                               filesrc location=CLIP1.wav ! wavparse ! mix.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

Nicolas Dufresne-5
Le jeudi 14 septembre 2017 à 20:33 +0100, joao machado a écrit :
> gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. !
>  autoaudiosink filesrc location=CLIP1.wav ! wavparse ! mix. filesrc
> location=CLIP1.wav ! wavparse ! mix. wavenc ! filesink
> location=output.wav

Did you really want to playback on speaker and record to disk ?
Removing one of the other will fix your issue, otherwise you need a tee
element to multi-plex. I'll let you the exercise of fixing it this
time.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

00jmsmachado
Just save to the disk. 

Are you telling me that removing the autoaudiosink fix the issue? Something missing.

gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. !  filesrc location=CLIP1.wav ! wavparse ! mix. filesrc location=CLIP1.wav ! wavparse ! mix. wavenc ! filesink location=output.wav

Thanks in advance

On Thu, Sep 14, 2017 at 9:56 PM, Nicolas Dufresne <[hidden email]> wrote:
Le jeudi 14 septembre 2017 à 20:33 +0100, joao machado a écrit :
> gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. !
>  autoaudiosink filesrc location=CLIP1.wav ! wavparse ! mix. filesrc
> location=CLIP1.wav ! wavparse ! mix. wavenc ! filesink
> location=output.wav

Did you really want to playback on speaker and record to disk ?
Removing one of the other will fix your issue, otherwise you need a tee
element to multi-plex. I'll let you the exercise of fixing it this
time.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

Antonio Ospite-2
In reply to this post by 00jmsmachado
On Thu, 14 Sep 2017 20:33:20 +0100
joao machado <[hidden email]> wrote:

> Great, thank you so much.
>
> The big next step is redirect the result to a WAV file, but neither do no
> work my attempts :)
>
> gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. !  autoaudiosink
> filesrc location=CLIP1.wav ! wavparse ! mix. filesrc location=CLIP1.wav !
> wavparse ! mix. wavenc ! filesink location=output.wav
>
> Looking forward to have the final pipeline.
>

Look at _how_ Nicolas wrote his pipeline:
 
> On Thu, Sep 14, 2017 at 7:04 PM, Nicolas Dufresne <[hidden email]>
> wrote:
...
> > gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix ! autoaudiosink \
> >                                filesrc location=CLIP1.wav ! wavparse ! mix. \
> >                                filesrc location=CLIP1.wav ! wavparse ! mix.
> >

By using separate lines you can see that audiomixer is the src of the
main pipeline:
  audiomixer name=mix -> autoaudiosink

And that audiomixer is fed as a sink in secondary branches:
 filesrc -> ... -> mix.
 filesrc -> ... -> mix.

Once you got this it's easier to understand that you have to change the
main pipeline _sink_ if you want to redirect the mixed result somewhere
else.

Either replace autoaudiosink with your new destination, or use tee as a
sink there to have multiple destinations. If you do that I suggest to
put the branches where the tee is a src on separate lines as well.

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

00jmsmachado
I just need the first option (redirect to the file)

I did understand the goal of the pipe, but not how the "autoaudiosink  filesrc location=CLIP1.wav" are used together as I am used to see pipes with the sink at the end of the pipe. That's why i put it there. 

That said, the following pipe should do the same but the result stream redireted to the wav file. But playing the file results in an "Stream is no RIFF stream: 0x2" error in the wavparse element (gst-launch-1.0 filesrc location=output1.wav ! wavparse ! autoaudiosink)

gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! filesink location=output1.wav  filesrc location=CLIP1.wav ! wavparse ! mix. filesrc location=CLIP1.wav ! wavparse ! mix.

Thank you all

On Fri, Sep 15, 2017 at 7:21 AM, Antonio Ospite <[hidden email]> wrote:
On Thu, 14 Sep 2017 20:33:20 +0100
joao machado <[hidden email]> wrote:

> Great, thank you so much.
>
> The big next step is redirect the result to a WAV file, but neither do no
> work my attempts :)
>
> gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. !  autoaudiosink
> filesrc location=CLIP1.wav ! wavparse ! mix. filesrc location=CLIP1.wav !
> wavparse ! mix. wavenc ! filesink location=output.wav
>
> Looking forward to have the final pipeline.
>

Look at _how_ Nicolas wrote his pipeline:

> On Thu, Sep 14, 2017 at 7:04 PM, Nicolas Dufresne <[hidden email]>
> wrote:
...
> > gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix ! autoaudiosink \
> >                                filesrc location=CLIP1.wav ! wavparse ! mix. \
> >                                filesrc location=CLIP1.wav ! wavparse ! mix.
> >

By using separate lines you can see that audiomixer is the src of the
main pipeline:
  audiomixer name=mix -> autoaudiosink

And that audiomixer is fed as a sink in secondary branches:
 filesrc -> ... -> mix.
 filesrc -> ... -> mix.

Once you got this it's easier to understand that you have to change the
main pipeline _sink_ if you want to redirect the mixed result somewhere
else.

Either replace autoaudiosink with your new destination, or use tee as a
sink there to have multiple destinations. If you do that I suggest to
put the branches where the tee is a src on separate lines as well.

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AUDIOMIXER issue

Antonio Ospite-2
On Fri, 15 Sep 2017 10:43:36 +0100
joao machado <[hidden email]> wrote:

> I just need the first option (redirect to the file)
>
> I did understand the goal of the pipe, but not how the "autoaudiosink
>  filesrc location=CLIP1.wav" are used together as I am used to see pipes
> with the sink at the end of the pipe. That's why i put it there.
>

Was my explanation helpful in any way?
 
> That said, the following pipe should do the same but the result stream
> redireted to the wav file. But playing the file results in an "Stream is no
> RIFF stream: 0x2" error in the wavparse element (gst-launch-1.0 filesrc
> location=output1.wav ! wavparse ! autoaudiosink)
>
> gst-launch-1.0 --gst-debug=*:3 audiomixer name=mix mix. ! filesink
> location=output1.wav  filesrc location=CLIP1.wav ! wavparse ! mix. filesrc
> location=CLIP1.wav ! wavparse ! mix.
>

You just forgot the wavenc element before filesink, so you are not
actually saving a wav file but raw audio with no headers.

Two side notes:
  - the "mix." string right after "name=mix" is not really needed and
    can be misleading;
  - write branches on different lines (in a wrapper script), this
    way it's easier to understand the pipeline and find problems wit it.

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel