I get an error when trying to convert video

6,008

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:
6,008

Related videos on Youtube

Mohamed KALLEL
Author by

Mohamed KALLEL

Contact me on LinkedIn.

Updated on September 18, 2022

Comments

  • Mohamed KALLEL
    Mohamed KALLEL over 1 year

    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?

    • Pieter Vandamme
      Pieter Vandamme about 11 years
      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.
    • llogan
      llogan about 11 years
      Remember to always include the complete ffmpeg console output(s) with your command(s) when asking questions about ffmpeg cli usage.