hi, i used wget & ffmpeg.. but this is not realtime there are sites like mp3ify.com that convert mp3 to flv directly from youtube without uploading it to there server... i was wondering is there a php script that can extract the audio from a video file, then use header functions to download it?? maybe there is a alternative.. like cgi or perl or something :S idk.. regards,
You'll need to use something like ffmpeg to do it since it's not supported directly within PHP. You could use PHP to call ffmpeg though via system()/exec()
but sites like mp3ify.com can do it 'realtime' ffmpeg is not realtime.. it converts a file from the server to a new file on the server :/ not a php header attachment converting it realtime
I recall modules in PHP like php-ffmpeg that allowed you to convert the file within PHP without calling it in system() or exec(). I've never looked into it to solve a problem I've had, so that's all I can say about it.
To me it looks like mp3ify.com converts it to a file on the server, then you click the 'download' button to retrieve the file. Either way, you could use exec() or system() to call ffmpeg when the user requests it, store it on the server and remove it after a period of time, say 10 minutes. This would give the same impression of being encoded dynamically for the user.