WebM: Difference between revisions
| No edit summary | mNo edit summary | ||
| Line 6: | Line 6: | ||
| In Source and Source 2 games, WebM is being used in {{csgo|1}} and {{cs2|1}} as menu backgrounds. And in {{tf2|1}} (since 2024 engine update), aswell as {{hl1|1}} (25th anniversary), for Valve intro during startup. | In Source and Source 2 games, WebM is being used in {{csgo|1}} and {{cs2|1}} as menu backgrounds. And in {{tf2|1}} (since 2024 engine update), aswell as {{hl1|1}} (25th anniversary), for Valve intro during startup. | ||
| The biggest benefit of WebM over [[BIK|Bink]] (or [[AVI]]) for games is that of file size; a WebM video will be significantly smaller than that of a similar-quality Bink file as WebM has better compression  | The biggest benefit of WebM over [[BIK|Bink]] (or [[AVI]]) for games is that of file size; a WebM video will be significantly smaller than that of a similar-quality Bink file as WebM has better compression by comparison. For example, the installation size of {{hdtf|4.1}} decreased by 5.7 GB when its FMV cutscenes were switched from Bink to WebM{{cite|1}}. Furthermore, WebM is much more common and easier to make than the Bink file format, as Bink requires the RAD Video Tools software that only takes AVI files (MP4 initially required QuickTime until the requirement was eventually removed as QuickTime for Windows is no longer supported by Apple), and may fail to convert MP4 to BIK (with an "Unable to open file" error) on some systems. | ||
| WebM is supported in the following games, engines, and engine branches: | WebM is supported in the following games, engines, and engine branches: | ||
| Line 40: | Line 40: | ||
| :<nowiki>**</nowiki>Audio is read, but muted. {{only|{{cs2}}}} If the video was unable to play due to incompatible codecs or other codecs issue, then part of the intro sounds ({{file|sounds/ui/logo_startup|vsnd_c}}, which is played separately) will not play or likely be played in lower volume. | :<nowiki>**</nowiki>Audio is read, but muted. {{only|{{cs2}}}} If the video was unable to play due to incompatible codecs or other codecs issue, then part of the intro sounds ({{file|sounds/ui/logo_startup|vsnd_c}}, which is played separately) will not play or likely be played in lower volume. | ||
| :<nowiki>***</nowiki>Sometimes audio plays in slower speed and lower pitch. | :<nowiki>***</nowiki>Sometimes audio plays in slower speed and lower pitch. | ||
| :<nowiki>****</nowiki>Support added in {{tf2}} since April 18, 2024/64-bit update. Later, {{hl2dm}} 20th anniversary, and all remaining {{src13mp|1}} games ({{css}}, {{dods}} and {{hldms}}) upgraded to the {{tf2branch|1}}, which now adds WebM support, however, these upgraded games (aside from TF2), still only ship with the Valve intro in [[Bink]] format. This meant that you will need to launch the game in 32-bit to play the intro, as 64-bit version now requires WebM, and these games (except TF2) do not ship with WebM version of Valve intro, causing the game to skip it. That also meant that Valve coded the game to use WebM when launched in 64-bit, while 32-bit versions still support and use Bink. | :<nowiki>****</nowiki>Support added in {{tf2}} since April 18, 2024/64-bit update. Later, {{hl2dm}} 20th anniversary, and all remaining {{src13mp|1}} games ({{css}}, {{dods}} and {{hldms}}) upgraded to the {{tf2branch|1}}, which now adds WebM support, however, these upgraded games (aside from TF2), still only ship with the Valve intro in [[Bink]] format. This meant that you will need to launch the game in 32-bit to play the intro, as the 64-bit version now requires WebM, and these games (except TF2) do not ship with a WebM version of Valve's intro, causing the game to skip it. That also meant that Valve coded the game to use WebM when launched in 64-bit, while 32-bit versions still support and use Bink. | ||
| To convert a 1080p MP4 file to a WebM that will reliably play in the the above games and have reasonable quality and encoding speed, use the following {{w|ffmpeg}} script: | To convert a 1080p MP4 file to a WebM that will reliably play in the the above games and have reasonable quality and encoding speed, use the following {{w|ffmpeg}} script: | ||
Latest revision as of 02:28, 23 July 2025

 
WebM (file extension .webm) is a video file format developed by  Google, based upon the
 Google, based upon the  Matroska (MKV) container format. WebM was originally designed to be used on webpages to save bandwidth, but it also has some benefits when it comes to video games and many other applications.
 Matroska (MKV) container format. WebM was originally designed to be used on webpages to save bandwidth, but it also has some benefits when it comes to video games and many other applications.
In Source and Source 2 games, WebM is being used in Counter-Strike: Global Offensive and Counter-Strike 2 as menu backgrounds. And in Team Fortress 2 (since 2024 engine update), aswell as Half-Life (25th anniversary), for Valve intro during startup.
The biggest benefit of WebM over Bink (or AVI) for games is that of file size; a WebM video will be significantly smaller than that of a similar-quality Bink file as WebM has better compression by comparison. For example, the installation size of  Hunt Down the Freeman decreased by 5.7 GB when its FMV cutscenes were switched from Bink to WebM[1]. Furthermore, WebM is much more common and easier to make than the Bink file format, as Bink requires the RAD Video Tools software that only takes AVI files (MP4 initially required QuickTime until the requirement was eventually removed as QuickTime for Windows is no longer supported by Apple), and may fail to convert MP4 to BIK (with an "Unable to open file" error) on some systems.
 Hunt Down the Freeman decreased by 5.7 GB when its FMV cutscenes were switched from Bink to WebM[1]. Furthermore, WebM is much more common and easier to make than the Bink file format, as Bink requires the RAD Video Tools software that only takes AVI files (MP4 initially required QuickTime until the requirement was eventually removed as QuickTime for Windows is no longer supported by Apple), and may fail to convert MP4 to BIK (with an "Unable to open file" error) on some systems.
WebM is supported in the following games, engines, and engine branches:
| Video codecs | Audio codecs | ||||
|---|---|---|---|---|---|
| Implementation | VP8 | VP9 | AV1 | Vorbis | Opus | 
|  Source 2 (  tested) | Yes | Yes | No | Yes** | Yes** | 
|  GoldSrc (since 25th anniversary update; intro video only) | Yes | Yes | No | Yes* | Yes* | 
|  Counter-Strike: Global Offensive (since 2018 Panorama update) | Yes | Yes | No | Yes*** | No | 
|  Team Fortress 2 branch**** (64-bit only) | Yes | Yes | No | Yes | No | 
|  Strata Source | Yes | Yes | No | Yes | No | 
| WebM Video Services for  (used by  Hunt Down the Freeman) | Yes | Yes | No | Yes | Yes | 
- *Audio is read, but muted.  <moddir>/sound/ui/valve_sound.wavis used instead.
- **Audio is read, but muted. (only in  ) If the video was unable to play due to incompatible codecs or other codecs issue, then part of the intro sounds ( ) If the video was unable to play due to incompatible codecs or other codecs issue, then part of the intro sounds ( sounds/ui/logo_startup.vsnd_c, which is played separately) will not play or likely be played in lower volume.
- ***Sometimes audio plays in slower speed and lower pitch.
- ****Support added in  since April 18, 2024/64-bit update. Later, since April 18, 2024/64-bit update. Later, 20th anniversary, and all remaining Source 2013 Multiplayer games ( 20th anniversary, and all remaining Source 2013 Multiplayer games ( , , and and ) upgraded to the Team Fortress 2 branch, which now adds WebM support, however, these upgraded games (aside from TF2), still only ship with the Valve intro in Bink format. This meant that you will need to launch the game in 32-bit to play the intro, as the 64-bit version now requires WebM, and these games (except TF2) do not ship with a WebM version of Valve's intro, causing the game to skip it. That also meant that Valve coded the game to use WebM when launched in 64-bit, while 32-bit versions still support and use Bink. ) upgraded to the Team Fortress 2 branch, which now adds WebM support, however, these upgraded games (aside from TF2), still only ship with the Valve intro in Bink format. This meant that you will need to launch the game in 32-bit to play the intro, as the 64-bit version now requires WebM, and these games (except TF2) do not ship with a WebM version of Valve's intro, causing the game to skip it. That also meant that Valve coded the game to use WebM when launched in 64-bit, while 32-bit versions still support and use Bink.
To convert a 1080p MP4 file to a WebM that will reliably play in the the above games and have reasonable quality and encoding speed, use the following  ffmpeg script:
 ffmpeg script:
- To increase audio quality, increase -ab.
- To increase video quality, reduce -crf. Lower values may be necessary for higher and lower resolutions to reduce macroblocking artefacts.
References
| References | ||
|---|---|---|
| 
 | 
























