Difference between revisions of "Video encoding"

From VisionaireWiki
Jump to navigation Jump to search
Line 1: Line 1:
Since Visionaire Studio 3.7 we support matroska (mkv) videos with subtitles, this is while i want to give you some tips and inspirations to use that.
+
Since Visionaire Studio 3.7 we support matroska (mkv) videos with subtitles.
  
We recommed google's free VP8 video codec with ogg/vorbis audio for the mkv container. These codec has an very good quality which is similar to H.264, but there are no license fees.
+
We recommed google's free VP8 video codec with ogg/vorbis audio for the mkv container. This codec has a very good quality which is similar to H.264 and does not have any license fees.
  
 
==Tools you need==
 
==Tools you need==
* an video encoder / we recommed ffmpeg for it, because it has can read very much format's and convert it with an excellent quality.
+
* an video encoder: we recommed ffmpeg because it can read many formats and convert it with excellent quality.
* an subtitle editor for the format: Advanced Substation Alpha (ASS) / encoded File Encoding = UTF8
+
* a subtitle editor for the format: Advanced Substation Alpha (ASS) / encoded File Encoding = UTF8
 
* an mkv editor like MKVToolNix
 
* an mkv editor like MKVToolNix
  
 
== Some good result settings ==
 
== Some good result settings ==
'''''You can experiment with the bitrate and quality yourself, but note: Higher Bitrates and Quality = higher CPU usage'''''
+
'''''You can experiment with the bitrate and quality yourself but keep in mind: Higher Bitrates and Quality = higher CPU usage'''''
 
* '''MKV _512Kbps_288p''' ''Matroska video for progressive download on average 3g network connections.''
 
* '''MKV _512Kbps_288p''' ''Matroska video for progressive download on average 3g network connections.''
 
::VP8 - DataRate: 400 Kbps - 2 Pass VBR - 512x288 pixels
 
::VP8 - DataRate: 400 Kbps - 2 Pass VBR - 512x288 pixels
Line 42: Line 42:
 
* which was 16:9 (Widescreen)
 
* which was 16:9 (Widescreen)
  
For an 2-pass-VBR encoding we need to execute the same command at 2 times, nothing changed except the flag -pass (1 and 2).
+
For an 2-pass-VBR encoding we need to execute the same command 2 times, with nothing changed except the flag -pass (1 and 2).
The first pass writes an logfile and not the OUTPUT.WEBM video.
+
The first pass writes a logfile but no OUTPUT.WEBM video.
 
The second pass creates the video from the Logfile which was be written by the flag -passlogfile.
 
The second pass creates the video from the Logfile which was be written by the flag -passlogfile.
  

Revision as of 01:05, 7 September 2012

Since Visionaire Studio 3.7 we support matroska (mkv) videos with subtitles.

We recommed google's free VP8 video codec with ogg/vorbis audio for the mkv container. This codec has a very good quality which is similar to H.264 and does not have any license fees.

Tools you need

  • an video encoder: we recommed ffmpeg because it can read many formats and convert it with excellent quality.
  • a subtitle editor for the format: Advanced Substation Alpha (ASS) / encoded File Encoding = UTF8
  • an mkv editor like MKVToolNix

Some good result settings

You can experiment with the bitrate and quality yourself but keep in mind: Higher Bitrates and Quality = higher CPU usage

  • MKV _512Kbps_288p Matroska video for progressive download on average 3g network connections.
VP8 - DataRate: 400 Kbps - 2 Pass VBR - 512x288 pixels
Vorbis - 64Kbps - 44100Hz - Stereo - Sample Size: 16
  • MKV_768Kbps_360p Matroska video for progressive download on fast 3g network connections.
VP8 - DataRate: 600 Kbps - 2 Pass VBR - 480x360 pixels
Vorbis - 96Kbps - 44100Hz - Stereo - Sample Size: 16
  • MKV_1200Kbps_480p Matroska video for progressive download on fast Wi-Fi network connections.
VP8 - DataRate: 990 Kbps - 2 Pass VBR - 852x480 pixels
Vorbis - 128Kbps - 44100Hz - Stereo - Sample Size: 16
  • MKV_2000Kbps_720p Matroska video for progressive download on slow broadband network connections.
VP8 - DataRate: 1800 Kbps - 2 Pass VBR - 1280x720 pixels
Vorbis - 160Kbps - 44100Hz - Stereo - Sample Size: 16
  • MKV_3000Kbps_720p Matroska video for progressive download on average broadband network connections.
VP8 - DataRate: 2800 Kbps - 2 Pass VBR - 1280x720 pixels
Vorbis - 160Kbps - 44100Hz - Stereo - Sample Size: 16
  • MKV_5000Kbps_1080p Matroska video for progressive download on average broadband network connections.
VP8 - DataRate: 5000 Kbps - 2 Pass VBR - 1920x1080 pixels
Vorbis - 160Kbps - 44100Hz - Stereo - Sample Size: 16

Encoding example

In this example you will learn how to encode your movies with ffmpeg manually to create an Video:

  • based on the MKV_3000Kbps_720p quality result settings (720p widescreen)
  • which uses the VP8 codec for video
  • which uses the libvorbis codec for audio
  • which is 2-pass-VBR encoded
  • which was 16:9 (Widescreen)

For an 2-pass-VBR encoding we need to execute the same command 2 times, with nothing changed except the flag -pass (1 and 2). The first pass writes a logfile but no OUTPUT.WEBM video. The second pass creates the video from the Logfile which was be written by the flag -passlogfile.

First Pass:

./ffmpeg -i YOURVIDEO.RAW -c:a libvorbis -b:a 160k -aq 9 -strict experimental -async 1 -c:v libvpx -b:v 2800k -bt 234k -r 25 -s 1280x720 -aspect 16:9 -trellis 0 -me_range 16 -i_qfactor 0.71 -b_strategy 1 -qmin 3 -qmax 51 -qdiff 4 -sc_threshold 40 -sn -pass 1 -passlogfile ./pass -threads 2 -y OUTPUT.WEBM

Second Pass:

./ffmpeg -i YOURVIDEO.RAW -c:a libvorbis -b:a 160k -aq 9 -strict experimental -async 1 -c:v libvpx -b:v 2800k -bt 234k -r 25 -s 1280x720 -aspect 16:9 -trellis 0 -me_range 16 -i_qfactor 0.71 -b_strategy 1 -qmin 3 -qmax 51 -qdiff 4 -sc_threshold 40 -sn -pass 2 -passlogfile ./pass -threads 2 -y OUTPUT.WEBM


WebSites

  • FFmpeg (english) – Windows Builds
  • FFmpeg (english) – Macintosh Builds
  • MKVToolNix (english) - All Platforms