I have the following command line that gives me the duration of a video file:
ffprobe.exe -i Video.mp4 show_entries format=duration -v quiet -of csv="p=0"
When I run this, I get back the duration of my video successfully, running it from a command prompt. Now, I'm kind of a beginner with C++, so I'm not sure how I could get that duration to be put into a float inside of my program. I've looked through a lot of articles and question and answer forums online and I've found possible answers with...using stdout/stdin to grab the information...? I'm not sure.
My strategy right now is to use CreateProcess() to run the process, then WaitForSingleObject(), then somehow use some command to grab the output data from the ffprobe process. Perhaps the data I'm looking for can be retrieved through the CreateProcess() function? I feel like I'm very close, but I'm in serious need of help with this...
As a side note, since I'm using Visual C++ Express 2010, I do not have access to MFC.
If anyone could lead me in the right direction to this information it would be greatly appreciated.