You are not logged in.
Pages: 1
I've tried the version in community and also recompiled sox from git, but it just fails with error "formats: no handler for file extension `m4a'".
Does anyone know if there is a way to add m4a support, or if there is an alternative tool I can use to generate a spectrogram from bash?
Last edited by l0tek (2019-12-28 12:20:54)
Offline
Maybe read the file with faad and pipe the decoded audio to sox?
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Good idea, thanks.
Offline
Ok, I've tried:
faad -w -f 2 input.m4a | sox -V -t raw -n sinc 15-300 spectrogram -x 5000 -m -l -z 100 -o output.png
but sox says "ignoring `-t raw'" and "FAIL sox: Not enough input filenames specified" (the rest of the output is confusing to read, perhaps because of the piping)
Offline
You have to specify an input file, there is a special notation for stdin: "-".
https://jlk.fjfi.cvut.cz/arch/manpages/ … _Filenames
By the way, if you want to use raw pcm, then you'll have to set the same bit depth for both tools as well as the correct sample rate, encoding and channel count.
Last edited by progandy (2019-12-28 12:17:03)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Ah you're right, I forgot the "-". Thanks.
Closing, but if someone knows of a patch for native m4a support please let me know.
Offline
or if there is an alternative tool I can use to generate a spectrogram from bash?
How about:
ffmpeg -i file.m4a -lavfi showspectrumpic out.png
Offline
How about:
ffmpeg -i file.m4a -lavfi showspectrumpic out.png
Didn't know ffmpeg could do that, but it doesn't seem to have enough tunables for what I'm trying to accomplish with sox (see comment #4). Thanks anyway.
Offline
Pages: 1