Popping noise when piping audio into a vitual mic debian - audio

I have a pipe module with the command pactl load-module module-pipe-source source_name=VirtualMic file=/tmp/virtualmic format=wav rate=44100 channels=2
I want to use SoX to play a sound file into it. I am doing this with sox "example.wav" -t wav - > /tmp/virtualmic
I have tried piping the audio using ffmpeg, to the same result, and to confirm that it is not my computer speakers or the file, playing the file in audio programs such as vlc does not include a popping sound.
The number of channels and the sample rate are both identical, and other then the pop the audio plays normally

Related

How can I stream audio without latency?

I've been playing around with ffmpeg for sending audio to an endpoint and listening to it. This is the command I've used.
ffmpeg -f pulse -i 1 -f pulse 1
Where the two "1's" are the indices of my mic and output device as reported by pacmd list-sources and pacmd list-sinks.
This command allows me to speak into my microphone and hear it back in my speakers, but there's latency. Other parameters like -tune zerolatency and stuff don't help.
I know that low latency audio streaming is possible on Linux since apps like Discord work on it. Why is there latency in my command, and what protocol, program, or library should I use to transmit an audio stream?

Play multiple sound files and change volume individually using alsa

I have multiple .wav sound files.
My objective is:
Play 3 wav files simultaneously using aplay and change the volume, during the play, for each sound.
Im using Ubuntu Linux.
aplay does not provide interactive control of the volume. When aplay -i is invoked it allows you to pause and resume playback but not interactively change the volume.
One way to achieve what you want to do is to use an audio player with the dmix audio device. For example if you use mplayer :
mplayer alsa:device=dmix audioFile
Now you can invoke mplayer as many times as you want concurrently playing audio from different files. To turn the audio volume up, press 0 and down press 9.
If your audio files have different formatting, such as word length, sample rates or channels, then you will want to use the plugdmix device like so :
mplayer alsa:device=plugdmix audioFile

Removal of low-noise echo from stereo phone call recordings

I have phone call recordings which are dual channel with each channel supposed to carry only the voice of one speaker. However, they have some echo of the other channel. Any ways to remove this, in ffmpeg or sox or otherwise.
I am working on a Ubuntu 16.04 environment and using mplayer to play back the audio. A link to a 10s clip of the audio may be found here: https://drive.google.com/file/d/14xrchHvcluhDNGutYfCPpQi3cas_4Ogi/view?usp=sharing
I also looked at (almost) the same question: Silence out quiet periods in audio file with ffmpeg
Not very sure I could follow the answer/comment though.
Thanks!

How to add a 5.1 .flac audio track to a .ts file with already 3 audio tracks?

I want to add a 5.1 .flac audio track to a .ts file that already has three audio tracks. I tried with tsMuxer and ffmpeg with unsuccessful results. In tsMuxeR the .flac track is not recognized and in ffmpeg everything seems to work fine until the very last moment when I check the file and the .flac audio track is not included in the "output.ts". The .flac track is about 3GB and its lenght is around two and a half hours.
Thank you so much.
I don't think you'll find any existing software that maps FLAC into a MPEG-2 Transport Stream.
This gives you an idea what sort of issues you run into: https://xiph.org/flac/ogg_mapping.html
Let's say you came up with a reasonable way of mapping FLAC into a MPEG-2 Transport Stream - there won't be anything reading it.
Unless there is a specified way of mapping FLAC into a MPEG-2 Tranport Stream - you are on your own.
But PCM is supported in a MPEG-2 Transport Stream (for example Blu-Ray).
I'd use ffmpeg to transcode your audio from FLAC to PCM and then mux it into your transport stream.
Your audio transcode (FLAC to PCM) is lossless.

How to detect the audio availability in the SUSE Linux system

I got some audio pieces in flv format. Each of them is about 10 seconds long.
My question is how to detect whether the audio pieces has "sound", in other words, sometimes the audio pieces has no sound even the size of it is not 0 byte, so how to find those broken/silent audio files by some linux tool/command?
Maybe ffplay can do this? any available advice?
If you want to quickly check if the stream is video only, audio only or if it contains both audio and video, try hexdump -C filename | head. The fifth byte contains information about the contents of the file.
0x01 - video only
0x04 - audio only
0x05 - audio + video
You can also try to play the file using VLC media player. There is a menu option that enables informational messages from the media being played back.

Resources