Search code examples
pythonubuntuaudio-streaminggstreamer-1.0

How to improve the quality of the audio of RTMP stream after multiplexing two streams


Using GStreamer (gst-launch1.0), I am multiplexing two streams

  • One contains the silence
  • Other contains the audio speech

But the problem is that the quality of the audio output is not good. The voice is distorted.

I need your help to improve the quality of the audio and here is my gstreamer command with parameters:

  • Below is the command which I used to multiplex two streams:

    gst-launch-1.0 -v udpsrc name='src1' caps="application/x-rtp" port= ! 
    rtppcmudepay ! mulawdec ! audioconvert ! audioresample ! mix. udpsrc 
    name='src2' caps="application/x-rtp" port= ! rtppcmudepay ! mulawdec ! 
    audioconvert ! audioresample ! mix. audiomixer name=mix start-time-selection=1 
    ! audioresample ! alawenc ! flvmux name=mux ! rtmpsink location=rtmp:server_ip
    
  • Below is the plugin which I used to improve the quality of the audio:

    audiochebband mode=band-pass lower-frequency= upper-frequency= type=2 ! 
    audioamplify amplification=0.5 clipping-method=wrap-positive
    

But this plugin is also not working to improve the quality of the audio stream.

I would really appreciate if you help me out to get the good quality audio output after multiplexing.


Solution

  • I am able to improve the quality of the audio by changing two parameters in the command rtppcmudepay with rtppcmadepay and mulawdec with alawdec Thanks