0

I'm trying to transcode(below just copy) a/v streams from stdin and generate a thumbnail simultaneously. The issue that I get an error pipe:: Invalid data found when processing input.

Why is that and how can I fix it? Separately the map commands work just fine so I assume I'm incorrectly using the pipe functionality.

cat a2.mkv |ffmpeg -i - -y -map 0:0 -c:0 copy -f matroska 0.mkv -i - -y -map 0:0 -vf "select=gt(scene\\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 -codec png -f image2pipe 0.png
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, matroska,webm, from 'pipe:':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2017-03-11T02:56:50.000000Z
  Duration: 02:12:52.39, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 520.270000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 520.270000, end 1135.718000
    Metadata:
      title           : 00:08:40.270
    Chapter #0:2: start 1135.718000, end 1703.660000
    Metadata:
      title           : 00:18:55.718
    Chapter #0:3: start 1703.660000, end 2314.187000
    Metadata:
      title           : 00:28:23.660
    Chapter #0:4: start 2314.187000, end 2888.594000
    Metadata:
      title           : 00:38:34.187
    Chapter #0:5: start 2888.594000, end 3499.246000
    Metadata:
      title           : 00:48:08.594
    Chapter #0:6: start 3499.246000, end 4154.692000
    Metadata:
      title           : 00:58:19.246
    Chapter #0:7: start 4154.692000, end 4646.392000
    Metadata:
      title           : 01:09:14.692
    Chapter #0:8: start 4646.392000, end 5373.660000
    Metadata:
      title           : 01:17:26.392
    Chapter #0:9: start 5373.660000, end 5882.085000
    Metadata:
      title           : 01:29:33.660
    Chapter #0:10: start 5882.085000, end 6627.871000
    Metadata:
      title           : 01:38:02.085
    Chapter #0:11: start 6627.871000, end 7144.471000
    Metadata:
      title           : 01:50:27.871
    Chapter #0:12: start 7144.471000, end 7451.944000
    Metadata:
      title           : 01:59:04.471
    Chapter #0:13: start 7451.944000, end 7972.394000
    Metadata:
      title           : 02:04:11.944
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x300 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : X264
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
pipe:: Invalid data found when processing input
2
  • try to add --nostdin
    – bukkojot
    Commented Sep 12, 2017 at 7:50
  • It errors out. See below. Also how could nostdin work if I feed ffmpeg from stidin? cat a2.mkv |ffmpeg -i - -y -map 0:0 -c:0 copy -f matroska 0.mkv -i - -y -map 0:0 -vf "select=gt(scene\\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 -codec png -f image2pipe 0.png --nostdin Result: Unrecognized option '-nostdin'. Error splitting the argument list: Option not found
    – themihai
    Commented Sep 12, 2017 at 7:53

1 Answer 1

0

I fixed your command

       cat a2.mkv | ffmpeg -nostdin -i - -y -map 0:0 -c:0 copy -f matroska -y 0.mkv -map 0:0 -vf "select=gt(scene\\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 -codec png -f image2pipe 0.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.