I'm having a hard time converting a mp4 file... every time it outputs as an empty file. Here's my command line : ffmpeg -i video1.mp4 -vcodec libx264 -pass 2 -r 29.97 -b 4000 -s 1280x720 -acodec libfaac -ab 192 -ar 48000 -ac 2 video2.mp4 ffmpeg as worked before and I did not change the configuration of the server nor php since. The permissions allow for rwx (777) Please help
The thing is that it has to be done server-side... we already have programs to do compressions, but we decided to switch to ffmpeg so we can manipulate the files at the same time and save time. I've already worked out the php program and the line for most of the compressions we have to do (7 in total). I've checked with the lead programmer in charge of the server and he told me that the ffmpeg presets were enabled as well as libx264. It's the only codec im having trouble with... any ideas ?
I've found the problem, after completing all the other compressions, I've found that the bitrate for the second pass has to be in bits and equal or greater than the first pass bitrate or else it returns an empty file. Plus, if you set your bitrate in bits (instead of kbits) you will have to write the audio bitrate in bits as well. The documentation about 2 pass rendering is pretty rare D:
The value for -b changes from version to version. For example, in version 0.5, it uses bits/sec and in version SVN-r6179, it is kbit/s. See FFMPEG Command Line Arguments with two EXEs of those versions. GUI version is not used when we use ffmpeg for server side encoding.
My suggestion is not to go with 2 passes, since it is not worth of CPU time. Just raise the bitrate a bit and you will be satisfied with results.