| | 161 | |
| | 162 | Given a media file with audio and video, play the video side by side with the audio's showcqt visualization: |
| | 163 | |
| | 164 | {{{ |
| | 165 | ffplay -f lavfi "movie=big_buck_bunny_480p_surround-fix.avi:streams=dv+da[v][a],[a]asplit=2[out1][a],[a]showcqt=s=400x900[vfun],[v]scale=-2:900[v];[v][vfun]hstack[out0]" |
| | 166 | }}} |
| | 167 | [[Image(showcqt-sidebyside.jpg,1080)]] |
| | 168 | |
| | 169 | Notes: Since we're using `hstack`, we must scale the input video so that its height is the same as the showcqt output height (900). The `asplit` filter is used to duplicate the audio stream. One stream is for listening during playback (`out1`), and the other stream (`a`) is consumed by the showcqt filter and turned into video (`vfun`). This is the [https://archive.org/download/BigBuckBunny/big_buck_bunny_480p_surround-fix.avi example video] used above. |
| | 170 | |
| | 171 | Here's another way to do the same thing with ffmpeg: |
| | 172 | |
| | 173 | {{{ |
| | 174 | ffmpeg -i big_buck_bunny_480p_surround-fix.avi -filter_complex '[0:a]showcqt=s=400x900[vfun],[0:v]scale=-2:900[v];[v][vfun]hstack[vo]' -map '[vo]' -map 0:a out.mp4 |
| | 175 | }}} |
| | 176 | |
| | 177 | |