Startup Media: Difference between revisions
m (Source 2013 and Left 4 Dead engine branches) |
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified) |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
=== {{src|2}} Engine === | === {{src|2}} Engine === | ||
Source will play '''{{path|sound | Source will play '''{{path|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. | All files must be encoded at 44.1 KHz. | ||
Line 12: | Line 12: | ||
=== {{gldsrc|2}} Engine === | === {{gldsrc|2}} Engine === | ||
GoldSrc will play '''{{path|media | GoldSrc will play '''{{path|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. | ||
{{bug|If the game directory is {{path|valve}}, the startup track will continue to play across multiple maps until another track is called!}} | {{bug|hidetested=1|If the game directory is {{path|valve}}, the startup track will continue to play across multiple maps until another track is called!}} | ||
Alternatively, create a file named {{file|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. | |||
<source>"PlayList" | |||
{ | |||
"Splash" "sound/music/yourmenumusic.mp3" | |||
}</source> | |||
== Startup Videos == | == 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 {{Code|StartupVids.txt}} file, the main menu appears. | '''Startup videos''' is the video that plays when booting up the game, after the game has reached the end of the list inside the {{Code|StartupVids.txt}} file, the main menu appears. | ||
You can change the startup video for a game by placing the following files in the {{path|<moddir> | You can change the startup video for a game by placing the following files in the {{path|<moddir>/media}} folder: | ||
* {{path|valve|avi}} file | * {{path|valve|avi}} file - for {{gldsrc|4}} (Retail/WON version) | ||
* {{path|valve|bik}} file (or other specified in StartupVids.txt) - for {{src07|4}} and later | * {{path|valve|avi}} file (or other specified in StartupVids.txt) - for {{src06|4}} or earlier | ||
* {{path|valve|webm}} file (or other specified in StartupVids.txt) - for {{gldsrc|4}} (post-25th anniversary update), and {{source|4}} games/branches that have been modified to include WebM support (such as {{Strata|4}}), aswell as {{csgobranch|4}} and {{src2|4}}. | * {{path|valve|bik}} file (or other specified in StartupVids.txt) - for {{src07|4}} and later, also {{Tf2branch|1}} but only in 32-bit mode. | ||
* {{path|valve|webm}} file (or other specified in StartupVids.txt) - for {{gldsrc|4}} (post-25th anniversary update), and {{source|4}} games/branches that have been modified to include WebM support (such as {{Strata|4}}), aswell as {{csgobranch|4}}, {{tf2branch|4}} (64-bit only) and {{src2|4}}. | |||
** 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|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). | ||
If you are making a mod for {{hl2| | 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. | ||
For example: | For example: | ||
Line 31: | Line 37: | ||
media/vid3.webm | media/vid3.webm | ||
</nowiki>}} | </nowiki>}} | ||
{{bug|tested={{srcsdk13sp}}, {{srcsdk13mp}}, {{Tf2branch}}|In all games on {{src13|4}}, the extension is completely ignored and it will only play [[bik]] files. For example, if you set {{Path|media/video1|mp4}} in {{Path|StartupVids|txt}}, it will play {{Path|media/video1|bik}} instead. Similarly on all {{tf2branch|1}} games, by default it was set to {{Path|media/valve|avi}}, but launching in 32-bit will play {{path|media/valve|bik}} and 64-bit will play {{path|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. | 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. | ||
Line 40: | Line 47: | ||
For MOV (QuickTime), it is only supported in {{mac|4}}. | For MOV (QuickTime), it is only supported in {{mac|4}}. | ||
For WebM, it is only supported in {{gldsrc|4}} (after {{hl}}'s 25th anniversary update), {{csgo|4}} (after Panorama update), some third-party {{source|4}} games, and fully supported in {{source2|4}} onwards. | For WebM, it 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. | ||
When encoding the startup video note that older versions of {{src07|4}} does not properly support all Bink video resolutions, and only up to 1024x768. When using an unsupported video size (let's say 720x480) only the first few seconds of the video will display. After that it will freeze and you will only hear the video's sound, also the game may possibly briefly freezes with a "Not Responding" shown on the game's titlebar (if run on windowed mode), or the Busy cursor appears with the hl2.exe is not responding message. Another possibility is that the video will not play at all. This was later fixed in the {{src13|4}} and {{l4dbranch|4}}es onwards respectively, and these later games do play the startup videos in higher resolutions without freezing. | When encoding the startup video note that older versions of {{src07|4}} does not properly support all Bink video resolutions, and only up to 1024x768. When using an unsupported video size (let's say 720x480) only the first few seconds of the video will display. After that it will freeze and you will only hear the video's sound, also the game may possibly briefly freezes with a "Not Responding" shown on the game's titlebar (if run on windowed mode), or the Busy cursor appears with the hl2.exe is not responding message. Another possibility is that the video will not play at all. This was later fixed in the {{src13|4}} and {{l4dbranch|4}}es onwards respectively, and these later games do play the startup videos in higher resolutions without freezing. | ||
Line 51: | Line 57: | ||
If you want to skip the startup videos, you can add the {{code|-novid}} parameter to your [[Command Line Options#Source_Games|Command Line]]. | If you want to skip the startup videos, you can add the {{code|-novid}} parameter to your [[Command Line Options#Source_Games|Command Line]]. | ||
{{Note|In {{p3|4}}, the startup video (except the Zoom Platform) was hardcoded into the a entity on the {{Path|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|1}}'s PhysX legal and copyright notices). To skip the startup video, rename the following files in {{path|p3 | {{Note|In {{p3|4}}, the startup video (except the Zoom Platform) was hardcoded into the a entity on the {{Path|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|1}}'s PhysX legal and copyright notices). To skip the startup video, rename the following files in {{path|p3/media}} and {{path|p3_english/media}} (or {{path|p3_<language>/media}}) folder:<br> | ||
*{{path|logo_1_akella|bik}} | *{{path|logo_1_akella|bik}} | ||
*{{path|logo_2_RWS|bik}} | *{{path|logo_2_RWS|bik}} |
Latest revision as of 07:21, 20 May 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 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.

-nostartupsound
.
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.


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 - forGoldSrc (Retail/WON version)
valve.avi
file (or other specified in StartupVids.txt) - forSource 2006 or earlier
valve.bik
file (or other specified in StartupVids.txt) - forSource 2007 and later, also Team Fortress 2 branch but only in 32-bit mode.
valve.webm
file (or other specified in StartupVids.txt) - forGoldSrc (post-25th anniversary update), and
Source games/branches that have been modified to include WebM support (such as
Strata Source), aswell as
CS:GO engine branch,
Team Fortress 2 branch (64-bit only) and
Source 2.
If you are making a mod for Half-Life 2 (or other Source games) you can place any AVI, Bink Video (BIK), MOV (for macOS), or WebM (if the engine has WebM support added) file 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/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: 


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.
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 from RAD on their site at RAD Game Tools

For MOV (QuickTime), it is only supported in macOS.
For WebM, it is only supported in GoldSrc (after
's 25th anniversary update),
Counter-Strike: Global Offensive (after Panorama update),
Team Fortress 2 branch (launched in 64-bit only), some third-party
Source games, and fully supported in
Source 2 onwards.
When encoding the startup video note that older versions of Source 2007 does not properly support all Bink video resolutions, and only up to 1024x768. When using an unsupported video size (let's say 720x480) only the first few seconds of the video will display. After that it will freeze and you will only hear the video's sound, also the game may possibly briefly freezes with a "Not Responding" shown on the game's titlebar (if run on windowed mode), or the Busy cursor appears with the hl2.exe is not responding message. Another possibility is that the video will not play at all. This was later fixed in the
Source 2013 and
Left 4 Dead engine branches onwards respectively, and these later games do play the startup videos in higher resolutions without freezing.
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.



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.