avconv converting videos in really bad quality

I have this linux command line app called avcon. It is used to converting files. For instance if I have a file called video.mp4 I can run avconv -i video.mp4 video.ogg and it will convert this video.mp4 to video.ogg.

So my problem(question): Whenever it converts any file the output file's quality is super bad compared to the original video (the input video). How can I get around with that? I mean how can I convert the file and still get the same quality?

If this is not possible using this app. Can anybody suggest anything else for converting video files using the command line?


You can adjust the video quality using the -qscale flag for that command. Using -qscale 1 should provide the best quality and if you do not use this flag, the result is usually terrible quality. Try using this instead:

avconv -i video.mp4 -threads auto -qscale 1 -aq 1 video.ogg

I've also included a flag to optimize use of multiple threads and another to maximize audio quality.