Skip to content

Instantly share code, notes, and snippets.

@nazeeruddinikram
Forked from ndarville/webm.md
Last active August 29, 2015 14:18
Show Gist options
  • Save nazeeruddinikram/983581e5ee067c8efcce to your computer and use it in GitHub Desktop.
Save nazeeruddinikram/983581e5ee067c8efcce to your computer and use it in GitHub Desktop.

Revisions

  1. @ndarville ndarville revised this gist Apr 6, 2014. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions webm.md
    Original file line number Diff line number Diff line change
    @@ -18,9 +18,12 @@ To convert a part of a video file:
    * `-vf scale=640:-1` sets the width to 640px. The height will be calculated automatically according to the aspect ratio of the input.
    * `-an` disables audio. 4chan will reject your files if they contain audio streams.

    Another encoding guide: https://trac.ffmpeg.org/wiki/vpxEncodingGuide
    * * *

    ffmpeg documentation: https://www.ffmpeg.org/ffmpeg.html
    * Another encoding guide: https://trac.ffmpeg.org/wiki/vpxEncodingGuide
    * ffmpeg documentation: https://www.ffmpeg.org/ffmpeg.html

    * * *

    Current limits for WebM files on 4chan are:

  2. @ndarville ndarville revised this gist Apr 6, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions webm.md
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,7 @@ To convert a part of a video file:
    * `-an` disables audio. 4chan will reject your files if they contain audio streams.

    Another encoding guide: https://trac.ffmpeg.org/wiki/vpxEncodingGuide

    ffmpeg documentation: https://www.ffmpeg.org/ffmpeg.html

    Current limits for WebM files on 4chan are:
  3. @ndarville ndarville revised this gist Apr 6, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions webm.md
    Original file line number Diff line number Diff line change
    @@ -18,8 +18,8 @@ To convert a part of a video file:
    * `-vf scale=640:-1` sets the width to 640px. The height will be calculated automatically according to the aspect ratio of the input.
    * `-an` disables audio. 4chan will reject your files if they contain audio streams.

    * Another encoding guide: https://trac.ffmpeg.org/wiki/vpxEncodingGuide
    * ffmpeg documentation: https://www.ffmpeg.org/ffmpeg.html
    Another encoding guide: https://trac.ffmpeg.org/wiki/vpxEncodingGuide
    ffmpeg documentation: https://www.ffmpeg.org/ffmpeg.html

    Current limits for WebM files on 4chan are:

  4. @ndarville ndarville created this gist Apr 6, 2014.
    29 changes: 29 additions & 0 deletions webm.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    Grab ffmpeg from https://www.ffmpeg.org/download.html

    It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

    The most trivial operation would be converting gifs:

    ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm

    * `-crf` values can go from 4 to 63. Lower values mean better quality.
    * `-b:v` is the maximum allowed bitrate. Higher means better quality.

    To convert a part of a video file:

    ffmpeg -i your_video.mkv -ss 00:00:10.000 -to 00:00:20.000 -c:v libvpx -crf 4 -b:v 1500K -vf scale=640:-1 -an output.webm

    * `-ss` is the start position in number of seconds, or in hh:mm:ss[.xxx] format. You can get it using your video player (Ctrl-G in MPC-HC).
    * `-to` is the end position.
    * `-vf scale=640:-1` sets the width to 640px. The height will be calculated automatically according to the aspect ratio of the input.
    * `-an` disables audio. 4chan will reject your files if they contain audio streams.

    * Another encoding guide: https://trac.ffmpeg.org/wiki/vpxEncodingGuide
    * ffmpeg documentation: https://www.ffmpeg.org/ffmpeg.html

    Current limits for WebM files on 4chan are:

    * Maximum file size is 3072KB.
    * Maximum duration is 120 seconds.
    * Maximum resolution is 2048x2048 pixels.
    * No audio streams.