Answers.Body: <p>I fixed your command</p>
  
  <pre><code>       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
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-12T08:01:39.163Z
Answers.LastActivityDate: 2017-09-12T08:01:39.163Z
Answers.UserDisplayName: bukkojot
Body: <p>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 <code>pipe:: Invalid data found when processing input</code>. </p>
  
  <p>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.</p>
  
  <pre><code>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
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-12T07:50:57.177Z
Comments.Text: try to add --nostdin
Comments.UserDisplayName: bukkojot
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-12T07:53:05.547Z
Comments.Text: 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``
Comments.UserDisplayName: themihai
Tags: <ffmpeg>
Title: ffmpeg - trascoding multiple streams from stdin errors out: pipe:: Invalid data found when processing input
UserDisplayName: themihai
ThreadText: # ffmpeg - trascoding multiple streams from stdin errors out: pipe:: Invalid data found when processing input
  
  (Asked by: username_0 on 2017-09-12)
  
  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
  
  ```
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: try to add --nostdin  
  > **username_0**: 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``  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-12. Score: 0 | Accepted answer
  
  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
  
  ```
  
  
  ---
  
  