I encode a file with a special watermark for be downlaoded by the user
I would like to be able to start the downlaod when ffmpeg encode the file.
I have a php page which one create the water mark , launch ffmpeg and start the download with X-sendifle
The download don't start, adding sleep(15) let's the download start just I receive only what is done
Actually I use Apache2 as the webserver with X-sendfile mod
Okay I finally find how to do
Using X-sendfile it's a wrong idea
Using mp4 it's a wrong idea because at the end of the encodage the software rewrite 4 bytes at the beginning of the file
So this is the code I use for be able to send a file like webm or flv files when ffmpeg encode the output
I'm a noob for coding and got a problem with my "while" just the code work really good without any issue
Do not use filesize , this command don't like when a file change of size all time and return only 4096 in that case
The download will be slow , this is normal , you receive chunk by chunk what the software done like with ffmpeg the transfer is between 200 to 1200 kb/s