Page 2 of 3

Re: A new TgSmush.dll

Posted: Sat Sep 12, 2015 9:20 am
by JeremyaFr
Yes it is.
XWAUCP v1.3 includes the latest version of the custom TgSmush.dll. The original TgSmush.dll is renamed TgSmushOrig.dll.

Re: A new TgSmush.dll

Posted: Thu Sep 13, 2018 4:00 pm
by JeremyaFr
UPDATE
Hello,
I've updated the dll to remove the dependence on Visual C++ 2013 Runtime.
TgSmush.2.2.zip

Re: A new TgSmush.dll

Posted: Sat Sep 15, 2018 1:24 am
by Bman
Thanks Jeremy.

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 2:43 pm
by JeremyaFr
Hello,

Here is a WIP version.
I've added support for mp4 files.

EDIT: link removed

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 5:54 pm
by Ace Antilles
JeremyaFr wrote:
Wed Apr 15, 2020 2:43 pm
Hello,

Here is a WIP version.
I've added support for mp4 files.


TgSmush_WIP.zip
Great stuff but XwaSnmConverter isn't updated though
So can't select the MP4 file to try and convert

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 6:04 pm
by Trevor
If I read correctly you use .mp4 instead if .snm so conversion is not necessary?

Trev

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 6:10 pm
by Ace Antilles
Trevor wrote:
Wed Apr 15, 2020 6:04 pm
If I read correctly you use .mp4 instead if .snm so conversion is not necessary?

Trev
Possibly but the game needs to know where to look.
I can't see where there is the text file that links the movie names. Renaming just to SNM doesn't work

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 6:13 pm
by JeremyaFr
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.

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 6:35 pm
by Ace Antilles
JeremyaFr wrote:
Wed Apr 15, 2020 6:13 pm
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.
Sorry to be a pain. I really should read the whole thread through first. :blush2:
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 am
Ok 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.

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 6:49 pm
by JeremyaFr
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.

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 6:59 pm
by Ace Antilles
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 :)

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 8:14 pm
by JeremyaFr
EDIT: link removed

The use of an empty snm file is no longer needed when you replace the snm file with an other format.

Re: A new TgSmush.dll

Posted: Wed Apr 15, 2020 9:37 pm
by Ace Antilles
JeremyaFr wrote:
Wed Apr 15, 2020 8:14 pm
TgSmush_WIP.zip

The use of an empty snm file is no longer needed when you replace the snm file with an other format.
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 :)

Re: A new TgSmush.dll

Posted: Thu Apr 16, 2020 8:56 am
by JeremyaFr
There is no limit in "CUTSCENE.TXT". So the limit is the number of missions.

Re: A new TgSmush.dll

Posted: Thu Apr 16, 2020 12:45 pm
by JeremyaFr
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

Re: A new TgSmush.dll

Posted: Sun Jan 17, 2021 5:40 pm
by JeremyaFr
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

Re: A new TgSmush.dll

Posted: Sat Mar 13, 2021 3:46 pm
by JeremyaFr
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

Re: A new TgSmush.dll

Posted: Wed May 19, 2021 2:00 am
by ual002
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.

Re: A new TgSmush.dll

Posted: Wed May 19, 2021 12:59 pm
by JeremyaFr
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:
EnumCodecs.zip

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.

Re: A new TgSmush.dll

Posted: Thu May 20, 2021 12:55 pm
by ual002
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]

_______________

Re: A new TgSmush.dll

Posted: Mon May 24, 2021 9:05 am
by JeremyaFr
What are the values in the registry?
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" 

Re: A new TgSmush.dll

Posted: Mon May 24, 2021 4:09 pm
by ual002
Here are some screens.

Re: A new TgSmush.dll

Posted: Wed Jul 14, 2021 1:40 pm
by bondan
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.

Re: A new TgSmush.dll

Posted: Fri Jul 29, 2022 4:15 pm
by JeremyaFr
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:

Code: Select all

struct SharedMemData
{
    int videoFrameIndex;
    int videoFrameWidth;
    int videoFrameHeight;
    int videoDataLength;
    char* videoDataPtr;
};
Download:
TgSmush.2.8.zip

Re: A new TgSmush.dll

Posted: Sun Aug 14, 2022 9:22 am
by JeremyaFr
UPDATE

Hello,
I've updated the TgSmush dll.

The changes are related to the SharedMem feature.

Download:
TgSmush.2.10.zip