Converting .mp4 to .webm with FFMPEG

2019-07-07 10:25发布

Any chance someone can help me make this a 2 or 3 pass command:

Using "FFmpeg Win64 Static build by Kyle Schwarz, compiled on: Sep 19 2012 16:31:43" in the Command Prompt of Windows7(x64). I am a newbie to FFMPEG and trying to convert videos for my website from .mp4 to .webm (videos edited and mixed in AdobePremiereProCS6 where then encoded into .mp4 from .mts Canon HXG10 recordings). Original video file is 1080p quality.

c:\ff/ffmpeg -i c:\ff/xxx.mp4 -codec:v libvpx -quality good -cpu-used 0 -b:v 7000k -qmin 10 -qmax 42 -maxrate 500k -bufsize 1500k -threads 8 -vf scale=-1:1080 -codec:a libvorbis -b:a 192k -f webm c:\ff/xxx.webm

1条回答
干净又极端
2楼-- · 2019-07-07 10:52

as '1 pass' the follosing works for me on build including vorbis, libvpx...

for hints on 2 pass libvpx see here

rob@ Pictures$ ffmpeg -y -i me939371029.mp4 -r 30  out3.webm

ffmpeg version git-2012-08-29-85c8303 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 29 2012 08:59:14 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 54.100 / 54. 54.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 14.100 /  3. 14.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'me939371029.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.22.100
  Duration: 00:00:08.01, start: 0.000000, bitrate: 343 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p, 1296x972 [SAR 1:1 DAR 4:3], 316 kb/s, 0.57 fps, 0.50 tbr, 1 tbn, 1 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, s16, 64 kb/s
    Metadata:
      handler_name    : SoundHandler
[libvpx @ 0x1e7f500] v1.1.0
Output #0, webm, to 'out3.webm':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.25.104
    Stream #0:0(und): Video: vp8, yuv420p, 1296x972 [SAR 1:1 DAR 4:3], q=-1--1, 200 kb/s, 1k tbn, 30 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono, flt
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libvpx)
  Stream #0:1 -> #0:1 (aac -> libvorbis)
Press [q] to stop, [?] for help
[libvorbis @ 0x1e67060] Que input is backward in time
frame=    4 fps=0.0 q=0.0 Lsize=     122kB time=00:00:07.99 bitrate= 124.6kbits/s    
video:51kB audio:63kB subtitle:0 global headers:3kB muxing overhead 3.241658%
查看更多
登录 后发表回答