SilSinn9801
30th May 2023, 04:55
Hello,
I have hundreds of one-minute-long MP4 files ripped from a WYZE security camera, & their monaural audio is encoded in A-Law ADPCM at 16000 Hz. I want to batch-decode the audio from all those 100s of MP4s to PCM (16-bit signed, little endian) & then batch-upsample from 16000 to 48000 Hz WITHOUT interpolation of any kind – that is, nearest-neighbor upsampling (instead of linear, cubic, or any other form of sample interpolation), & because 48000 is an integer multiple of 16000 (3× to be exact), the output should have no rounding errors. Effectively, I want each input sample value to repeat three times at the output before moving from one audio sample point to the next. The question is, how do I batch-do this in FFmpeg?
For context: trying FFmpeg’s -ar 48000 option always results in linear interpolation (or something close to it) between sample points, & trying instead -af aresample=isr=16000:linear_interp=0:osr=48000 also always results in linear upsampling (in spite of the linear_interp=0 part, unless that part means a different thing).
I have hundreds of one-minute-long MP4 files ripped from a WYZE security camera, & their monaural audio is encoded in A-Law ADPCM at 16000 Hz. I want to batch-decode the audio from all those 100s of MP4s to PCM (16-bit signed, little endian) & then batch-upsample from 16000 to 48000 Hz WITHOUT interpolation of any kind – that is, nearest-neighbor upsampling (instead of linear, cubic, or any other form of sample interpolation), & because 48000 is an integer multiple of 16000 (3× to be exact), the output should have no rounding errors. Effectively, I want each input sample value to repeat three times at the output before moving from one audio sample point to the next. The question is, how do I batch-do this in FFmpeg?
For context: trying FFmpeg’s -ar 48000 option always results in linear interpolation (or something close to it) between sample points, & trying instead -af aresample=isr=16000:linear_interp=0:osr=48000 also always results in linear upsampling (in spite of the linear_interp=0 part, unless that part means a different thing).