You can simply use a combination of the areverse
and atrim
filters. Use the areverse
filter to reverse the audio, and then use the atrim
filter to trim off the first 4 seconds (which is actually the last 4 seconds), and then use the areverse
filter again one last time and you're done.
ffmpeg -i input.mp3 -af areverse,atrim=4,areverse output.mp3