0

I use this command to create "myFile.webm", a VP9 video with one still image :

$ 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 ?

  • 1
    Why use VP9? x264? – Gyan Nov 21 '18 at 11:09
  • @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 – SebMa Nov 21 '18 at 17:31
  • 1
    So does MP4 with -strict -2 added. – Gyan Nov 21 '18 at 17:39
  • @Gyan I don't think YouTube is going to accept an MP4 file with opus audio – SebMa Nov 21 '18 at 17:42
  • 1
    Try a very short file. – Gyan Nov 21 '18 at 18:13
0

One solution (found here) is to use a very small -framerate value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.