0

How can I play the audio backwards with ffplay?

ffplay -af reverse file.mp3 gives the error "Media type mismatch between the 'ffplay_abuffer' filter output pad 0 (audio) and the 'Parsed_reverse_0' filter input pad 0 (video)"

theonlygusti
  • 11,032
  • 11
  • 64
  • 119
  • you also need the `areverse` filter to reverse the channels of the audio stream I think – Gandhi Dec 08 '22 at 16:13
  • @Gandhi `ffplay -af areverse ../file.wav` doesn't error, it opens the player, but also doesn't play for more than 0 seconds (seems frozen) – theonlygusti Dec 08 '22 at 16:22
  • well another less elegant solution would be to reverse the audio, safe it as a new file and play that after that: `ffmpeg -i test.mp3 -af areverse test2.mp3` and `ffplay -i test2.mp3`, but I dont know if you want that... – Gandhi Dec 08 '22 at 16:54

1 Answers1

1

Pass a filtergraph to the libavfilter input virtual device:

ffplay -f lavfi amovie=file.mp3,areverse
seeker
  • 806
  • 4
  • 7