slackmart
slackmart

Reputation: 4924

Ffmpeg and mpeg trouble

I want to keep video quality when converting from one format to another, specifically from avi to mpeg. I have tried with the option offered ffmpeg target and I achieved the same quality of video but the resulting file size is large compared to the original, how I can reduce that size?

I've tried this:

ffmpeg -i input_file.avi -target ntsc-dvd output_file.mpeg

Upvotes: 1

Views: 296

Answers (2)

Jason B
Jason B

Reputation: 12975

What codec is used in the original? You may not be able to achieve the same quality/filesize point as the original if the codec used in the AVI is better than the MPEG-2 codec used in NTSC DVDs.

Also ntsc-dvd specifies a resolution as well. If it is higher than the AVI resolution, this will raise the filesize. If you don't need to hit the DVD resolution exactly, I would just keep the same resolution. You could do something like:

ffmpeg -i input_file.avi -vcodec mpeg2video -b 1000k outfile.mpg

The -b argument allows you to set the output video bitrate. I have found this to be the easiest parameter to adjust on when I want to try to get to the right quality/filesize tradeoff.

There are a lot of other advanced options that may help you get the filesize down while keeping the quality, but they usually are on the margins compared to the benefits you can get by reducing resolution or using a better codec like H.264.

Upvotes: 1

Maarten Klok
Maarten Klok

Reputation: 215

When you convert video there will always be a data loss. Especially when converting to mpeg and other ancient formats. Maybe F4V or MKV is usable?

Upvotes: 0

Related Questions