Startup Media: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Startup Videos: - cleaning up the mess with colorful mess, and while S2 support WebM, most of the instructions here doesn't apply to Source 2 titles.)
 
Line 25: Line 25:
You can change the startup video for a game by placing the following files in the {{path|<moddir>/media}} folder:
You can change the startup video for a game by placing the following files in the {{path|<moddir>/media}} folder:
* {{path|valve|avi}} file - for {{gldsrc|4}} (Retail/WON version)
* {{path|valve|avi}} file - for {{gldsrc|4}} (Retail/WON version)
* {{path|valve|avi}} file (or other specified in StartupVids.txt) - for {{src06|2}} or earlier
* {{path|valve|avi}} file (or other specified in StartupVids.txt) - AVI, for {{src06|2}} or earlier
* {{path|valve|bik}} file (or other specified in StartupVids.txt) - for {{src07|2}} and later, also {{Tf2branch|1}} but only in 32-bit mode.
* {{path|valve|bik}} file (or other specified in StartupVids.txt) - Bink Video, for {{src07|2}} and later, also {{Tf2branch|1}} but only in 32-bit mode.
* {{path|valve|webm}} file (or other specified in StartupVids.txt) - for {{gldsrc|2}} (post-25th anniversary update), and {{source|1}} games/branches that have been modified to include WebM support (such as {{Strata|4}}), aswell as {{csgobranch|1}}, {{tf2branch|1}} (64-bit only) and {{src2|1}}.
* {{path|valve|webm}} file (or other specified in StartupVids.txt) - WebM, for {{gldsrc|2}} (post-25th anniversary update), and {{csgobranch|1}}, {{tf2branch|1}} (64-bit only) aswell as {{Strata|1}}.
** Please note that in {{Gldsrc|4}} (post-25th anniversary), audio in the WebM video is muted and instead the game will try to play the {{path|<moddir>/sound/ui/valve_sound|wav}} file instead, which is much lower quality when played in-game (unless MetaHook is used).
** Please note that in {{Gldsrc|name}} (post-25th anniversary), audio in the WebM video is muted and instead the game will try to play the {{path|<moddir>/sound/ui/valve_sound|wav}} audio file, which is much lower quality when played in-game (unless MetaHook is used).


If you are making a mod for {{hl2|2}} (or other {{source|1}} games) you can place any AVI, [[BIK|Bink Video]] (BIK), MOV (for {{mac|1}}), or [[WebM]] (if the engine has WebM support added) file in your mod's {{path|media}} folder. In order for the video to play when you start your mod you will need to create a {{code|StartupVids.txt}} file in the {{path|media}} folder. Inside {{code|StartupVids.txt}} you simply specify the filename(s) of the video(s) you want to be played on a separate line.  
If you are making a mod for {{hl2|2}} (or other {{source|1}} games) you can place any [[#Supported File Formats|supported video files]] in your mod's {{path|media}} folder. In order for the video to play when you start your mod you will need to create a {{code|StartupVids.txt}} file in the {{path|media}} folder. Inside {{code|StartupVids.txt}} you simply specify the filename(s) of the video(s) you want to be played on a separate line.  


For example:
For example:
Line 39: Line 39:
{{bug|tested={{srcsdk13sp}}, {{srcsdk13mp}}, {{Tf2branch}}|In all games on {{src13|2}}, the extension is completely ignored and it will only play [[bik]] files. For example, if you set {{Code|media/video1.mp4}} in {{Code|StartupVids.txt}}, it will play {{Code|media/video1.bik}} instead. Similarly on all {{tf2branch|1}} games, by default it was set to {{Code|media/valve.avi}}, but launching in 32-bit will play {{Code|media/valve.bik}} and 64-bit will play {{Code|media/valve.webm}} instead.}}
{{bug|tested={{srcsdk13sp}}, {{srcsdk13mp}}, {{Tf2branch}}|In all games on {{src13|2}}, the extension is completely ignored and it will only play [[bik]] files. For example, if you set {{Code|media/video1.mp4}} in {{Code|StartupVids.txt}}, it will play {{Code|media/video1.bik}} instead. Similarly on all {{tf2branch|1}} games, by default it was set to {{Code|media/valve.avi}}, but launching in 32-bit will play {{Code|media/valve.bik}} and 64-bit will play {{Code|media/valve.webm}} instead.}}


Keep in mind that an AVI video will need to be encoded using the Cinepak codec. It is not known whether audio codecs other than [https://learn.microsoft.com/en-us/windows/win32/xaudio2/adpcm-overview Microsoft ADPCM] are supported.
=== Supported File Formats ===
 
*'''AVI''' is supported in {{gldsrc|1}} (before 2003 & Steam), and {{src|1}} (before {{tobbranch|1}} / {{src07|1}})
DivX is also supported, however there appears to be a size limit to the startup video, so if a video is not played then its file size is too large, this has been tested with an AVI file over 100 MB.
** {{Note|Keep in mind that an AVI video will need to be encoded using the Cinepak codec. It is not known whether audio codecs other than [https://learn.microsoft.com/en-us/windows/win32/xaudio2/adpcm-overview Microsoft ADPCM] are supported.}}
 
** {{Note|DivX is also supported, however there appears to be a size limit to the startup video, so if a video is not played then its file size is too large, this has been tested with an AVI file over 100 MB.}}
You can get the BINK video encoder for free on [http://www.radgametools.com/ Epic Games Tools] (formerly RAD) website.
*'''[[Bink|BIK (Bink Video)]]''' is supported in all Source games since {{src07|1}}.
{{note|RAD Tools is a commercial product and can't be used legally without purchasing a license for its use in your Source mods. This was pointed out to be by Jeff of RAD Game Tools.}}
** You can get the BINK video encoder for free on [http://www.radgametools.com/ Epic Games Tools] (formerly RAD) website.
 
** {{note|RAD Tools is a commercial product and can't be used legally without purchasing a license for its use in your Source mods. This was pointed out to be by Jeff of RAD Game Tools.}}
In {{src07|4}}, when running the game on Windows Vista or later, only the first few seconds of the video will display. After that it will freeze with a "Not Responding" shown on the game's titlebar (if run on windowed mode), or the Busy cursor appears (with hl2.exe is not responding message displaying if you click on it) and you will only hear the video's sound. This was later fixed in the {{src13|4}} and {{l4dbranch|4}}es onwards respectively, likely due to implementation of D3D9Ex ({{src13|1}} only) and SDL 2.0, and these newer games are able to play the startup videos without freezing. Additionally, unlike {{src13|1}} or {{l4dbranch|1}}, the startup intro does not scales at higher resolution.
** {{Note|In {{src07|2}}, when running the game on Windows Vista or later, only the first few seconds of the video will display. After that it will freeze with a "Not Responding" shown on the game's titlebar (if run on windowed mode), or the Busy cursor appears (with hl2.exe is not responding message displaying if you click on it) and you will only hear the video's sound. This was later fixed in the {{src13|4}} and {{l4dbranch|4}}es onwards respectively, likely due to implementation of D3D9Ex ({{src13|1}} only) and SDL 2.0, and these newer games are able to play the startup videos without freezing. Additionally, unlike {{src13|1}} (and later) or {{l4dbranch|1}}, the startup intro in {{src07|name}} does not scales at higher resolution.}}
 
=== Additional File Formats ===
 
*'''MOV (QuickTime)''' is only supported in {{mac|4}}.
*'''MOV (QuickTime)''' is only supported in {{mac|4}}.
*'''WebM''' is only supported in {{gldsrc|4}} (after {{hl}}'s 25th anniversary update), {{csgo|4}} (after Panorama update), {{tf2branch|4}} (launched in 64-bit only), some third-party {{source|4}} games, and fully supported in {{source2|4}} onwards.
*'''WebM''' is supported in {{gldsrc|1}} (after {{hl}}'s 25th anniversary update), {{csgo|1}} (after Panorama update), {{tf2branch|1}} (when launched in 64-bit only), some third-party {{source|1}} games.
** {{src2|1}} also support WebM, however the instructions on how to add custom startup videos shown on this page does not apply to any Source 2 games.


=== To Remove the Startup Video ===
=== To Remove the Startup Video ===

Latest revision as of 23:17, 13 September 2025

Startup Music

Startup music is music that plays on the main menu when booting up the game, but does not play when returning to the main menu from elsewhere in the game.

Source Source Engine

Source will play 🖿sound/ui/gamestartup*.mp3 when it finishes loading the main menu after the application is launched. The asterisk matches anything at all (including nothing), so feel free to give your files descriptive names. If more than one file matches, a choice will be made at random.

All files must be encoded at 44.1 KHz.

Tip.pngTip:Startup music can be disabled by starting with -nostartupsound.
Warning.pngWarning:Only MP3 files are supported, and they do not loop.
PlacementTip.pngWorkaround:If a looping WAV is desired, edit valve.rc to add the line play #*ui/gamestartup.wav (or something similar) to the end of the file. Only one music track is supported using this method.

GoldSrc GoldSrc Engine

GoldSrc will play 🖿media/gamestartup.mp3 or Redbook CD track 29 when it finishes loading the main menu after the application is launched. The track will loop and continue to play until a map is loaded.

Icon-Bug.pngBug:If the game directory is 🖿valve, the startup track will continue to play across multiple maps until another track is called!

Alternatively, create a file named 🖿playlist.txt in the mod's root directory and insert the following (adjusting MP3 path accordingly). The track will play every time the main menu is visited, instead of only upon game startup.

"PlayList"
{
  "Splash" "sound/music/yourmenumusic.mp3"
}

Startup Videos

Startup videos is the video that plays when booting up the game, after the game has reached the end of the list inside the StartupVids.txt file, the main menu appears.

You can change the startup video for a game by placing the following files in the 🖿<moddir>/media folder:

  • 🖿valve.avi file - for GoldSrc GoldSrc (Retail/WON version)
  • 🖿valve.avi file (or other specified in StartupVids.txt) - AVI, for Source 2006 Source 2006 or earlier
  • 🖿valve.bik file (or other specified in StartupVids.txt) - Bink Video, for Source 2007 Source 2007 and later, also Team Fortress 2 branch but only in 32-bit mode.
  • 🖿valve.webm file (or other specified in StartupVids.txt) - WebM, for GoldSrc GoldSrc (post-25th anniversary update), and CS:GO engine branch, Team Fortress 2 branch (64-bit only) aswell as Strata Source.
    • Please note that in GoldSrc (post-25th anniversary), audio in the WebM video is muted and instead the game will try to play the 🖿<moddir>/sound/ui/valve_sound.wav audio file, which is much lower quality when played in-game (unless MetaHook is used).

If you are making a mod for Half-Life 2 Half-Life 2 (or other Source games) you can place any supported video files in your mod's 🖿media folder. In order for the video to play when you start your mod you will need to create a StartupVids.txt file in the 🖿media folder. Inside StartupVids.txt you simply specify the filename(s) of the video(s) you want to be played on a separate line.

For example:

media/vid1.avi media/vid2.bik media/vid3.webm
Icon-Bug.pngBug:In all games on Source 2013 Source 2013, the extension is completely ignored and it will only play bik files. For example, if you set media/video1.mp4 in StartupVids.txt, it will play media/video1.bik instead. Similarly on all Team Fortress 2 branch games, by default it was set to media/valve.avi, but launching in 32-bit will play media/valve.bik and 64-bit will play media/valve.webm instead.  (tested in: Source SDK Base 2013 - Singleplayer, Source SDK Base 2013 - Multiplayer, Team Fortress 2 branch)

Supported File Formats

  • AVI is supported in GoldSrc (before 2003 & Steam), and Source (before Orange Box branch / Source 2007)
    • Note.pngNote:Keep in mind that an AVI video will need to be encoded using the Cinepak codec. It is not known whether audio codecs other than Microsoft ADPCM are supported.
    • Note.pngNote:DivX is also supported, however there appears to be a size limit to the startup video, so if a video is not played then its file size is too large, this has been tested with an AVI file over 100 MB.
  • BIK (Bink Video) is supported in all Source games since Source 2007.
    • You can get the BINK video encoder for free on Epic Games Tools (formerly RAD) website.
    • Note.pngNote:RAD Tools is a commercial product and can't be used legally without purchasing a license for its use in your Source mods. This was pointed out to be by Jeff of RAD Game Tools.
    • Note.pngNote:In Source 2007 Source 2007, when running the game on Windows Vista or later, only the first few seconds of the video will display. After that it will freeze with a "Not Responding" shown on the game's titlebar (if run on windowed mode), or the Busy cursor appears (with hl2.exe is not responding message displaying if you click on it) and you will only hear the video's sound. This was later fixed in the Source 2013 Source 2013 and Left 4 Dead engine branch Left 4 Dead engine branches onwards respectively, likely due to implementation of D3D9Ex (Source 2013 only) and SDL 2.0, and these newer games are able to play the startup videos without freezing. Additionally, unlike Source 2013 (and later) or Left 4 Dead engine branch, the startup intro in Source 2007 does not scales at higher resolution.
  • MOV (QuickTime) is only supported in macOS macOS.
  • WebM is supported in GoldSrc (after Half-Life's 25th anniversary update), Counter-Strike: Global Offensive (after Panorama update), Team Fortress 2 branch (when launched in 64-bit only), some third-party Source games.
    • Source 2 also support WebM, however the instructions on how to add custom startup videos shown on this page does not apply to any Source 2 games.

To Remove the Startup Video

Simply create 🖿StartupVids.txt in 🖿media and leave the contents blank.

If you want to skip the startup videos, you can add the -novid parameter to your Command Line.

Note.pngNote:In Postal III Postal III, the startup video (except the Zoom Platform) was hardcoded into the a entity on the 🖿mainmenu.bsp map instead of the StartupVids.txt file, which would run a command to play all 5 intro files (Akella, RWS, Trashmasters intro, and the Source and Nvidia's PhysX legal and copyright notices). To skip the startup video, rename the following files in 🖿p3/media and 🖿p3_english/media (or 🖿p3_<language>/media) folder:

Alternatively, you can also use -nostartupmenu and -dev at the same time to disable loading the main menu map automatically, and skip the intro.