How to convert flv to avi using ffmpeg high quality

60,018

Solution 1

That's the command I was using for a ffmpeg project, the quality should be good enough. If not, try increasing the bitrate (-b argument):

ffmpeg -i input.flv -ar 22050 -b 2048k output.avi

Solution 2

This is a Good solutions

ffmpeg -async 1 -i inputVideo.flv -f avi -b 700k -qscale 0 -ab 160k -ar 44100 outputVideo.avi

Or Used following one

ffmpeg -loglevel 0 -async 1 -i inputVideo.flv -f avi -b 700k -sameq -ab 160k -ar 44100 outputVideo.avi

Solution 3

There is also another solution found on the internet and works like charm!

Just use same quality parameter -sameq.

ffmpeg.exe -i video.flv -sameq outputVideo.avi

Actually the command sameq is not same quality. In order to successfully do it this one must be applied: in case you have multiple files to do here is the complete command

for %i in (*.flv) do ffmpeg -i "%i" -q:a 0 -q:v 0 "%i".avi

Solution 4

To preserve quality use -qscale 0.

For example ffmpeg.exe -i InputVid.avi -qscale 0 OutputVid.mp4

I converted my 1.64 GB avi video to 4.35 MB mp4 file.

Share:
60,018
Naota
Author by

Naota

Updated on October 26, 2020

Comments

  • Naota
    Naota over 3 years

    Need to convert flv files to avi or mov, trying out ffmpeg but the output quality is terrible. How can I get the video output to be on par quality with the source?

    I thought ffmpeg -i name.flv -s 320x... name.avi would do it, but no good.

  • CaptainProg
    CaptainProg over 11 years
    This does NOT mean 'same quality': ffmpeg.org/trac/ffmpeg/wiki/…
  • Optimus Prime
    Optimus Prime almost 11 years
    it tells me -b is ambiguous. Use -b:v or -b:a instead. What's this?
  • Qantas 94 Heavy
    Qantas 94 Heavy almost 11 years
    @OptimusPrime: that's the video/audio bitrate respectively (if anyone else was also confused).
  • Ash
    Ash over 10 years
    +1, the first command above is the only one that worked for me, others either had "invalid parameters" or seg faulted.
  • samnaction
    samnaction about 10 years
    But the file size is so high. Anyway to reduce the file size without compramising quality. My video file mostly contains texts
  • Luca Davanzo
    Luca Davanzo about 10 years
    this is THE solution! ,)
  • Tenaciousd93
    Tenaciousd93 over 9 years
    +1 thanks to your second solution that I updated in ffmpeg -i input.flv -async 1 -f avi -b 700k -qscale 0 -ab 160k -ar 44100 outputVideo.avi. I convert a 100 mins flv video of 270mb to 1.5 GB avi file with the same quality. :)
  • SYK
    SYK about 9 years
    Also works for me for avconv -async 1 -i in.mp4 -vf "transpose=1" -f avi -b 700k -qscale 0 -ab 160k -ar 44100 out2.avi
  • Iulian Onofrei
    Iulian Onofrei about 9 years
    "Option 'sameq' was removed. If you are looking for an option to preserve the quality (which is not what -sameq was for), use -qscale 0 or an equivalent quality factor option."
  • llogan
    llogan over 6 years
    -qscale is ignored by libx264 which, if available, is the default encoder for MP4 output. Use -crf instead if using this encoder. Since it is ignored I'll assume the default of -crf 23 was applied in your case.
  • Alec Istomin
    Alec Istomin over 4 years
    -q:a 0 -q:v 0 is the answer in 2020