Now the process is: File upload Encode file with ffmpeg when file has been uploaded Can be done at the same time?, obviusly yes, but I don’t know how. The file upload process is by 8MB chunks stored in server, then, temporary I have videofile.ext.tmp that is growing up to final uploaded file. I read about ffmpeg -stream_loop or -loop