[FFmpeg-devel] Is it legal to modify h264 sps for cropping

Hendrik Leppkes h.leppkes at gmail.com
Fri Apr 21 17:15:45 EEST 2017

On Fri, Apr 21, 2017 at 3:34 PM, Xiaolei Yu <dreifachstein at gmail.com> wrote:
> Some android devices do not properly align the input surface of MediaCodec (Nexus 4, Galxy Note 2) and
> we are forced to specify a multiple of 16 as the video width. A possible workaround is to insert the desired crop
> into the output sps, but I am not sure if it is legal.

H.264 always has a coded dimension which is a multiple of 16, and any
smaller granularity on actual dimensions is achieved with cropping

- Hendrik

More information about the ffmpeg-devel mailing list