Jump to content

Getting ffprobe output into a Windows batch file


rbjtech

Recommended Posts

rbjtech

Just thought I'd share this - as I frequently write little scripts to process the output from ffmpeg/ffprobe in Windows batch files.   Yes I should be using PowerShell, but for the simple stuff, batch usually suffices.

The trick is to get ffmpeg/ffprobe to output MULTIPLE fields to a CSV format and then capture the std output for the batch file to use as variables.

I've split the file into Video, Audio and Subs - so you can see what's going on (I've just used common ffmpeg track variables, but there are 100's to use if you wish) - but you could do it all one command line if you wanted to.

Anyway - this is not a 'working' script - it's just an example of what you can do to capture the output from multiple fields in ffmpeg/ffprobe - and then go onto using them in your own script.

Hopefully useful to somebody .. :)

get_ffprobe_output_into_batch.bat.txt

Edited by rbjtech
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...