Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I m trying to convert mp4 video file to avi file with

ffmpeg -i 10.mp4 -vcodec mpeg4 -vtag XVID -b 990k -bf 2 -g 300 -s 640x360 -acodec libmp3lame -ab 128k -ar 48000 -ac 2 -pass 2 -f avi 10.avi

but I get the following error

Cannot read file 'ffmpeg2pass-0.log': No such file or directory
Error reading log file 'ffmpeg2pass-0.log' for pass-2 encoding

any suggestion to avoid this problem?

share|improve this question
This is probabely an error with the rights of the folder you're working in. Try browsing to your home folder, or run it as root. – Pieter Vandamme Mar 20 '13 at 17:27
Remember to always include the complete ffmpeg console output(s) with your command(s) when asking questions about ffmpeg cli usage. – LordNeckbeard Mar 20 '13 at 22:24
up vote 4 down vote accepted

You're doing a two pass encoding, but you haven't made a first pass yet (which would have created the log file). Besides, you're using some options which are ambiguous.

If you don't need a specific target file size, a two pass encode is unnecessary.

Try this:

ffmpeg -i 10.mp4 -c:v mpeg4 -vtag xvid -qscale:v 3 -c:a libmp3lame -b:a 128k -vf scale=640:360 10.avi

-qscale:v 3 specifies the desired video quality, 1 would be very high quality / big file size, 31 the lowest quality / small file size

For a 2 pass encoding, see the example in the ffmpeg wiki.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.