Merge 2 audio files in sox

前端 未结 4 1019
旧巷少年郎
旧巷少年郎 2021-02-09 07:34

I am trying to merge 2 wave files into one file. The 2 files should start playing at the beginning of the new file. Independently of sound length. Running the following command

相关标签:
4条回答
  • 2021-02-09 08:10

    For cases like Calmarius is asking:

    sox -m in1.wav in2.wav out.wav trim 0 `soxi -D in1.wav`
    

    this stops at the length of in1.wav, for cases you know the shorter. Otherwise just add a comparator.

    0 讨论(0)
  • 2021-02-09 08:10

    Heythere. Sorry for late response =) Command should look like this

    sox file1 file2 file3
    

    Above will merge first two files and name it after 3rd.

    You also might wanna check the docs http://sox.sourceforge.net/sox.html

    0 讨论(0)
  • 2021-02-09 08:19

    'soxi -D in1.wav' gets the length of the file (in1.wav)

    0 讨论(0)
  • 2021-02-09 08:21

    just change -M with -m

    -M = merge
    -m = mix
    
    0 讨论(0)
提交回复
热议问题