Answers.Body: <p>On my machine, <em>speed=0.953x</em> while using the <strong>default</strong> setting</p>
  <pre><code>c:\ffmpeg\ffmpeg -y -i out_music.opus -loop 1 -i temp.png -shortest -threads 4 -speed max -c:a copy  myFile.webm
  
  frame=  184 fps= 24 q=0.0 Lsize=     843kB time=00:00:07.32 bitrate= 943.8kbits/s speed=0.953x
  </code></pre>
  <p><em>speed=1.73x</em> while using the <strong>realtime</strong> setting</p>
  <pre><code>c:\ffmpeg\ffmpeg -y -i out_music.opus -loop 1 -i temp.png -shortest -threads 4 -speed max -c:a copy -deadline realtime myFile.webm
  
  frame=  491 fps= 43 q=0.0 Lsize=    1809kB time=00:00:19.60 bitrate= 755.9kbits/s speed=1.73x
  </code></pre>
  <p>Since the input is a png file, frame per second could be lower; <em>speed=5.84x</em> while using the <strong>fps=5</strong> setting</p>
  <pre><code>c:\ffmpeg\ffmpeg -y -i out_music.opus -loop 1 -i temp.png -shortest -threads 4 -speed max -c:a copy -deadline realtime -vf fps=5 myFile.webm
  
  frame=  218 fps= 29 q=0.0 Lsize=    1316kB time=00:00:43.40 bitrate= 248.3kbits/s speed=5.84x
  </code></pre>
  <p>Reference:<a href="https://trac.ffmpeg.org/wiki/Encode/VP9" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/Encode/VP9</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-08T19:18:03.973Z
Answers.Text: Just for information. According to [ffmpeg filters documentation](https://ffmpeg.org/ffmpeg-filters.html#fps) on the `fps` filter, `-vf fps=5` would be equivalent to `-r 5` as an output option, read `man ffmpeg  | sed -n "/-r.:/,/output option/p"`
Answers.UserDisplayName: SebMa
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-08T12:50:16.533Z
Answers.LastActivityDate: 2021-12-08T13:10:01.037Z
Answers.LastEditDate: 2021-12-08T13:10:01.037Z
Answers.UserDisplayName: xer-rex
Answers.Body: <p>One solution (found <a href="https://trac.ffmpeg.org/wiki/Encode/YouTube#BasicExamples" rel="nofollow noreferrer">here</a>) is to use a very small <code>-framerate</code> value.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-22T15:16:55.547Z
Answers.LastActivityDate: 2018-11-22T15:16:55.547Z
Answers.UserDisplayName: SebMa
Body: <p>I use this command to create &quot;myFile.webm&quot;, a VP9 video with one still image :</p>
  
  <pre class="lang-bash prettyprint-override"><code>$ ffmpeg -i myOriginialPureAudioFile.opus -loop 1 -i myAudioFile_640x360.png -shortest -threads 4 -speed max -c:a copy myFile.webm
  Input #0, ogg, from 'myOriginialPureAudioFile.opus':
    Duration: 01:53:19.80, start: 0.000000, bitrate: 24 kb/s
      Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp
      Metadata:
        LANGUAGE        : eng
        TITLE           : unnamed
        ENCODER         : Lavf57.83.100
  Input #1, png_pipe, from 'myAudioFile_640x360.png':
    Duration: N/A, bitrate: N/A
      Stream #1:0: Video: png, rgb24(pc), 640x360 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
  File 'myFile.webm' already exists. Overwrite ? [y/N] y
  Stream mapping:
    Stream #1:0 -&gt; #0:0 (png (native) -&gt; vp9 (libvpx-vp9))
    Stream #0:0 -&gt; #0:1 (copy)
  Press [q] to stop, [?] for help
  [libvpx-vp9 @ 0x5655578268c0] v1.3.0
  Output #0, webm, to 'myFile.webm':
    Metadata:
      encoder         : Lavf57.83.100
      Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 200 kb/s, 25 fps, 1k tbn, 25 tbc
      Metadata:
        encoder         : Lavc57.107.100 libvpx-vp9
      Side data:
        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
      Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp
      Metadata:
        LANGUAGE        : eng
        TITLE           : unnamed
        ENCODER         : Lavf57.83.100
  frame= 4863 fps= 22 q=0.0 Lsize=     987kB time=00:03:14.48 bitrate=  41.6kbits/s speed=0.879x
  </code></pre>
  <p>The speed is about 0.88x, how can I make this encoding much faster ?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-21T11:09:52.373Z
Comments.Text: Why use VP9? x264?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-21T17:31:15.417Z
Comments.Text: @Gyan Because, I don't want to re-encode the 2hours audio which in opus format. I use `-c:a copy` because the WebM container supports opus audio
Comments.UserDisplayName: SebMa
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-21T17:39:50.693Z
Comments.Text: So does MP4 with `-strict -2` added.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-21T17:42:07.580Z
Comments.Text: @Gyan I don't think YouTube is going to accept an MP4 file with opus audio
Comments.UserDisplayName: SebMa
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-21T18:13:19.117Z
Comments.Text: Try a very short file.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-22T10:38:17.737Z
Comments.Text: @Gyan It works, thanks. But I think I'll stick to standard webm file.
Comments.UserDisplayName: SebMa
Tags: <ffmpeg><encoding><vp9>
Title: Fast VP9 still image encoding
UserDisplayName: SebMa
ThreadText: # Fast VP9 still image encoding
  
  (Asked by: username_0 on 2018-11-21)
  
  I use this command to create "myFile.webm", a VP9 video with one still image :
  
  ```bash
  $ ffmpeg -i myOriginialPureAudioFile.opus -loop 1 -i myAudioFile_640x360.png -shortest -threads 4 -speed max -c:a copy myFile.webm
  Input #0, ogg, from 'myOriginialPureAudioFile.opus':
    Duration: 01:53:19.80, start: 0.000000, bitrate: 24 kb/s
      Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp
      Metadata:
        LANGUAGE        : eng
        TITLE           : unnamed
        ENCODER         : Lavf57.83.100
  Input #1, png_pipe, from 'myAudioFile_640x360.png':
    Duration: N/A, bitrate: N/A
      Stream #1:0: Video: png, rgb24(pc), 640x360 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
  File 'myFile.webm' already exists. Overwrite ? [y/N] y
  Stream mapping:
    Stream #1:0 -> #0:0 (png (native) -> vp9 (libvpx-vp9))
    Stream #0:0 -> #0:1 (copy)
  Press [q] to stop, [?] for help
  [libvpx-vp9 @ 0x5655578268c0] v1.3.0
  Output #0, webm, to 'myFile.webm':
    Metadata:
      encoder         : Lavf57.83.100
      Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 200 kb/s, 25 fps, 1k tbn, 25 tbc
      Metadata:
        encoder         : Lavc57.107.100 libvpx-vp9
      Side data:
        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
      Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp
      Metadata:
        LANGUAGE        : eng
        TITLE           : unnamed
        ENCODER         : Lavf57.83.100
  frame= 4863 fps= 22 q=0.0 Lsize=     987kB time=00:03:14.48 bitrate=  41.6kbits/s speed=0.879x
  
  ```
  
  The speed is about 0.88x, how can I make this encoding much faster ?
  
  **Tags:** ffmpeg, encoding, vp9
  
  > **Comments:**
  > **username_1**: Why use VP9? x264?  
  > **username_0**: @username_1 Because, I don't want to re-encode the 2hours audio which in opus format. I use `-c:a copy` because the WebM container supports opus audio  
  > **username_1**: So does MP4 with `-strict -2` added.  
  > **username_0**: @username_1 I don't think YouTube is going to accept an MP4 file with opus audio  
  > **username_1**: Try a very short file.  
  > **username_0**: @username_1 It works, thanks. But I think I'll stick to standard webm file.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2021-12-08. Score: 1
  
  On my machine, *speed=0.953x* while using the **default** setting
  
  ```
  c:\ffmpeg\ffmpeg -y -i out_music.opus -loop 1 -i temp.png -shortest -threads 4 -speed max -c:a copy  myFile.webm
  
  frame=  184 fps= 24 q=0.0 Lsize=     843kB time=00:00:07.32 bitrate= 943.8kbits/s speed=0.953x
  
  ```
  
  *speed=1.73x* while using the **realtime** setting
  
  ```
  c:\ffmpeg\ffmpeg -y -i out_music.opus -loop 1 -i temp.png -shortest -threads 4 -speed max -c:a copy -deadline realtime myFile.webm
  
  frame=  491 fps= 43 q=0.0 Lsize=    1809kB time=00:00:19.60 bitrate= 755.9kbits/s speed=1.73x
  
  ```
  
  Since the input is a png file, frame per second could be lower; *speed=5.84x* while using the **fps=5** setting
  
  ```
  c:\ffmpeg\ffmpeg -y -i out_music.opus -loop 1 -i temp.png -shortest -threads 4 -speed max -c:a copy -deadline realtime -vf fps=5 myFile.webm
  
  frame=  218 fps= 29 q=0.0 Lsize=    1316kB time=00:00:43.40 bitrate= 248.3kbits/s speed=5.84x
  
  ```
  
  Reference:<https://trac.ffmpeg.org/wiki/Encode/VP9>
  
  > **Comments:**
  > **username_0**: Just for information. According to [ffmpeg filters documentation](https://ffmpeg.org/ffmpeg-filters.html#fps) on the `fps` filter, `-vf fps=5` would be equivalent to `-r 5` as an output option, read `man ffmpeg  | sed -n "/-r.:/,/output option/p"`  
  
  ---
  
  ### Answer by username_0 on 2018-11-22. Score: 0
  
  One solution (found [here](https://trac.ffmpeg.org/wiki/Encode/YouTube#BasicExamples)) is to use a very small `-framerate` value.
  
  
  ---
  
  