Re: [FFmpeg-user] Dimensions of the input video as a variable
ffprobe can be used to get width and height for the showwaves size option. This set me on the rigth track! This is what my Windows batch file now looks like: SET FFM="c:\programme\ffmpeg\bin\ffmpeg.exe" SET FFP="C:\programme\ffmpeg\bin\ffprobe.exe" for /f "tokens=5 delims==_" %%i in ('%FFP% -v error -of flat^=s^=_ -select_streams v:0 -show_entries stream^=width %1') do set W=%%i for /f "tokens=5 delims==_" %%i in ('%FFP% -v error -of flat^=s^=_ -select_streams v:0 -show_entries stream^=height %1') do set H=%%i %FFM% -y -i %1 -filter_complex "[0:a]showwaves=s=%W%x%H%:mode=line,format=rgba[waves];[0:v]setsar=1:1,format=rgba[video];[waves][video]blend=all_mode='addition'" -c:v libxvid -c:a copy %~dpn1_wav%~x1 --- The line breaks stem from sending this per e-mail. Please note that the colour format must be set to rgba in order to make black background of the waves transparent. Thanks a lot! Wolfgang ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Dimensions of the input video as a variable
On Fri, Apr 28, 2017, at 05:27 AM, Wolfgang Hugemann wrote: > As you see, I supplied the dimensions of the input video (640x480) in > the command line. I would like to turn this into a more general script, > determining the dimensions of the input video on the fly, but how do I > do that? ffprobe can be used to get width and height for the showwaves size option. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Dimensions of the input video as a variable
On Fri, Apr 28, 2017 at 15:27:27 +0200, Wolfgang Hugemann wrote: > As you see, I supplied the dimensions of the input video (640x480) in > the command line. I would like to turn this into a more general script, > determining the dimensions of the input video on the fly, but how do I > do that? showwaves is an audio filter, it has no access to the dimensions of the video, unfortunately. Since its output is video though, you could in theory make it very large and then scale it down, but there's also no way for one video's filters (such as "scale") to know another video's dimensions. :( Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Dimensions of the input video as a variable
I would like to superimpose the audiograph of the video's audio on the video itself using 'blend'. I sucseeded in doing so with the line: c:\programme\ffmpeg\bin\ffmpeg -y -i test.avi -filter_complex "[0:a]showwaves=s=640x480:mode=line[waves];[0:v]setsar=1:1[video];[waves][video]blend=all_mode='lighten'" -c:v libxvid -c:a copy ovl.avi As you see, I supplied the dimensions of the input video (640x480) in the command line. I would like to turn this into a more general script, determining the dimensions of the input video on the fly, but how do I do that? I tried "s=wxh" and alike, by that doesn't seem to work. Wolfgang ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".