Skip to content

Instantly share code, notes, and snippets.

@netskink
Last active June 14, 2019 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netskink/e9c079dcce69be045cbd39f0c6d89d4f to your computer and use it in GitHub Desktop.
Save netskink/e9c079dcce69be045cbd39f0c6d89d4f to your computer and use it in GitHub Desktop.
Huo-Yang/tmp$ ls -l *.wav *.pcm
-rw-r--r-- 1 davis wheel 65536 Jun 14 15:48 2019-06-03T17:43:58Z_3C:71:BF:74:7A:38_-Lf4wfDPso_1-irABeRt.pcm
-rw-r--r-- 1 davis wheel 65638 Jun 14 15:48 2019-06-03T17:43:58Z_3C:71:BF:74:7A:38_-Lf4wfDPso_1-irABeRt.wav
-rw-r--r-- 1 davis wheel 65536 Jun 14 15:48 2019-06-03T17:44:11Z_3C:71:BF:74:7A:64_-Lf4wfDPso_1-irABeRt.pcm
-rw-r--r-- 1 davis wheel 65638 Jun 14 15:48 2019-06-03T17:44:11Z_3C:71:BF:74:7A:64_-Lf4wfDPso_1-irABeRt.wav
-rw-r--r-- 1 davis wheel 65536 Jun 14 15:48 2019-06-03T17:44:15Z_3C:71:BF:74:7A:38_-Lf4wfDPso_1-irABeRt.pcm
-rw-r--r-- 1 davis wheel 65638 Jun 14 15:48 2019-06-03T17:44:15Z_3C:71:BF:74:7A:38_-Lf4wfDPso_1-irABeRt.wav
-rw-r--r-- 1 davis wheel 64000 Jun 14 15:48 mix.pcm
-rw-r--r-- 1 davis wheel 64102 Jun 14 15:48 mix.wav
Huo-Yang/tmp$
#!/bin/bash
ffmpeg -f s32le -ar 16k -y -i /tmp/three.pcm -c:a pcm_s32le /tmp/three.wav
ffmpeg -f s32le -ar 16k -y -i /tmp/2019-06-03T17:44:28Z_A4:CF:12:19:D1:84_-Lf4wfDPso_1-irABeRt.pcm -c:a pcm_s32le /tmp/2019-06-03T17:44:28Z_A4:CF:12:19:D1:84_-Lf4wfDPso_1-irABeRt.wav
ffmpeg -f s32le -ar 16k -y -i /tmp/2019-06-03T17:44:10Z_A4:CF:12:19:D1:84_-Lf4wfDPso_1-irABeRt.pcm -c:a pcm_s32le /tmp/2019-06-03T17:44:10Z_A4:CF:12:19:D1:84_-Lf4wfDPso_1-irABeRt.wav
#!/bin/bash
ffmpeg -y -i /tmp/2019-06-03T17:43:58Z_3C:71:BF:74:7A:38_-Lf4wfDPso_1-irABeRt.wav -i /tmp/2019-06-03T17:44:15Z_3C:71:BF:74:7A:38_-Lf4wfDPso_1-irABeRt.wav -i /tmp/2019-06-03T17:44:11Z_3C:71:BF:74:7A:64_-Lf4wfDPso_1-irABeRt.wav -filter_complex "[0]adelay=0.0|0.0, volume=3[s0]; [1]adelay=0.6595545560942072|0.6595545560942072, volume=2[s1]; [s0][s1]amix=inputs=2:duration=first:dropout_transition=0,dynaudnorm[mixout]" -map [mixout] -t 1 -c:a pcm_s32le /tmp/mix.wav
#!/bin/bash
ffmpeg -y -i /tmp/mix.wav -f s32le -ar 16k -acodec pcm_s32le -ac 1 /tmp/mix.pcm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment