Quote:
Originally Posted by iDeep
Hi,
I am using a PHP script which uses ffmpeg to convert flv videos to mp3, now the whole process takes a lot of time and I was thinking if this can be done in such a way that ffmpeg spits out converted mp3 output in real-time to users so they can start downloading files without waiting while the process completed in background.
Any pointers to other possible solutions would greatly help.
Thanks
|
So, to clarify, you want users to be able to start downloading a MP3 file before the FLV-to-MP3 conversion process completes?
If that is the case, my first question is: Have you tried this? Have you tried to push the MP3 download to the user immediately (or moments) after starting the FLV-to-MP3 conversion process (and after verifying that the new MP3 file exists)?
I really have no idea if this would work, but it would be cool if it did. It wouldn't be that hard to test, but I don't have time to do it now.
And if you aren't able to push the download right away, perhaps you could use some AJAX on a timer to periodically test to see if the new MP3 file is in a state in which it can be downloaded.
Again, exactly what "state" you are testing for and exactly what PHP functions you would use to do this, I'm not really sure.
You should Google for something like
this.
This
link looks promising.
Sorry I can't be of more help at the moment.