[FFmpeg-trac] #7818(avfilter:closed): crop filter can't do single pixel width
FFmpeg
trac at avcodec.org
Thu Mar 28 19:47:52 EET 2019
#7818: crop filter can't do single pixel width
-------------------------------------+------------------------------------
Reporter: adaerr | Owner:
Type: defect | Status: closed
Priority: minor | Component: avfilter
Version: git-master | Resolution: invalid
Keywords: crop filter | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+------------------------------------
Changes (by Gyan):
* priority: normal => minor
* resolution: => invalid
* status: new => closed
* component: ffmpeg => avfilter
Comment:
The crop filter, by default, constrains output dimensions, taking into
account the chroma subsampling scheme of the input. For the common 4:2:0
format, each dimension needs to be even, so, crop will round down odd
values. For the case of width 1, that's rounded to 0, which is, of course,
invalid. Your input is probably 4:2:2, for which there is no constraint on
values for height.
To override this behaviour, set option exact to 1 i.e.
`-vf "crop=1:70:exact=1"`
Although you'll get an error from encoders like x264 which require even
dimensions for 4:2:0 input. JPEG output should be fine.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7818#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list