I'm trying to analyze a spectrogram while simultaneously checking the video, without having to switch between them. Something like this, but with the video combined in the same output:

enter image description here

The idea is to be able to scrub through both video and the spectrogram so that they're synced. Most editing software only lets me see the waveforms. The command I used for that is as follows:

ffplay -f lavfi 'amovie=/Users/hdl/Desktop/HDLS3K.mp4, asplit [a][out1];
[a] showspectrum=size=1280x512:mode=separate:slide=scroll [out0]'
  • Depending on what your user case is, you may want to have a look at QCTools. Commented Jan 18, 2018 at 19:00

1 Answer 1



ffplay -f lavfi 'amovie=/Users/hdl/Desktop/HDLS3K.mp4:s=dv+da[v][a];[a]asplit[asp][out1];

amovie usually selects only one (audio) stream. dv+da gets it to extract the best video and the best audio stream. The video output is scaled so that the vstack works.

  • Thanks, this worked, but I did have to make a little change. Apparently it wants the spectrum size and scale set to the same value, else it spits an error. I set them both to 640 and that did it.
    – HDL
    Commented Jan 18, 2018 at 18:52
  • With this it seems like the spectrum visualization has a bit of a delay on it. Any tips for improving that?
    – Chris
    Commented Jun 17, 2020 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.