Not to be confused with questions like this, I need to assign what the command outputs and not the actual command its self which is what I am currently getting from the aforementioned question. I am trying to use ffprobe to get the height of a given input file, then assigning what it finds to a variable (!height!) for later use.
Here is the code I have so far, it successfully runs the command, but when I test the value of !height! by printing it, I get the full ffprobe command that is being ran:
for /f "tokens=* usebackq" %%i in (
'ffprobe -hide_banner -v error -select_streams v -show_entries stream=height -of csv=p=0:s=x "!InFile!"'
) do (
set "height=%%i"
)
*!InFile!'s earlier context is the variable for whatever file is provided to the script when ran.
This will output something like: ~\MECHA.mp4 height: "C:\Programs\Media\ffmpeg\bin\ffprobe" -hide_banner -v error -select_streams v -show_entries stream height -of csv p 0:s x "MECHA.mp4" as one example, but what I need is what resolution information ffprobe would normally print from the given command.