Posted: . At: 11:43 AM. This was 2 years ago. Post ID: 15747
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to rip a Webm from a video and encode in the best possible quality.


To rip a good quality Webm from a movie, this one-liner will work, this will encode with sound and very high-quality video in small file size.

ffmpeg -i Matrix.mkv -c:v libvpx -b:v 2700k -ss 00:02:30 -t 15 -c:a libvorbis -b:a 384k -sn -copyts -threads 4 swat3.webm

Very nice for sharing a video clip easily. The clip below shows the quality this will give you.

To set a title metadata tag, do it like this.

ffmpeg -i Matrix.mkv -metadata title="Matrix 4" -metadata year="2021" -c:v libvpx -b:v 2700k -ss 00:03:15 -t 15 -c:a libvorbis -b:a 384k -sn -copyts -threads 4 swat5.webm

This is easy to do. Good quality FFmpeg encodes and also a metadata tag in the file. Very useful when uploading a Webm file.

This is the ffprobe information for the encoded Webm file. This shows that it has Dolby 5.1 sound in it and still keeps a good file size.

$ ffprobe -hide_banner swat5.webm
 
Input #0, matroska,webm, from 'swat5.webm':
  Metadata:
    title           : Matrix 4
    YEAR            : 2021
    ENCODER         : Lavf58.45.100
  Duration: 00:00:15.02, start: 0.000000, bitrate: 3071 kb/s
    Stream #0:0: Video: vp8, yuv420p(progressive), 1920x816, SAR 1:1 DAR 40:17, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      BPS-eng         : 8209176
      DURATION-eng    : 02:27:54.866000000
      NUMBER_OF_FRAMES-eng: 212784
      NUMBER_OF_BYTES-eng: 9106917505
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-12-22 08:02:30
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      ENCODER         : Lavc58.91.100 libvpx
      DURATION        : 00:00:15.018000000
    Stream #0:1(eng): Audio: vorbis, 48000 Hz, 5.1, fltp (default)
    Metadata:
      title           : English
      BPS-eng         : 768000
      DURATION-eng    : 02:27:54.880000000
      NUMBER_OF_FRAMES-eng: 277340
      NUMBER_OF_BYTES-eng: 851988480
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-12-22 08:02:30
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      ENCODER         : Lavc58.91.100 libvorbis
      DURATION        : 00:00:15.003000000

So this is a very good encoding solution, this gives the best results for a small size. It is only 5.5 megabytes and still contains a 1080p video file and the aforementioned Dolby 5.1 audio.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.