user38402: I have found this solution provided by hackerb9:
ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 1  -an -f webm -y /dev/null
ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 2  output.webm

It's works, but the second pass require more than 10 hours (for 30 minutes of video HD).
Now the question is: can I do the same things in a reasonable time?

user40617: First of all, consider to avoid "2-pass" if you only need to convert format.
Most of time, CRF is enough unless you have specific requirement on the output file size.
Use "CRF" to control on the quality and size. CRF lower means better quality.
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 output.webm

There's parameter "-row-mt" for VP9 encoder to turn on "Row based multithreading" function, which enhances the number of encoder threads.
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -row-mt 1 output.webm

And there're some parameters for VP9 encoder to control on the quality/speed tradeoff. So in the "Two-Pass" case, you could try to use those parameter to get more speed by give-up some quality.
-deadline can be set to realtime, good, or best.
-cpu-used sets how efficient the compression will be.
[Reference]
https://trac.ffmpeg.org/wiki/Encode/VP9
https://trac.ffmpeg.org/wiki/Encode/H.264 - "Two-Pass Section"

38402: <p>I have found <a href="https://video.stackexchange.com/a/28276/38402">this solution</a> provided by <a href="https://video.stackexchange.com/users/25965/hackerb9">hackerb9</a>:</p>
<pre><code>ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 1  -an -f webm -y /dev/null
ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 2  output.webm
</code></pre>
<p>It's works, but the second pass require more than 10 hours (for 30 minutes of video HD).</p>
<p>Now the question is: can I do the same things in a reasonable time?</p>
 40617: <p>First of all, consider to avoid &quot;2-pass&quot; if you only need to convert format.
Most of time, CRF is enough unless you have specific requirement on the output file size.</p>
<p>Use &quot;CRF&quot; to control on the quality and size. CRF lower means better quality.</p>
<pre><code>ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 output.webm
</code></pre>
<p>There's parameter &quot;-row-mt&quot; for VP9 encoder to turn on &quot;Row based multithreading&quot; function, which enhances the number of encoder threads.</p>
<pre><code>ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -row-mt 1 output.webm
</code></pre>
<p>And there're some parameters for VP9 encoder to control on the quality/speed tradeoff. So in the &quot;Two-Pass&quot; case, you could try to use those parameter to get more speed by give-up some quality.</p>
<p>-deadline can be set to realtime, good, or best.</p>
<p>-cpu-used sets how efficient the compression will be.</p>
<p><strong>[Reference]</strong></p>
<p><a href="https://trac.ffmpeg.org/wiki/Encode/VP9" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/Encode/VP9</a></p>
<p><a href="https://trac.ffmpeg.org/wiki/Encode/H.264" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/Encode/H.264</a> - &quot;Two-Pass Section&quot;</p>
