|
From: Peter S. <ps...@nu...> - 2012-12-31 01:46:39
|
Ulrich Klauer [ul...@ch...]: >So a faster version is: >sox test.wav -n trim 0:00 3:00 remix 1 rate 16k spectrogram -m -l -x >5000 -y 1023 -o spectrogram1.png >(The last point is the most important. In an example I ran, -y 642 >took 110 seconds, while -y 1025 only took 9. And I don't mean 109, but >9.) I'm not seeing such big differences. I get 21 seconds for -y 642, and 15 for -y 1025. It's only 6 for -y 513, but it's still not the 11x difference you're seeing. Maybe something to do with the complexity of the audio file? >> I'll join these images together to form one long one. >> I.e. I have to manually create a command per 3 minute segment. Is >> there a better way? ... Can I use the newfile and restart effects to >> do it in one command without generating intermediate files? > >Not directly, because the spectrogram output will use the same file >name each time, overwriting the previous output. (You could write to a >named pipe, though, or something like that.) That's a pity. I saw how easy it is to use: trim 0 3:00 : newfile : restart to split it into 3 minute files and hoped spectrograms could be done in a similar way. >Probably the easiest way is to lift the width limit of 5000 pixels, as >it appears to be arbitrary. I don't know if there is a real limit >(imposed by PNG/libpng perhaps?), but I changed it to 20000 in the >source code and that seems to have worked. How many pixels do you need? That's tempting, but every time I get involved in recompiling, it ends up as a series of brick walls till I give up (I'd need a Windows version). 50,000 should do for 30 minutes, but I might need perhaps 4 or 6 times that, assuming png format will allow it. It might be that I'll need to do it in pages anyway, and I'd rather use an off the shelf version so I can forward instructions for my procedure to others. |