A new TgSmush.dll
Moderator: JeremyaFr
Re: A new TgSmush.dll
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Yes it is.
XWAUCP v1.3 includes the latest version of the custom TgSmush.dll. The original TgSmush.dll is renamed TgSmushOrig.dll.
XWAUCP v1.3 includes the latest version of the custom TgSmush.dll. The original TgSmush.dll is renamed TgSmushOrig.dll.
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the dll to remove the dependence on Visual C++ 2013 Runtime.
TgSmush.2.2.zip
Hello,
I've updated the dll to remove the dependence on Visual C++ 2013 Runtime.
TgSmush.2.2.zip
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
Here is a WIP version.
I've added support for mp4 files.
EDIT: link removed
Here is a WIP version.
I've added support for mp4 files.
EDIT: link removed
- Trevor
- Posts: 539
- Joined: Thu Dec 04, 2014 7:11 pm
If I read correctly you use .mp4 instead if .snm so conversion is not necessary?
Trev
Trev
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
XwaSnmConverter is a tool to convert snm files to avi or convert avi files to snm.
To play a video, you don't need to convert it to the snm format.
The TgSmush dll allow you to play snm, avi, wmv and mp4 videos.
Before a video is played (for instance "video.snm"), the dll searches a file with the same base name ("video") with an extension (in that order) avi, wmv, mp4, or znm. If such a file exists, it is played instead of the snm file.
XwaSnmConverter is a tool to convert snm files to avi or convert avi files to snm.
To play a video, you don't need to convert it to the snm format.
The TgSmush dll allow you to play snm, avi, wmv and mp4 videos.
Before a video is played (for instance "video.snm"), the dll searches a file with the same base name ("video") with an extension (in that order) avi, wmv, mp4, or znm. If such a file exists, it is played instead of the snm file.
- Ace Antilles
- Posts: 7706
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Sorry to be a pain. I really should read the whole thread through first.JeremyaFr wrote: ↑Wed Apr 15, 2020 6:13 pmHello,
XwaSnmConverter is a tool to convert snm files to avi or convert avi files to snm.
To play a video, you don't need to convert it to the snm format.
The TgSmush dll allow you to play snm, avi, wmv and mp4 videos.
Before a video is played (for instance "video.snm"), the dll searches a file with the same base name ("video") with an extension (in that order) avi, wmv, mp4, or znm. If such a file exists, it is played instead of the snm file.

I got it working using the method below. I had to create a false file with the Battle name in.
That's the correct way to do it right?
By just renaming the file MP4 Test to Battle7d didn't work.
Either way I got one to play and it was great! Can the video be any length and quality we need?
Keep on making your magic Jeremy

Bman wrote: ↑Thu Aug 21, 2014 7:38 amOk to test a custom video, say it's called Battle2.avi, one must create an empty file with same name but give it a .snm extention. So just create a new text file with nothing in it, save 0Kb, and rename it, i.e.--Battle2.txt to Battle2.snm with your Battle2.avi file in the .../Movies folder. Your custom video file should also be referenced correctly in the ...FrontRes/Cutscene folder, etc.
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Yes, you need to create an empty snm file.
The game checks whether an snm file exist to determine whether the video is in local Hard Drive or in the CD.
I think that this behavior can be changed. I know where the code is in the EXE.
The game checks whether an snm file exist to determine whether the video is in local Hard Drive or in the CD.
I think that this behavior can be changed. I know where the code is in the EXE.
- Ace Antilles
- Posts: 7706
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Brilliant stuff. It's given my later to do list a lot more to play with too now 
If you want any extra work the old SNM Movie Player by Isildur is a little dodgy.
I expect you could knock up a new player in no time lol It's not important though as we can all see what the videos are in game

If you want any extra work the old SNM Movie Player by Isildur is a little dodgy.
I expect you could knock up a new player in no time lol It's not important though as we can all see what the videos are in game

- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
EDIT: link removed
The use of an empty snm file is no longer needed when you replace the snm file with an other format.
The use of an empty snm file is no longer needed when you replace the snm file with an other format.
- Ace Antilles
- Posts: 7706
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Works PERFECT Jeremy!
I've just had it playing 3 mins of Return of the Jedi, it would have done more in full widescreen and in HD.
Plus there's no limit of how many cut scenes can be added afaik? More on the limit of how many missions can be added.
Another brilliant tool in the XWA modder arsenal

- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
There is no limit in "CUTSCENE.TXT". So the limit is the number of missions.
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've merged the changes from the WIP version into the stable version.
I've uploaded TgSmush v2.3:
TgSmush.2.3.zip
Hello,
I've merged the changes from the WIP version into the stable version.
I've uploaded TgSmush v2.3:
TgSmush.2.3.zip
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the TgSmush dll.
I've fixed a bug where when multiple movies are played, then only the first movie is played.
TgSmush.2.4.zip
Hello,
I've updated the TgSmush dll.
I've fixed a bug where when multiple movies are played, then only the first movie is played.
TgSmush.2.4.zip
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the TgSmush dll.
I've fixed a crash on game start when using the no dinput version of the main hook.
TgSmush.2.5.zip
Hello,
I've updated the TgSmush dll.
I've fixed a crash on game start when using the no dinput version of the main hook.
TgSmush.2.5.zip
- ual002
- Posts: 982
- Joined: Wed Sep 24, 2008 2:23 am
I still have issues viewing custom briefing room animations prior to the briefing if in .avi format. My screen is black, and I think the video audio plays but there is no video. I've tried several codec packs and have not solved it. It seems to work for other people.
Example: https://youtu.be/THWcZFq4oFM
I play a cutscene shortly which I CAN see even though its not shown in the video, but I see the black screen prior to the briefing.
Example: https://youtu.be/THWcZFq4oFM
I play a cutscene shortly which I CAN see even though its not shown in the video, but I see the black screen prior to the briefing.





- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
II think that your screen is black because the avi is encoded with MPEG-4 codec and you don't have a VfW MPEG-4 codec on your system.
You can see available MPEG-4 codecs with this tool:
You can get a VfW MPEG-4 codec from https://www.moviecodec.com/solutions/mp ... nd-3-5098/. Use the option 2 (VfW). Not tested.
Don't install it if you already have a a VfW MPEG-4 codec as listed by the EnumCodecs tool.
By default, videos encoded with a VfW MPEG-4 codec require to install an external codec. One option would be to convert the avi videos with the Motion JPEG codec. This codec requires the .Net framework installed, which is probably the case on all systems.
II think that your screen is black because the avi is encoded with MPEG-4 codec and you don't have a VfW MPEG-4 codec on your system.
You can see available MPEG-4 codecs with this tool:
You can get a VfW MPEG-4 codec from https://www.moviecodec.com/solutions/mp ... nd-3-5098/. Use the option 2 (VfW). Not tested.
Don't install it if you already have a a VfW MPEG-4 codec as listed by the EnumCodecs tool.
By default, videos encoded with a VfW MPEG-4 codec require to install an external codec. One option would be to convert the avi videos with the Motion JPEG codec. This codec requires the .Net framework installed, which is probably the case on all systems.
You do not have the required permissions to view the files attached to this post.
- ual002
- Posts: 982
- Joined: Wed Sep 24, 2008 2:23 am
Sure enough it says no codec found. I'm having difficulty actually DL from that site though. DL never initializes.
UPDATE: Got the FXMPEG4.zip, followed the instructions, it added the .dll file to my system32 folder I did confirm, but Im not sure where the system.ini file is to check for registry updates. Short answer, this did not appear to fix my issue.
UPDATE2: I found system.ini and this is the content after applying the fix.
__________
; for 16-bit app support
[386Enh]
woafont=dosapp.fon
EGA80WOA.FON=EGA80WOA.FON
EGA40WOA.FON=EGA40WOA.FON
CGA80WOA.FON=CGA80WOA.FON
CGA40WOA.FON=CGA40WOA.FON
[drivers]
wave=mmdrv.dll
timer=timer.drv
[mci]
_______________
UPDATE: Got the FXMPEG4.zip, followed the instructions, it added the .dll file to my system32 folder I did confirm, but Im not sure where the system.ini file is to check for registry updates. Short answer, this did not appear to fix my issue.
UPDATE2: I found system.ini and this is the content after applying the fix.
__________
; for 16-bit app support
[386Enh]
woafont=dosapp.fon
EGA80WOA.FON=EGA80WOA.FON
EGA40WOA.FON=EGA40WOA.FON
CGA80WOA.FON=CGA80WOA.FON
CGA40WOA.FON=CGA40WOA.FON
[drivers]
wave=mmdrv.dll
timer=timer.drv
[mci]
_______________
You do not have the required permissions to view the files attached to this post.





- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
What are the values in the registry?
You can see them with regedit.
You can see them with regedit.
Code: Select all
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32", "vidc.mpg4",, "mpg4c32.dll"
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32", "vidc.mp42",, "mpg4c32.dll"
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32", "vidc.mp43",, "mpg4c32.dll"
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc", "mpg4c32.dll",, "MS MPEG-4 v1,2,3 driver 4.00.0.3688"
- ual002
- Posts: 982
- Joined: Wed Sep 24, 2008 2:23 am
Here are some screens.
You do not have the required permissions to view the files attached to this post.





-
- Posts: 10
- Joined: Wed May 25, 2011 5:30 am
I had the same problem (black screen while cutscenes). Then I installed K-lite Codec Pack and now everything's fine. All cutscenes ape now being played perfectly well.
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the TgSmush dll.
Now the video data can be acceeded from another dll.
The video data is shared via a file mapping.
The name is L"Local\\TgSmushVideo".
The pixel format is RGB32.
The format of the data pointer is:
Download:
TgSmush.2.8.zip
Hello,
I've updated the TgSmush dll.
Now the video data can be acceeded from another dll.
The video data is shared via a file mapping.
The name is L"Local\\TgSmushVideo".
The pixel format is RGB32.
The format of the data pointer is:
Code: Select all
struct SharedMemData
{
int videoFrameIndex;
int videoFrameWidth;
int videoFrameHeight;
int videoDataLength;
char* videoDataPtr;
};
TgSmush.2.8.zip
- JeremyaFr
- Posts: 3840
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the TgSmush dll.
The changes are related to the SharedMem feature.
Download:
TgSmush.2.10.zip
Hello,
I've updated the TgSmush dll.
The changes are related to the SharedMem feature.
Download:
TgSmush.2.10.zip