1

i tried to modify a already existing code for ffplay for hours, but I could not get it. I could not find a manual for vertical and horizontal stacking parameters. I’m always getting invalid argument errors when I try to adopt it to my needs. So I’m asking here for help.

My idea is based on that: ffplay / ffmpeg setup table with audio and video filters

The working code that I modified a little but want to modify further without luck is:

ffplay -f lavfi \
         "amovie=in.mp4,asplit=3[sv][eb][av]; \
          [sv]showvolume=b=4:f=0:ds=log:c=VOLUME:w=720:h=68[sv-v]; \
          [eb]ebur128=video=1:size=720x540:meter=18[eb-v][out1]; \
          [av]avectorscope=s=720x540:zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7[av-v]; \
          [sv-v][eb-v][av-v]vstack=3[1c]; \
          movie=in.mp4,split=4[v][wf][wfc][vs]; \
          [wf]waveform=m=1:d=0:r=0:c=7[wf-vus]; \
          [wf-vus][v]scale2ref=iw:1220-ih[wf-va][sig]; \
          [wf-va]setsar=1[wf-v]; \
          [wfc]waveform=m=0:d=0:r=0:c=7,scale=610x610,setsar=1[wfc-v]; \
          [vs]vectorscope=m=color3:g=color,scale=610x610,setsar=1[vs-v]; \
          [sig][wf-v]vstack[2c]; \
          [wfc-v][vs-v]vstack[3c]; \
          [1c][2c][3c]hstack=3,scale=1920:-1[out0]"

I’d like to change it to that style - I'm not yet allowed to post images directly in this question, so I need to link it:

Link to image how I'd like the layout to be

I’d like to have the video shown in 1920x1080 (keeping aspect ratio, downscale if necessary).

1 Answers1

1

Use

ffplay -f lavfi \
         "amovie=in.mp4,asplit=3[sv][eb][av]; \
          [sv]showvolume=b=4:f=0:ds=log:c=VOLUME:w=400:h=200[sv-v]; \
          [eb]ebur128=video=1:size=800x800:meter=18[eb-v][out1]; \
          [eb-v]scale=400x400[eb-v]; \
          [av]avectorscope=s=400x480:zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7[av-v]; \
          [sv-v][eb-v][av-v]vstack=3[1c]; \
          movie=in.mp4,scale=-1:1080[v]; \
          [1c][v]hstack=2[out0]"

The audio is assumed to be mono; for N channels, change showvolume h to N/200.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thank you for your superfast response, @Gyan! Your code gives me an error `Video size 400x400 is too small, minimum size is 640x480`. Which I think corresponds to the ebur128 window. When I change the ebur128 to `[eb]ebur128=video=1:size=640x480:meter=18[eb-v][out1]; \ ` I get an error `Input 1 width 640 does not match input 0 width 400`. Can you help, please? – user10104150 Jul 19 '18 at 09:44
  • Hi @Gyan, thanks for help, now I do get a different error: `[lavfi @ 0x7ffee3862a00] No such filter: ' '` - I studied the your code, could not find any mistake or space... Did copy/paste your code... Hmm... The "old" initial code that is too much for me still works. I'm running latest 4.0.1 – user10104150 Jul 19 '18 at 20:34
  • Sorry, there was some trailing whitespace; removed. – Gyan Jul 20 '18 at 04:56
  • Thank you very much @Gyan, that works perfectly for me now! – user10104150 Jul 20 '18 at 11:07
  • @gyan i only get errors saying "An input file must be specified" i cant get this to work at all. i know this is old but interested in similar – Dynamite Media Apr 13 '22 at 03:37
  • Add -report and rerun. Share link to report. – Gyan Apr 13 '22 at 04:27
  • https://pastebin.com/AGs93GHP i hope this is correct – Dynamite Media Apr 14 '22 at 22:18
  • Form the entire command on a single line after removing the \ – Gyan Apr 15 '22 at 04:30
  • https://pastebin.com/qHDfGnDN i also had the " " around the %video% and same error – Dynamite Media Apr 15 '22 at 05:25