Thanks for the replies everyone. Aacini, I thought about it at first and didn't want to do an array, however, rethinking about it, it could become useful. And penpen, I haven't tried it yet, but will. But I'd like to first answer foxidrive.
foxidrive
Why do you need to do this? The answer to that will help to find a solution.
Since, I've finally got the contribution forum bug, I'll finally give a small bit of an introduction of myself, in order to answer your question. I've been writing bat scripts for myself and my job. It took awhile, but I'm finally getting the hang of it, and now I've really got a nerdy passion for it. When I create them for my job however, I really try to dumb it down. I've created menu's or really have it as hands off as possible for my coworkers who really don't have the time nor desire to understand the inner workings. That being said, I want to eventually learn visual basic and python so it's more GUI based instead of CMD as the window. Until then, I had an idea, one which has been brought up before in this forum, and one that was shut down pretty quickly as bad programming. Which I get. However, this is an instance where I'd like to do that, so my coworkers can have something a little bit better to look at.
So.. to answer your question.. I want to take the output of ffprobe.exe (which is ffmpeg a video/audio command line tool for those who don't know), and output it into a msgbox made by vbs rather than windows CMD. I don't know vbs at all, other than creating simple message boxes. So originally I was just going to make a bat file, run ffmprobe, and output the info to a txt file, get the entire output of the txt file as 1 variable, and use that and echo out a vbs file using that variable. One of the issues I'd have to deal with of course is how many characters and/or lines a msgbox can contain. I believe it's only a 1000 or around there, so getting rid of some of that verbose info might help, hence why aacini's suggestion might be helpful.
Currently, I stick my bat file in the "send to" folder. So someone can simply right click on a video or audio file, select the bat file from the "send to" and get the information of the file.
This is my current bat file:
Code: Select all
@echo off
title Multi Media File Information
For %%i in (%*) do (
title MultiMedia File Information %%i
C:\ffmpeg\ffmpeg\bin\ffprobe.exe -i %%i
)
pause
For those unfamiliar with FFMPEG it puts all of its text output to stderr, rather than stdout. It does this so that you can pipe the encoder output to other programs. So I've piped output to a txt file like this
Code: Select all
C:\ffmpeg\ffmpeg\bin\ffprobe.exe -i %%i > videoinfo.txt 2>&1
.. and this is where aacini's array idea actually made me realize doing it this way I could also get rid of some of the unnecessary verbose output.
So, that's what I got. Just trying to prettify a program for the coworkers and learn a little in the process.
I'm open to ideas on how to do this. If someone knows Visual Basic and can do the code without bat... I'm cool with that too, but I wouldn't have any input as I've said before, I don't know how. But would love to see it as I know it would help me understand it a bit better.
Thanks in advance for any help/suggestions!
Jules