Kelly22 has asked for the wisdom of the Perl Monks concerning the following question:

I have two computers running the same version of Perl and the same version of ffmpeg. However on one the following line works and on the other it doesnt.

my @output =`ffmpeg.exe -i "$file" 2>&1`;

They are both running windows 7, but on one of them @output is empty after after running the line and on the other it has the output. Any idea what the problem could be?

Replies are listed 'Best First'.
Re: Capture ffmpeg output
by Anonymous Monk on Apr 03, 2012 at 21:21 UTC
    It could be %PATH%, permissions, ... broken quoting, things like that

      Yes - %PATH% settings was my first thought, also. Are you specifying a location for the exe in your code at all, or relying on Windows to find it?

      Easy enough test - drop into a random directory (which does NOT hold the ffmpeg.exe) on both PCs, and try running the exe from that path - I suspect you'll find it'll run on one but not the other. If that's the case, the below link has some pretty pictures to go along with tis write-up on how to add/modify entries to your path... in the first instance, I'd follow it on both PCs to the point where you can see the PATH and compare the two, and modify where appropriate.

      Note - as with modifying the registry, modifying the PATH settings CAN be detrimental (not as much as playing with the registry can be, but still worthy of caution) to the performance of your Windows install. A good pinch of caution is always advisable.

      http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/