[x264-devel] Error when height not divisible by 2

Jason Garrett-Glaser darkshikari at gmail.com
Fri May 28 01:01:01 CEST 2010


On Thu, May 27, 2010 at 3:42 PM, Ketil Froyn <ketil at froyn.name> wrote:
> Hi,
>
> I'm trying to use ffmpeg with x264 to create some h.264 video clips
> that are pretty small, just 144x81. When I try to create this with
> ffmpeg, I get this error:
>
> [libx264 @ 0x8902d10]width or height not divisible by 2 (144x81)
>
> However, I am able to generate clips with those dimensions with
> another commercial tool. Is there anything I can tune to get this to
> work with ffmpeg/x264? Here's my ffmpeg command line:

Such a resolution is not legal with YV12 in H.264.  There are only two
legal ways to generate such a stream:

1) Add container-level cropping beyond the bitstream-level crop flag.
No sane container should support non-mod2 cropping in YV12 either
though.
2) Encode in 4:2:2, which x264 doesn't support (nor does ffmpeg's decoder).

Dark Shikari


More information about the x264-devel mailing list