linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] [Mail 3/3][PATCH] mediastreamer2: audio qualit


From: bagamarco .
Subject: Re: [Linphone-developers] [Mail 3/3][PATCH] mediastreamer2: audio quality, tool/mediastreamer feature and minor changes
Date: Fri, 9 Feb 2018 13:31:39 +0100

Following patches changes mediastreamer tool improving its functionalities.
Purpose of these changes are to permit mono/bidirectional stream from cards/file with/without record file as detailed by example below.

Examples: 
1) Send mono-directional stream to multicast address. Audio source is card. 
        mediastream --remote 239.0.0.1:23456 --capture-card min --bitrate 8000 --payload audio/pcmu/8000/1 --no-rtcp

2) Send mono-directional stream to multicast address. Audio source is card. Record file to /tmp/rec.wav
        mediastream --remote 239.0.0.1:23456 --capture-card mic --bitrate 8000 --payload audio/pcmu/8000/1 --no-rtcp --outfile /tmp/rec.wav

3) Send mono-directional stream to multicast address. Audio source is card. Before play card, prepend /tmp/test.wav and record all to file /tmp/rec.wav
        mediastream --remote 239.0.0.1:23456 --capture-card mic --bitrate 8000 --payload audio/pcmu/8000/1 --no-rtcp --infile /tmp/test.wav --outfile /tmp/rec.wav

4) Recv mono-directional stream from multicast address and play to default card. 
        mediastream --local 239.0.0.1:23456 --playback-card default --bitrate 8000 --payload audio/pcmu/8000/1 --no-rtcp

5) Recv mono-directional stream from multicast address, play to default card and record file . 
        mediastream --local 239.0.0.1:23456 --playback-card default --bitrate 8000 --payload audio/pcmu/8000/1 --no-rtcp --outfile /tmp/rec.wav

6) Create bidirectional point to point stream and record conversation to file /tmp/rec.wav 
        mediastream --local 192.168.1.2:23456 --playback-card default --remote 192.168.1.3:23456 --capture-card mic --bitrate 128000 --payload audio/opus/48000/1 --no-rtcp --outfile /tmp/rec.wav
        mediastream --local 192.168.1.3:23456 --playback-card default --remote 192.168.1.2:23456 --capture-card mic --bitrate 128000 --payload audio/opus/48000/1 --no-rtcp --outfile /tmp/rec.wav

7) Stream /tmp/test.wav file to multicast group
        mediastream --remote 239.0.0.1:23456 --infile /tmp/test.wav --bitrate 128000 --payload audio/opus/48000/1 --no-rtcp

8) Record multicast stream to file
        mediastream --local 239.0.0.1:23456 --outfile /tmp/rec.wav --bitrate 128000 --payload audio/opus/48000/1 --no-rtcp

*Patch list and description:*

0018-tools-mediastream-changed-local-parameter-parsing-in.patch
    Changed parsing of --local parameter. Could be specified local address in order to bind to a specific interface.
    Bind to IN_ADDR_ANY with 0.0.0.0:<port>

0019-tools-mediastream-added-SIGTERM-handler.patch
    Added SIGTERM handler. Without this, alsa interface goes in a wrong state.

0020-tools-mediastream-accept-also-custom-alsa-card.patch
    Permits to use custom PCM card created with /etc/asound.conf

0021-tools-mediastream-permits-half-and-fullduplex-RTP-st.patch
    Use new 'audio_stream_new3' function in order to permits half duplex RTP streams (see eg. 1,2,3,4,5,7,8)

0022-tools-mediastream-permits-NULL-cards-and-in-out-file.patch
    Permits NULL capture/playback cards. (see eg. 7,8)


2018-02-09 13:30 GMT+01:00 bagamarco . <address@hidden>:
Following patches changes src/voip/audiostream.c src/voip/mediastream.c files 

*Patch list and description:*

0012-voip-audiostream-do-not-istantiate-av_player-resampl.patch
    Do not instantiate resampler when not needed in av_player.
    
0013-voip-audiostream-added-methods-useful-to-enable-disa.patch
    Added methods useful to enable/disable AudioMixer input related to unused/unwanted path.

0014-voip-audiostream-disable-by-default-local_player-pat.patch
    I have some trouble with local_player (MSFilePlayer) attached to local_mixer.
    When local_player is istantiated but not "opened" and "started", it generate noise on local_mixer output.
    I couldn't find where this happen.
    As workaround, this patch disable by default local_mixer input pin associated to local_player.
    User should enable this path when use local_player (after audio_stream_get_local_player)

0015-voip-audiostream-voip-mediastream-added-audio_stream.patch
    In some circumstance (eg. multicast monodirectional stream) is mandatory that RTP is initialized as SENDONLY or RECVONLY.
    Based on audio_stream_new2, this patch added audio_stream_new3 method useful to create and RTP stream half/full duplex.

0016-voip-audiostream-changed-MSMediaStreamIO-parameter-a.patch
    Changed MSMediaStreamIO check in src/voip/audiostream.c in order to be more flexible.
    Also added check on each filter to avoid segfaults in half duplex configuration.
    
0017-voip-audiostream-play-input-file-before-activate-cap.patch
    When capture card and input file are activated together, prepend input file to capture card.


2018-02-09 13:29 GMT+01:00 bagamarco . <address@hidden>:
Hey folks,

working with my iMX6 SoloX and mediastreamer tool I run into some audio problems.
Attached you can find some patches that fix few bugs, simplify alsa filter configuration (threaded version and epipe bug fixing) and other minor changes like typos or compile warning.

In next mails I will provide some general modification and new features to mediastreamer tool.

*Patch list and description:*

0001-audiofilters-alsa-aligned-read_process-samples-to-20.patch
    alsa_read_process function in non threaded version read 16ms samples instead of 20ms like other functions.

0002-audiofilters-alsa-fixed-errors-when-compiled-with-TH.patch
    Use ENABLE_ALSA_THREADED cmake option to enable alsa threaded version.
    Also fix compile errors in this configuration.

0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
    Use ENABLE_ALSA_EPIPE_BUGFIX cmake option to enable EPIPE_BUGFIX in alsa filter.
    Also fix compile errors in this configuration.

0004-audiofilters-alsa-added-debug-message-when-alsa_writ.patch
    Actually, when snd_pcm_writei returns EAGAIN, these samples are discarded generating audio noise.
    Increase output buffer size in /etc/asound.conf avoid EAGAIN error.
    In order to simply debug, this patch add ms_debug message every time EAGAIN is returned.
    
0005-audiofilters-audiomixer-do-not-check-channel-activit.patch
    When an MSAudioMixer input pin is disabled do not consider channel activity and discard samples.

0006-audiofilters-audiomixer-increase-logging-information.patch
    Added debug information when MSAudioMixer enters into bypass mode.
    
0007-audiofilters-audiomixer-fixed-typos.patch
    Fixed typos

0008-msqueue-added-mutex-lock-in-MSBufferizer-in-order-to.patch
    MSFilePlayer generate strange duplicated audio.
    After some debug, I notice that ms_bufferizer provides duplicated samples.
    This patch added mutex in order protect critical section in msqueue proceducer/consumer.

0009-mscommon-concealement-is-not-required-when-current-t.patch
    I had some problem with OPUS codec. It introduce noise when use PLC.
    Using concealement only when we are late... 
    
0010-voip-audiostream-removed-compile-warning.patch
    Minor. Fix warning
    
0011-voip-audiostream-fixed-memleak-on-multiple-audio_str.patch
    In src/audiostream.c there is a memleak when recorder is stopped.
    With this patch record_file is freed, but the sequece
        audio_stream_mixed_record_open
        audio_stream_mixed_record_start,
        audio_stream_mixed_record_stop
    is mandatory.



Attachment: 0018-tools-mediastream-changed-local-parameter-parsing-in.patch
Description: Text Data

Attachment: 0019-tools-mediastream-added-SIGTERM-handler.patch
Description: Text Data

Attachment: 0020-tools-mediastream-accept-also-custom-alsa-card.patch
Description: Text Data

Attachment: 0021-tools-mediastream-permits-half-and-fullduplex-RTP-st.patch
Description: Text Data

Attachment: 0022-tools-mediastream-permits-NULL-cards-and-in-out-file.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]