Get result value from exe as parameter

hi, sorry if this question is cmd batch, and for my bad English,
I got some code from : How to determine video codec of a file with FFmpeg - Stack Overflow

ffprobe -v error -select_streams v:0 -show_entries stream=codec_name \
  -of default=noprint_wrappers=1:nokey=1 video.mkv

Will in my case return:


that I like to know is: how to get that “h264” result as if a condition like this:

if result == "h264" echo the codec is h264
else echo the codec is NOT h264

Thanks for reading, have a nice day

As this forum is a dedicated PowerShell forum and you’ve found the source you’re refencing to on StackOverflow anyway why don’t you ask your question on StackOverflow? :wink:

as I said before, my English is bad, I always failed that grammar test

It is good enough to answer your question here. So it will be enough to answer your question there. :wink:

And it is not that bad. :+1:t4:

And you could get some help from a translation service like

do you ever ask in that forum?
I using firefox add-on “Grammarly” and still failed,

to be honest, it will be nice if you give me the google keyword:
please google XXX or google ZZZ

Of course.

That does not matter. You come to get help - not to make an english test. :wink:

I don’t understand what you mean. Just ask you question on StackOverflow and make sure you add the tag “cmd” to your question. They will help you. :+1:t4:

this conversation will not move to anywhere :frowning_face: