windows - Understanding sox's progress details -


i'm trying trim silence mp3 file, , parse progress details:

g:\testing\test>sox -s trim.mp3 trim2.mp3 reverse silence 1 0.1 0.1% reverse  input file     : 'trim.mp3' channels       : 2 sample rate    : 44100 precision      : 16-bit duration       : 00:04:24.06 = 11644870 samples = 19804.2 cdda sectors sample encoding: mpeg audio (layer i, ii or iii)  in:100%  00:04:23.96 [00:00:00.09] out:11.6m [      |      ] hd:0.0 clip:400 sox sox: trim2.mp3: output clipped 400 samples; decrease volume? done.  g:\testing\test> 

i should able parse data, while taking out:11.6m data progress, file's filesize 4.03mb. perhaps data not output filesize?

how can correctly conclude progress of encoding task?

you right, out value not file size, number of samples. it’s approximately 11644870 samples mentioned in duration field: 264 seconds times 44100 samples per second. uncompressed output, file size proportional number of samples (e.g. @ 16 bits stereo, 4 bytes per sample, plus header size). compressed output, relationship less strict.

the out value not progress indicator, though. in case, due reversals, sox have processed audio before starts writing anything.

note sox works first converting input internal (pcm) representation, processing it, newly converting output format. since processing files lossily compressed, sound quality may suffer slightly, , more if re-process results (generation loss).


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -