A new TgSmush.dll

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Re: A new TgSmush.dll

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Sep 12, 2015 9:20 am

Yes it is.
XWAUCP v1.3 includes the latest version of the custom TgSmush.dll. The original TgSmush.dll is renamed TgSmushOrig.dll.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Sep 13, 2018 4:00 pm

UPDATE
Hello,
I've updated the dll to remove the dependence on Visual C++ 2013 Runtime.
TgSmush.2.2.zip

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Sep 15, 2018 1:24 am

Thanks Jeremy.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 15, 2020 2:43 pm

Hello,

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

EDIT: link removed

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Apr 15, 2020 5:54 pm

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
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Wed Apr 15, 2020 6:04 pm

If I read correctly you use .mp4 instead if .snm so conversion is not necessary?

Trev

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Apr 15, 2020 6:10 pm

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
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » 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.

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Apr 15, 2020 6:35 pm

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.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 15, 2020 6:49 pm

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.

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Apr 15, 2020 6:59 pm

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 :)
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 15, 2020 8:14 pm

EDIT: link removed

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

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Apr 15, 2020 9:37 pm

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 :)
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 16, 2020 8:56 am

There is no limit in "CUTSCENE.TXT". So the limit is the number of missions.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 16, 2020 12:45 pm

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

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jan 17, 2021 5:40 pm

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

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 13, 2021 3:46 pm

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

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed May 19, 2021 2:00 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.
Image Image Image Image Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed May 19, 2021 12:59 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu May 20, 2021 12:55 pm

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]

_______________
You do not have the required permissions to view the files attached to this post.
Image Image Image Image Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon May 24, 2021 9:05 am

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" 

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon May 24, 2021 4:09 pm

Here are some screens.
You do not have the required permissions to view the files attached to this post.
Image Image Image Image Image

bondan
Cadet 4th Class
Posts: 10
Joined: Wed May 25, 2011 5:30 am

Post by bondan » Wed Jul 14, 2021 1:40 pm

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.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Jul 29, 2022 4:15 pm

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

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Aug 14, 2022 9:22 am

UPDATE

Hello,
I've updated the TgSmush dll.

The changes are related to the SharedMem feature.

Download:
TgSmush.2.10.zip

Post Reply