ffplay / ffmpeg setup table with audio and video filters

[亡魂溺海] 提交于 2019-12-08 07:33:13

问题


Regards ,

I want to create a table with ffplay, that display the audio and video monitoring, from a signal like this:

Unfortunately I can do only the video section:

ffplay  -i bar.mxf -vf "split=4[a][b][c][d],[d]vectorscope=m=color3:g=color[dd],[a]waveform=m=1:d=0:r=0:c=7[aa],\[b]waveform=m=0:d=0:r=0:c=7[bb],[c][aa]vstack[V],[bb][dd]vstack[V2],[V][V2]hstack"

I can't put together an audio filters with video filters, actually I can't even do the audio section, I've audio filters independent but I can't put it together.

SHOWVOLUME

ffplay -f lavfi "amovie=input.mka, asplit [a][out1]; [a] showvolume=f=255:b=4:w=720:h=68 [out0]"

EBUR128 LOUDNESS

ffplay -f lavfi -i "amovie=55.mp4,ebur128=video=1:meter=18 [out0][out1]"

AVECTORSCOPE

 ffplay -f lavfi "amovie=input.mp3, asplit [a][out1]; 
    [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]"
  1. How I can to set up the above table (audio and video) in a line of ffplay?

  2. Or, How I can to set up only the audio section in a line of ffplay?

Thank you a lot


回答1:


Here's the entire requirement in a single ffplay command:

ffplay -f lavfi  
         "amovie=in.mp4,asplit=3[sv][eb][av];
          [sv]showvolume=b=4: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=1280:-1[out0]"

The basic principle of the stack filters is that the dimension along which they are stacked should be the same, so scale filters have been applied as needed. The scale2ref is used for the middle waveform window so that the height of the [2c] matches that of [1c], when they are horizontally stacked. You'll have to make sure that the video's height is less than 1220. If not, scale [v] and feed that to scale2ref.

I suggest you supply smaller sizes in filters and scale, else you won't get close to realtime speed.



来源:https://stackoverflow.com/questions/38105069/ffplay-ffmpeg-setup-table-with-audio-and-video-filters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!