About encoding FFMPEG and CRON |
[eluser]yannyannyann[/eluser]
I everybody, My system is providing the user a form to upload a video. After file has been uploaded I'd like to add it to a queue for files to be processed. The process is converting video file into FLV using FFMPEG. So far so good, but I have had information about CRON JOBS, CURL, ... Is it necessary ? I don't want the user to wait the encoding time, but give hime the opportunity to continue navigation... Could you help me understand this as i have no experience in using these tools ? thanks in advance, Yann
[eluser]yannyannyann[/eluser]
Precision : it's just for an administrator, there are not multiple users using the encoding tool....
[eluser]bapobap[/eluser]
Basically if you have your scripts encode the file upon upload, the user will be hanging around in their browser for your server to get it done. If you have lots of this happening at the same time on one server, people will be doing a lot of waiting around. Using something like cron, you can just take the uploaded file and put it in an encode queue. You'll then have another script come along every minute, grab some files to encode, encode them then make them available. The user won't be hanging around while this happens, as it goes on in the background. A daemon is a step further again: http://ffencoderd.sourceforge.net/ Hope that helps.
[eluser]yannyannyann[/eluser]
I'd like to encode videos and audio files as well, example: MOV -> FLV WAV -> MP3 ffencoderd is able to deal with audio files as well ?
[eluser]bapobap[/eluser]
I'm pretty sure ffmpeg can handle most things, give it a go and see what happens!
[eluser]yannyannyann[/eluser]
Ok Encoding with FFMPEG works but I don't have any duration information in my FLV, as indicated here with this command : Code: $ ffmpeg -i apple-ipodshuffle-guidedtour-us-848x4801_112_2009-03-31.flv Code: FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. I don't understand ... this is the kind of command I'm typing : Code: ffmpeg -i Sequence_6_60_2009-03-81_117_2009-03-31.mov -ar 11025 -ab 64000 -r 25 -s "400x300" -f "flv" -b "300000" -y ../flv/Sequence_6_60_2009-03-281_117_2009-03-31.flv Code: [libmp3lame @ 0x1806400]lame: output buffer too small (buffer index: 8359, free bytes: 1433) I have sound , video, ... works fine... just no duration info !!! ![]() ![]() Do you think it's LAME that is not setting the duration info ? I have version 3.98.2 I would love it if you have any idea about that... Thanks in advance.
[eluser]omar-303[/eluser]
i think it's something about meta-info of the FLV file , google it
[eluser]oll[/eluser]
I developed exactly this kind of site with CI and ffmpeg. (a youtube like site for my job) You have to detach the process from PHP using 'nohup &' : http://en.wikipedia.org/wiki/Nohup If you robust enough with Unix (Linux), you can also 'ajaxize' the log from ffmpeg so that the user knows if his video is processing or if there were an error. |
Welcome Guest, Not a member yet? Register Sign In |