Answers.Body: <p>The ffmpeg tool can work with multiple inputs and outputs so the parser looks for <code>-i</code> to demarcate input options. The lavfi device will read the graph from the input argument </p>
  
  <p>Use</p>
  
  <pre><code>ffmpeg -f lavfi -i "testsrc2=d=1[out0];sine=d=1[out1]" test.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-08T05:25:21.367Z
Answers.Text: Thanks for your answer, it works, I new this — IMHO — workaround. The base of my question was a little other (my flaw for not state it clearly) — *is the documentation for `lavfi` inappropriate / incomplete / obsolete?* Is the parser for the `ffmpeg` command *different* from the one for `ffplay` (for the `lavfi` device)?
Answers.UserDisplayName: MarianD
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-08T09:04:04.827Z
Answers.Text: Yes, ffmpeg, ffplay and ffprobe each has its own parser. The lavfi device is a component within the libavdevice library which may be used by other frontends, so the interface will depend on the frontend.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-08T04:30:23.930Z
Answers.LastActivityDate: 2020-02-08T04:30:23.930Z
Answers.UserDisplayName: Gyan
Body: <p>The command</p>
  
  <pre><code>ffplay -f lavfi -graph testsrc2=d=1[out0];sine=d=1[out1] test.mp4
  </code></pre>
  
  <p>works fine. But the same arguments for <code>ffmpeg</code> (instead of <code>ffplay</code>)</p>
  
  <pre><code>ffmpeg -f lavfi -graph testsrc2=d=1[out0];sine=d=1[out1] test.mp4
  </code></pre>
  
  <p>produce only the error</p>
  
  <blockquote>
  <pre><code>[NULL @ 00000000006934c0] Requested output format 'lavfi' is not a suitable output format
  test.mp4: Invalid argument
  </code></pre>
  </blockquote>
  
  <p>What's wrong with it?</p>
  
  <hr>
  
  <p><em>Note:</em> </p>
  
  <p>From the <a href="https://ffmpeg.org/ffmpeg-devices.html#lavfi" rel="nofollow noreferrer">FFmpeg documentation for the lavfi</a>:</p>
  
  <blockquote>
    <p>Currently only video data is supported.</p>
  </blockquote>
  
  <p>It seems that's not true nowadays, at least <code>ffplay</code> works fine with audio (see my first command).<br>
  Or I incorrectly interpret this sentence?</p>
  
  <p>But just in case I tried using the filtergraph <code>testsrc2=d=1[out0];testsrc=d=1[out1]</code> instead, with the same results — <code>ffplay</code> — OK, <code>ffmpeg</code> — the same error.</p>
  
Tags: <ffmpeg>
Title: lavfi virtual device - the same parameters for ffmpeg and ffplay
UserDisplayName: MarianD
ThreadText: # lavfi virtual device - the same parameters for ffmpeg and ffplay
  
  (Asked by: username_0 on 2020-02-07)
  
  The command
  
  ```
  ffplay -f lavfi -graph testsrc2=d=1[out0];sine=d=1[out1] test.mp4
  
  ```
  
  works fine. But the same arguments for `ffmpeg` (instead of `ffplay`)
  
  ```
  ffmpeg -f lavfi -graph testsrc2=d=1[out0];sine=d=1[out1] test.mp4
  
  ```
  
  produce only the error
  
  > ```
  > [NULL @ 00000000006934c0] Requested output format 'lavfi' is not a suitable output format
  > test.mp4: Invalid argument
  >
  > ```
  
  What's wrong with it?
  
  ---
  
  *Note:*
  
  From the [FFmpeg documentation for the lavfi](https://ffmpeg.org/ffmpeg-devices.html#lavfi):
  
  > Currently only video data is supported.
  
  It seems that's not true nowadays, at least `ffplay` works fine with audio (see my first command).  
  Or I incorrectly interpret this sentence?
  
  But just in case I tried using the filtergraph `testsrc2=d=1[out0];testsrc=d=1[out1]` instead, with the same results — `ffplay` — OK, `ffmpeg` — the same error.
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-08. Score: 4 | Accepted answer
  
  The ffmpeg tool can work with multiple inputs and outputs so the parser looks for `-i` to demarcate input options. The lavfi device will read the graph from the input argument
  
  Use
  
  ```
  ffmpeg -f lavfi -i "testsrc2=d=1[out0];sine=d=1[out1]" test.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks for your answer, it works, I new this — IMHO — workaround. The base of my question was a little other (my flaw for not state it clearly) — *is the documentation for `lavfi` inappropriate / incomplete / obsolete?* Is the parser for the `ffmpeg` command *different* from the one for `ffplay` (for the `lavfi` device)?  
  > **username_1**: Yes, ffmpeg, ffplay and ffprobe each has its own parser. The lavfi device is a component within the libavdevice library which may be used by other frontends, so the interface will depend on the frontend.  
  
  ---
  
  