[FFmpeg-user] Creating an advanced filter effect that repeats the outer pixels

Jesper Taxbøl jesper at taxboel.dk
Mon Jun 8 22:48:08 CEST 2015


Hmm. I have tried this pipeline which work.

/usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
"[0:v:0]crop=1440:2:0:720,scale=1440:1440[OUT]" -c:v libx264 -pix_fmt
yuv420p -preset ultrafast -tune fastdecode -tune zerolatency -map [OUT]
out.mp4


Then I try this one, which is scaling from 1440x1 to 1440x1440, it fails.

/usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
"[0:v:0]crop=1440:1:0:720,scale=1440:1440[OUT]" -c:v libx264 -pix_fmt
yuv420p -preset ultrafast -tune fastdecode -tune zerolatency -map [OUT]
out.mp4

ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers

  built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM
3.6.0svn)

  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid
--enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libfaac
--enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus
--enable-libquvi --enable-libx265 --enable-nonfree --enable-vda

  libavutil      54. 20.100 / 54. 20.100

  libavcodec     56. 26.100 / 56. 26.100

  libavformat    56. 25.101 / 56. 25.101

  libavdevice    56.  4.100 / 56.  4.100

  libavfilter     5. 11.102 /  5. 11.102

  libavresample   2.  1.  0 /  2.  1.  0

  libswscale      3.  1.101 /  3.  1.101

  libswresample   1.  1.100 /  1.  1.100

  libpostproc    53.  3.100 / 53.  3.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe6a300da00] UDTA parsing failed retrying raw

    Last message repeated 1 times

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.MP4':

  Metadata:

    major_brand     : mp42

    minor_version   : 0

    compatible_brands: isomavc1mp42

    creation_time   : 2015-06-03 16:28:40

    original_format : KODAK

    comment         : KODAK PIXPRO SP360

  Duration: 00:00:28.23, start: 0.000000, bitrate: 17023 kb/s

    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1440x1440, 15707 kb/s, 30 fps, 30 tbr, 30k tbn, 60k tbc (default)

    Metadata:

      rotate          : 270

      creation_time   : 2015-06-03 16:28:40

      handler_name    : DataHandler

      encoder         : h264

    Side data:

      displaymatrix: rotation of 90.00 degrees

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz,
stereo, fltp, 128 kb/s (default)

    Metadata:

      creation_time   : 2015-06-03 16:28:40

      handler_name    : DataHandler

[Parsed_crop_0 @ 0x7fe6a2f00820] Invalid too big or non positive size for
width '1440' or height '0'

[Parsed_crop_0 @ 0x7fe6a2f00820] Failed to configure input pad on
Parsed_crop_0

I dont think the output encoder is to blame as the output is 1440x1440 in
both cases. Could be an off by one error somewhere?

I have my workaround now, Ill just do it in two passes to get my single
pixel line stretched.

Kind regards

Jesper


2015-06-08 11:22 GMT+02:00 Moritz Barsnick <barsnick at gmx.net>:

> On Mon, Jun 08, 2015 at 09:59:08 +0200, Jesper Taxbøl wrote:
> > The 1440x1 is only used in the pipeline. The end result will be a
> > resulution around 1440x11440, so that should be fine for ffmpeg.
>
> It should work in a pipeline. What you are trying to is to encode it
> with libx264, that's the part that doesn't work. You should be able to
> note that, because you see the muxer complaining, and not the filter.
> :-)
>
> This works for me:
> $ ffmpeg -y -f lavfi -i testsrc=size=1440x1440  -t 10 -filter_complex
> "[0:v:0]crop=1440:1:0:720[OUT]" -map "[OUT]" -f null -
> and seems to produce a 1440x1 video stream (so I conclude that the crop
> filter doesn't seem to have a restriction).
>
> Expand your filter chain and let us know.
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
Jesper Taxbøl
+45 61627501


More information about the ffmpeg-user mailing list