user18155: 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:

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.

user1871: 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


18155: <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>
 1871: <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>
