Reputation: 19837
I have this command that is using a unix pipe
system("curl " . escapeshellarg($flv['dl']) . " | ffmpeg -f flv -i - -f mp3 -ab 320k pipe:1");
what could I do to make the same thing happen in windows?
Thanks
Upvotes: 2
Views: 312
Reputation: 1529
If you are not concerned with performance, the easiest way to port a unix script to windows is by installing cygwin.
It's a Unix API emulation layer over Windows likewise Wine emulates win32 on linux.
You could also download windows version of each command line tools
This approach requires to find specific download url for each tool and sometimes even leads you to compile binary from source code ! It is still reasonable when you only need 2 or 3 tools. But otherwise, it is so uncertain and time consuming that you should only consider when performance or low dependancy deployment is an issue.
Upvotes: 4
Reputation: 477
Sending the file downloaded by curl to ffmpeg by pipe is the best way, I think.
curl "http://domain.com/file.flv" | ffmpeg -f flv -i - -f mp3 -ab 320k pipe:1
curl & ffmpeg are available for windows.
Upvotes: 0