1

I have a video which has a resolution of 1920x1080p. I want to re-encode this video (with libx264 for video and aac for audio); Downscale it first to 1280x720p (with the same aspect ratio) while using a different video bitrate (1900 kbps) and audio bitrate (96 kbps). Also I want to change from mkv to mp4. I don't want to change anything of the previous encoding settings (Just the bitrate, and the video size). I want to use variable bitrate (in video and audio), but I don't know how to put it in FFmpeg (I have the latest version 3.0- Windows 7). To get better quality, is it of any use to put a CRF value along with the variable bitrate (and if yes, how can I do that)? Also if I want to downscale it to 480p how can I do that and keep the aspect ratio intact?

One more thing; What is "maxrate", "minrate" and "bufsize" and where can I use these? I think I have seen that CRF uses VBR, but in one article the above were used (for VBR), so I can't tell exactly what to use to get a smaller file size by just decreasing the bitrate (and the video size, if possible).

Also I don't know if VBR mode is proper for the goal I want to achieve, but I have read it's the best mode.

Thank you for your time!

2
  • Why are you wanting to re-encode in the first place?
    – llogan
    Commented Mar 7, 2016 at 3:40
  • I want to get a smaller file size
    – KLNy
    Commented Mar 7, 2016 at 22:28

1 Answer 1

1

You have asked many questions here, but I think you're overthinking it.

Just use -crf and -preset. Use the highest -crf value that still provides an acceptable output and the slowest -preset you have patience for. See FFmpeg Wiki: H.264 Video Encoding Guide for more info.

As for scaling, just use the scale filter like this: -vf scale=1280:-2 or -vf scale=480:-2. The -2 will tell the filter to preserve aspect and slightly adjust the output if necessary to make it divisible by 2 which is required by x264 for output with YUV 4:2:0 chroma subsampling.

4
  • Thank you very much. Are these the same; -preset:v slow and -preset slow? And for the audio? Which of these should I use; -vbr or -b:a?
    – KLNy
    Commented Mar 8, 2016 at 22:10
  • @KLNy -preset and -preset:v are basically the same. One just has a stream specifier to ensure that ffmpeg knows to apply the option to video and not audio, etc (although I don't think there are any audio encoders that use -preset); if in doubt use -preset:v. If you're using libfdk_aac audio encoder, use -vbr, otherwise use -b:a. See FFmpeg Wiki: AAC.
    – llogan
    Commented Mar 9, 2016 at 1:35
  • I read also about -q:a for variable in aac; Can I use this (the values?)?
    – KLNy
    Commented Mar 9, 2016 at 13:40
  • @KLNy Yes. See FFmpeg Wiki: AAC for more info.
    – llogan
    Commented Mar 9, 2016 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .