Four Tested FFmpeg Recipes for Video Audio and Channel Splitting
Run these commands with known input files, then compare your outputs with the recorded codec, sample rate and duration. The left and right WAVs from the tested channel-split command matched the reference samples exactly.
Downloads
Decode the first audio stream of a video to WAV
Use two-clap-reference.mp4 from the sync kit. The tested output was mono 16-bit PCM at 48 kHz. The decoder retained 16 ms of AAC padding past the 14-second picture. If your input has multiple audio streams, inspect the file and select the intended one.
ffmpeg -i two-clap-reference.mp4 -map 0:a:0 -vn -ar 48000 -c:a pcm_s16le soundtrack.wavCopy an AAC stream into M4A
Use the same MP4. This command keeps the AAC encode intact. Confirm the input codec is supported in the output container when using your own file.
ffmpeg -i two-clap-reference.mp4 -map 0:a:0 -vn -c:a copy original-audio.m4aSplit a stereo interview into mono channels
Use interview-stereo.wav from the interview kit. Each tested output kept the full 12 seconds and matched its corresponding mono reference sample-for-sample.
ffmpeg -i interview-stereo.wav -filter_complex '[0:a]channelsplit=channel_layout=stereo[left][right]' -map '[left]' -c:a pcm_s16le left.wav -map '[right]' -c:a pcm_s16le right.wavCut an excerpt and reduce its low frequencies
Use steady-hum-original.wav from the listening study. The tested command produced a two-second mono WAV. Listen to the change in wanted speech along with the change in the hum.
ffmpeg -ss 1 -i steady-hum-original.wav -t 2 -af 'highpass=f=100' -c:a pcm_s16le high-pass.wavInspect what was written
Replace soundtrack.wav with the output you want to inspect. The JSON download shows the results observed from these fixtures.
ffprobe -v error -show_entries stream=codec_name,sample_rate,channels,duration -of json soundtrack.wav