V
V
verycooldev2018-06-30 22:10:44
fmpeg
verycooldev, 2018-06-30 22:10:44

How to fix width not divisible by 2 leaving the resolution?

I get an error

[libx264 @ 0x1b64f80] width not divisible by 2 (195x130)
Output #0, mp4, to 'mp4/ttt.mp4':
    Stream #0:0: Video: h264, none, q=2-31, 128 kb/s, 14.29 fps
    Metadata:
      encoder         : Lavc56.60.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (gif (native) -> h264 (libx264))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

I find solutions that offer to completely change the resolution. How not to do it? How easy is it to add or remove a pixel to an existing resolution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2018-06-30
@verycooldev

The h264 codec requires only even width and height dimensions.
Add ( scale ) or remove ( crop ) 1 pixel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question