mix-matrix in audioconvert plugin ignored for some files

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

mix-matrix in audioconvert plugin ignored for some files

moritz.vieli
Hi there

I have two test files:
- 4 channels: https://www.dropbox.com/s/bzw7c66d0asrcob/ok.wav?dl=0
- 2 channels: https://www.dropbox.com/s/yk1nbkied5se8xa/nok.wav?dl=0

The files are played with the following pipelines:
- ok.wav: gst-launch-1.0 uridecodebin uri=file:///test/ok.wav ! audioconvert
mix-matrix="<<(float)0.0, (float)0.0, (float)0.0, (float)0.0>, <(float)0.0,
(float)0.0, (float)0.0, (float)0.0>>" ! audioresample ! osxaudiosink

- nok.wav: gst-launch-1.0 uridecodebin uri=file:///test/nok.wav !
audioconvert mix-matrix="<<(float)0.0, (float)0.0>, <(float)0.0,
(float)0.0>>" ! audioresample ! osxaudiosink

Now, I'd expect both files to be played completely silent. It works
perfectly for ok.wav, but unfortunately, the mix-matrix seems to be
completely ignored for nok.wav and the file is played in stereo.

Here is the output of gst-discoverer-1.0:

ok.wav
----
Topology:
  audio: audio/x-wav
    Tags:
      Containerformat: WAV
      Bitrate: 5644800
      Audio-Codec: Uncompressed 32-bit IEEE float audio
   
    Codec:
      audio/x-wav
    Additional info:
      None
    Stream ID: 341a6ef67d495ed33284a5b4182f6232
    Language: <unknown>
    Channels: 4 (front-left, front-right, rear-left, rear-right)
    Sample rate: 44100
    Depth: 32
    Bitrate: 5644800
    Max bitrate: 0

Properties:
  Duration: 0:00:17.280000000
  Seekable: yes
  Live: no
  Tags:
      Containerformat: WAV
      Bitrate: 5644800
      Audio-Codec: Uncompressed 32-bit IEEE float audio

nok.wav
----
Topology:
  audio: audio/x-wav
    Tags:
      Containerformat: WAV
      Bitrate: 2822400
      Audio-Codec: Uncompressed 32-bit IEEE float audio
   
    Codec:
      audio/x-wav
    Additional info:
      None
    Stream ID: 0f9d10198a75ec7f310075e4f27d4d97
    Language: <unknown>
    Channels: 2 (front-left, front-right)
    Sample rate: 44100
    Depth: 32
    Bitrate: 2822400
    Max bitrate: 0

Properties:
  Duration: 0:04:02.744784581
  Seekable: yes
  Live: no
  Tags:
      Containerformat: WAV
      Bitrate: 2822400
      Audio-Codec: Uncompressed 32-bit IEEE float audio

I am running Gstreamer 1.14. Apart from the the different channel count, I
could not figure a relevant difference. Do you have an idea, why the
mix-matrix does not work for nok.wav?

Best,
Moritz



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

Re: mix-matrix in audioconvert plugin ignored for some files

moritz.vieli
Just think I found it out by myself:
-->
https://github.com/GStreamer/gst-plugins-base/blob/master/gst/audioconvert/gstaudioconvert.c

/* same number of channels and no output layout: just use input layout */

But this is not correct in my case. I'd like to shift a 2-channel file on a
2-channel output by one channel, resulting in the left channel being played
on the right speaker and the right channel of the file being ignored. This
is not possible with the mix-matrix with this restriction.

Is this a bug or is there another way?



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

Re: mix-matrix in audioconvert plugin ignored for some files

Sebastian Dröge-3
On Sat, 2018-12-15 at 11:24 -0600, moritz.vieli wrote:

> Just think I found it out by myself:
> -->
> https://github.com/GStreamer/gst-plugins-base/blob/master/gst/audioconvert/gstaudioconvert.c
>
> /* same number of channels and no output layout: just use input layout */
>
> But this is not correct in my case. I'd like to shift a 2-channel file on a
> 2-channel output by one channel, resulting in the left channel being played
> on the right speaker and the right channel of the file being ignored. This
> is not possible with the mix-matrix with this restriction.
>
> Is this a bug or is there another way?
This is a bug indeed. Please report it in GitLab, or even better
directly create a MR for it :)

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base

--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com


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

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

Re: mix-matrix in audioconvert plugin ignored for some files

moritz.vieli
Hi Sebastian

Thanks a lot for your super fast reply!

I just opened an issue here:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/521

Because I'm still relatively new to Gstreamer and do not have programming
skills in C, I did not dare to already open a MR by myself.

Best,
Moritz



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel