Opened 3 years ago

Closed 3 years ago

#5630 closed defect (invalid)

crop filter no longer outputs images of 1 pixel height

Reported by: dericed Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: crop, regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Until recently, the crop filter could be used to output a 1 pixel high image (provided the input did not have chroma subsampling). To analyze individual lines of video I could use crop to output one pixel row to pass to other filters such as waveform. In git-master, the crop filter no longer outputs 1 pixel high images.

How to reproduce:

ffplay -f lavfi -i testsrc -vf "format=yuv444p|yuva444p10be|rgb24,crop=w=iw:h=1:x=0:y=20"
ffplay version git-2016-06-10-d4cd8e7 Copyright (c) 2003-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-ffplay --enable-vda
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 46.100 / 57. 46.100
  libavformat    57. 37.101 / 57. 37.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 46.101 /  6. 46.101
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[ffplay_crop @ 0x7fab0ae28560] Invalid too big or non positive size for width '320' or height '0'
[ffplay_crop @ 0x7fab0ae28560] Failed to configure input pad on ffplay_crop

Although the requested height is '1', the filter reports on height as 0.

Change History (3)

comment:1 Changed 3 years ago by cehoyos

The following works fine here, do I miss something?

$ ffmpeg -f lavfi -i testsrc -vf crop=320:1 -vframes 1 out.png

I believe ffplay never supported showing anything with a height of 1.

comment:2 Changed 3 years ago by dericed

Thanks Carl, you're right. If anyone needed to emulate playback of a single line the scale filter could be used to scale it to 2.
Such as

ffplay -f lavfi -i testsrc -vf "format=yuv444p|yuva444p10be|rgb24,crop=w=iw:h=2:x=0:y=20,scale=iw:2:flags=neighbor"

comment:3 Changed 3 years ago by dericed

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.