Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques Crop, scale and keep quality. Keep getting low bitrates

  • Crop, scale and keep quality. Keep getting low bitrates

    Posted by Fredric Luthman on May 24, 2013 at 6:03 am

    Hi,I have several videofiles which are supposed to be presented as 16:9 in a 1280×720 frame. Something has gone wrong in the digitalization and the aspect ratio has gotten wrong. I have figured out that I need to crop and scale. My source-file is h264 and has a video bitrate of about 3000k.

    ffmpeg-20130523-git-c54a156-win64-staticbin>ffmpeg -i source.mp4 -acodec copy -vcodec h264 -vf crop=1280:560,scale=1280:720 -qscale 0 -aspect 16:9 source.cropped.mp4

    This is the command I use, I though -qscale 0 would work, but the source.cropped-files has a bitrate of about 800k. I realize that I will loose some quality since I crop away 160 vertical pixels (the “black bars”).

    I guess I can specify a bitrate manually, but is there a better way?

    TiA!

    Lou Logan replied 13 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Lou Logan

    May 24, 2013 at 11:24 pm

    libx264 ignores “-qscale”. Use “-crf” instead as explained in the FFmpeg and x264 Encoding Guide.

    As a semi-related sidenote, as of 2013-04-18, you can use the “-aspect” option with “-vcodec copy” if you only need to change container aspect ratio:

    If -aspect is used together with -vcodec copy, it will affect the aspect ratio stored at container level, but not the aspect ratio stored in encoded frames, if it exists.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy