inline Change Audio Sample-Rate

Originally published on May 1st, 2020 (Last updated on May 1st, 2020)

Some Video Edit­ing soft­ware, such as Sony Vegas and Adobe After­ef­fects have prob­lems sync­ing Audio/​Video if the Audio sam­ple rate isn’t 48kHz. The fol­low­ing com­mand re-encodes all Audio chan­nels in the input file to AAC and sets their sam­ple-rate to 48kHz:

# Re-Encode and Re-Sample Audio
ffmpeg -i <file> -map 0 -c:v copy -c:a aac -ar 48000 <out>.mp4

Note: Chang­ing the sam­ple-rate requires re-encod­ing of audio streams, oth­er­wise, the -ar option is ignored!


No com­ment sec­tion here 😄

You can reach me over at @knuth_dev or send me an Email.