3

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?

  • Remember to always include the complete ffmpeg console output(s) with your command(s) when asking questions about ffmpeg cli usage. – llogan Mar 20 '13 at 22:24
  • 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

1 Answers1

4

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.

phoibos
  • 21,456