Difference between revisions of "Video Codecs"

From TSG Doc
Jump to navigation Jump to search
Line 20: Line 20:
 
! scope="row" |
 
! scope="row" |
 
! scope="row" colspan="3" | Recommended formats
 
! scope="row" colspan="3" | Recommended formats
! scope="row" colspan="1" | Non-Recommended formats
+
! scope="row" colspan="2" | Non-Recommended formats
 
|-
 
|-
 
| Codec
 
| Codec
 
! scope="row" colspan="1" | VP8/VP9
 
! scope="row" colspan="1" | VP8/VP9
 
! scope="row" colspan="1" | Theora
 
! scope="row" colspan="1" | Theora
! scope="row" colspan="1" | H.264
+
! scope="row" colspan="2" | H.264
! scope="row" | XVID
+
! scope="row" style="width:120px;" | XVID
 
|-
 
|-
 
| Container  
 
| Container  
Line 32: Line 32:
 
! scope="row" | .ogv .ogg
 
! scope="row" | .ogv .ogg
 
! scope="row" | .mp4
 
! scope="row" | .mp4
! scope="row" | .avi
+
! scope="row" colspan="2" | .avi
 
|-
 
|-
 
| Advantage
 
| Advantage
 
| libre
 
| libre
 
| libre
 
| libre
| widely used
+
| Industry Standard
|  
+
| Works in Presentation
 +
|
 
|-
 
|-
 
! scope="row"| Software
 
! scope="row"| Software
Line 46: Line 47:
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 +
|
 
| style="background-color:#F99;" | No
 
| style="background-color:#F99;" | No
 
|-
 
|-
 
| VLC  
 
| VLC  
 +
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
Line 58: Line 61:
 
| style="background-color:#9F9;" | Yes<sup>1</sup>
 
| style="background-color:#9F9;" | Yes<sup>1</sup>
 
| style="background-color:#9F9;" | Yes<sup>1</sup>
 
| style="background-color:#9F9;" | Yes<sup>1</sup>
 +
| style="background-color:#FFF;" |
 
| style="background-color:#FFF;" |  
 
| style="background-color:#FFF;" |  
 
|-
 
|-
Line 63: Line 67:
 
| style="background-color:#FFF;" |  
 
| style="background-color:#FFF;" |  
 
| style="background-color:#FFF;" |  
 
| style="background-color:#FFF;" |  
| style="background-color:#F99;" | No<sup>2</sup>
+
| style="background-color:#F99;" | No
 +
 
 +
| style="background-color:#9F9;" | Yes<sup>2</sup>
 
| style="background-color:#9F9;" | Yes
 
| style="background-color:#9F9;" | Yes
 
|}
 
|}
 
<sup>1</sup> Windows version requires careful installation.<br/>
 
<sup>1</sup> Windows version requires careful installation.<br/>
<sup>2</sup> Documentation says Yes, reality says No. <br/>
+
<sup>2</sup> Recommended output for Presentation only. See documentation below for conversion options.<br/>
 
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.
 
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.
  

Revision as of 16:30, 6 March 2015

Information

Codecs

To find out what video codecs are and why they are used, take a coffee and reserve about 45 minutes of your life to watch this comprehensive video: How Codecs Work (Vimeo)

Bitrate

When compressing a video, you will be asked to enter a 'bitrate'. This is what determines how much information is stored for every second of video. The more information, the higher the quality of the video. The tradeoff is file size. The more information, the larger the file. So setting a bitrate is striking a balance between limiting the file size without losing too much quality. The smarter the compression format, the easier this is to achieve.

If you are using H.264 compression, you can calculate a ballpark estimate for your target bitrate using the Kush gauge:

Target Bitrate (kbps) = Frame Width (px) * Frame Height (px) * Frame Rate (fps) * Motion Factor * 0.07 / 1000

"Motion Factor" is an arbitrary value (typically 1, 2 or 4) that you can assign to your video based on the amount of (fast) movement in the video. Higher amounts of movement require a higher amount of information to be stored in order to prevent quality loss. Example calculation for a typical 720p video:

1280 * 720 * 25 * 2 * 0.07 / 1000 = 3225.6 kbps (= 3.2 Mbps)

Bitrate can be set to Constant (CBR) or Variable (VBR). A variable bitrate can help decreasing file size when your video has a combination of high and low amounts of movement, as it will optimize the distribution of information storage for those parts in your video. The downside is that your video player has to sometimes suddenly decode a lot more information than the previous frame, resulting in possible lag. For this reason, we advise using a constant bitrate.

Software support

Recommended formats Non-Recommended formats
Codec VP8/VP9 Theora H.264 XVID
Container .webm .mkv .ogv .ogg .mp4 .avi
Advantage libre libre Industry Standard Works in Presentation
Software
Chrome/Firefox/Opera Yes Yes Yes No
VLC Yes Yes Yes Yes Yes
PsychoPy Yes1 Yes1 Yes1
Neurobs Presentation No Yes2 Yes

1 Windows version requires careful installation.
2 Recommended output for Presentation only. See documentation below for conversion options.
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.

Downloads

Converters

Name Download Location Supported formats Supported containers
Handbrake https://handbrake.fr/ H.264, MPEG-4, MPEG-2, VP3 mp4, mkv
Freemake1 http://www.freemake.com/ H.264, MPEG-4, XVID, MPEG-2, MPEG-1, WMV3, FLV avi, wmv, mpeg, mp4, 3gp, mkv, flv, swf, webm

1 Freemake adds a watermark to videos longer than 5 minutes.

Codec Packs

Name Download Location
Libavcodec https://libav.org/
LAV Filters https://github.com/Nevcairiel/LAVFilters/releases
K-Lite Codec Pack http://www.codecguide.com/download_kl.htm
FFmpeg Encoder https://www.ffmpeg.org/
FFDshow http://sourceforge.net/projects/ffdshow-tryout/

Media Players

Name Download Location
VLC https://www.videolan.org/
Noldus Mainconcept Codec (Noldus Media Recorder) Media:Noldus MainConcept Codec Package 8.5.26.zip
AVBin (Psychopy) http://avbin.github.io/AVbin/Home/Home.html
Gstreamer (Matlab) http://gstreamer.freedesktop.org/