Duke4.net Forums: How to replace the .ANM videos with .IVF videos with sound. - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

How to replace the .ANM videos with .IVF videos with sound.  "A tutuorial on how to replace them crappy looking ANM videos."

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#1

Note: This tutorial is directed at Window users mainly.

Want to replace the old Nuke intro say with something like this?



OPTION 1

Well this has been possible for quite some time now but not documented very well and can be a pain in the ass for some users to get their head around, so I thought I would be a nice guy again and make another "help me" thread on how to do it.

Step 1:
Go to this link: http://video.online-...convert-to-webm (Good idea to book mark this page)
Use the Youtube video link in the "Or enter URL of the file you want to convert to WEBM:"
Leave all the other options for now and click "Convert File"
Save the file to your desktop when prompted.
Important part: You should have a file called "Nuke_Symbol_Explosion_Intro_from_Duke_Nukem_3D_XBL.webm" saved on your desktop, rename the extension of it (the webm part) to "mkv"

Step 2:
Download MKVToolNix windows installer.
When prompted, also download the "MKVExtractGUI-2" option when the "MKVToolNix" has finished installing, this will make your life a lot more easier.
http://sourceforge.n....8.zip/download (In case you didn't download it from the installer)

Step 3:
Place the "MKVExtractGUI2.exe" from the "MKVExtractGUI-VERSIONNUMBER.zip" into the install directory of "MKVToolNix"
Default location is C:/Program Files/MKVToolNix/
Right click "MKVExtractGUI2.exe" and create a shortcut to it on your desktop for easy accessibility in future.

Step 4:
Run "MKVExtractGUI2.exe" from either the install folder or shortcut (if you made one)
Select "Nuke_Symbol_Explosion_Intro_from_Duke_Nukem_3D_XBL.mkv" as the input file on the desktop (or where ever you may have saved this file to from Step 1)
Set your output directory to the desktop or somewhere else handy.
Important part: Click the check box for "Track 1" (this is the video stream of the video)
Click "Extract"
You can now close MKVExtractGUI2.exe
Posted Image

Step 5:
You should now have a file on your desktop called "Nuke_Symbol_Explosion_Intro_from_Duke_Nukem_3D_XBL_track1_und"
Rename this file to "LOGO.IVF"
Place this file into the directory of your Duke Nukem folder. (where eduke32.exe is located)

Now if you load up eduke32 you will now be presented with a new Nuke logo animation but there is no sound! (The logo animation may also play a bit horribly, this will be explained later)
We will work on the sound next.

Step 6:
Assuming that you have the HRP installed, open up the HRP zip/folder (depending on how you have it installed)
Open the "duke3d.def" file with any text editor and under the line
"include duke3d_hrp.def" place this line, "animsounds logo { 1 244 64 14 }"

So it should look like this:
include duke3d_hrp.def
animsounds logo { 1 244  64 14 }


If you do not have the HRP installed just make a new text file with "animsounds logo { 1 244 64 14 }" on the first line and save it as "duke3d.def" and save it in the same location as "eduke32.exe"

This will give you the FLY_BY and PIPEBOMB_EXPLODE sound as the original LOGO.ANM video has, it is quite possible to use the sound from the Youtube video but this requires to extract the sound from the video, convert the sound to a OGG, DEFfine it etc.

Things to note:

Videos can only replace the hard coded ANM (sorry we cant add new videos at this time it seems)
cineov2
cineov3
RADLOGO
DUKETEAM
logo
vol41a
vol42a
vol4e1
vol43a
vol4e2
vol4e3


Some videos can play rather horribly due to the way they are decoded/encoded.
Hendricks266 has already converted the xbox 360 videos into the correct format, and also play much smother than the above guide. (But you will still need to add your own sounds)
http://hendricks266....e32_vp8_xbla.7z
He also converted the PSX version ones also.
http://hendricks266....ke32_vp8_psx.7z

How the sound and DEF commands work:
The syntax is as follows:
  animsounds <anim> { frame1 sound1  frame2 sound2 ... }

<anim> has to be one of the tokens: cineov2, cineov3, RADLOGO, DUKETEAM,
logo, vol41a, vol42a, vol4e1, vol43a, vol4e2, or vol4e3, corresponding
to hard-coded Duke3D anims.

The frameN's (1-based frame numbers) have to be in ascending order (but not
necessarily strictly ascending, so that a frame may have more than one sound).

Example: for Duke3D's XBLA nuke logo animation (IVF extracted from nuke.webm),
the following definition overlays the video with a sound sequence similar
(identical save for timing) to the original nuke animation:

// frame 1: FLY_BY, frame 64: PIPEBOMB_EXPLODE
animsounds logo { 1 244  64 14 }

So what this says is that at frame 1 we will play sound number 244 which is defined as "FLY_BY" in DEFS.CON then at frame 64 we will play sound 14 which is defined as "PIPEBOMB_EXPLODE"

With this information you should be able to extract the audio from a video which you want to use, encode that as a .ogg define it in your DEFS and use the line.
animsounds logo { 1 MY_NEW_SOUND_NUMBER }

Credit goes to Helixhorned and Hendricks266.

This post has been edited by Cody: 09 May 2012 - 09:14 PM

10

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#2

OPTION 2

Step 1:
Download the latest FFmpeg static build for 32-bit or 64-bit depending on your system.

Step 2:
You will need WinRAR, 7-Zip or other program that can extract from 7z archives.
Extract the contents of ffmpeg to your Desktop or elsewhere.

Step 3:
Right click "ffmpeg.exe" which is inside the "bin" folder and create a shortcut to it. (Leave the shortcut in the same folder as ffmpeg.exe)

Step 4:
Place the video you wish to convert into the bin folder, same folder as your new shortcut and ffmpeg.exe should be located.

Step 5:
Right click your new shortcut and click properties.

Step 6:
In the target line you should see something along the lines like:
"E:\Users\The Commander\Desktop\ffmpeg-20120509-git-a548671-win32-static\bin\ ffmpeg.exe"

After the last semicolon we need to insert these commands.
-i <input> -an -vcodec libvpx -quality best <output>.ivf 

<input> refers to the EXACT file name of the movie you placed in the same folder, e.g. MYMOVE.AVI
<output> refers to the name of the converted movie, e.g. LOGO (You do not need to specify an extension here)

So our target should now look something like this:
"E:\Users\The Commander\Desktop\ffmpeg-20120509-git-a548671-win32-static\bin\ ffmpeg.exe" -i MYMOVIE.avi -an -vcodec libvpx -quality best LOGO.ivf

Press Apply and then OK to save the changes to the shortcut.

Step 7:
Run the shortcut and a console window should open up and it will now be converting your video to LOGO.ivf
This could take some time depending on the length of your video.

Thanks goes to Hendricks266 for pointing out this method, even though he might not use it this way, I believe this is the most "user friendly" way to explain it to someone that may be a bit "n00b"

This post has been edited by Cody: 09 May 2012 - 09:37 PM

3

User is offline   Micky C 

  • Honored Donor

#3

I've only skimmed over it, but it seems like a lot of work for something as small as a short intro movie that plays maybe once every time you fire up eduke. Will videos ever be easier to work with?
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#4

View PostMicky C, on 09 May 2012 - 03:47 AM, said:

I've only skimmed over it, but it seems like a lot of work for something as small as a short intro movie that plays maybe once every time you fire up eduke.

You can replace any ANM video with ANY video, this is something that would be quite useful for TC/MOD developers as one of the hardest things to replace was the ANM videos.
With this method, projects like AMC TC, WGR2 could have real intro videos etc.
I can trust you that this method is no where near as hard or complicated compared to replacing the original .ANM back in the day.
Example, back then you had to your was made up of a bunch of.PCX files, they all had to be in the correct palette of the video you were replacing, limited to 256 colours, and you had next to none controls over sound and play speeds etc.

View PostMicky C, on 09 May 2012 - 03:47 AM, said:

Will videos ever be easier to work with?

I do not know how this could be any easier, all I have done here is shown the user how to convert a video to a format/handle that is not widely used by most common media players and how to define it in eduke.
How much simpler could you want it, DivX encoded AVI's or BINK videos? Sure if you have thousands of dollars to pay for licensing fees sure it's possible.

EDIT: As far as I know there is also no time limit, so in theory you could have a 5 minute intro video. (Or a movie)

This post has been edited by Cody: 09 May 2012 - 04:10 AM

0

User is online   fgsfds 

#5

Is it still impossible to add intro and ending cutscenes for your own episodes?
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#6

View Postempy, on 09 May 2012 - 04:32 AM, said:

Is it still impossible to add intro and ending cutscenes for your own episodes?

View PostCody, on 09 May 2012 - 03:16 AM, said:

Videos can only replace the hard coded ANM (sorry we cant add new videos at this time it seems)
cineov2
cineov3
RADLOGO
DUKETEAM
logo
vol41a
vol42a
vol4e1
vol43a
vol4e2
vol4e3


So if your episode using any of them videos, then yes you can replace them.
I am afraid I do not know the names of which videos play when at this time, maybe Hendricks or someone else could help with this.

Edit: It is quite possible to set your episode up like episode 4 so that the original videos play (duke getting his mission and putting his glasses on) and replace them from there.

This post has been edited by Cody: 09 May 2012 - 04:41 AM

0

User is offline   DNSkill 

  • Honored Donor

#7

Thanks! This should be very useful for me in the future.
0

User is offline   Jimmy 

  • Let's go Brandon!

#8

I think this deserves a sticky.
3

User is offline   sedition 

#9

View PostCody, on 09 May 2012 - 03:59 AM, said:

You can replace any ANM video with ANY video, this is something that would be quite useful for TC/MOD developers as one of the hardest things to replace was the ANM videos.


Does that mean I could replace the Intro with a let´s say 5 minutes video of I want to?
That would be a great thing.

Anyway, thanks for the tutorial, Cody. I´ll try this out soon.
I looked through this on the Eduke wiki and didn´t got any clue how that should work.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #10

View PostCody, on 09 May 2012 - 03:16 AM, said:

Some videos can play rather horribly due to the way they are decoded/encoded.
Hendricks266 has already converted the xbox 360 videos into the correct format, and also play much smother than the above guide. (But you will still need to add your own sounds)
http://hendricks266....e32_vp8_xbla.7z
He also converted the PSX version ones also.
http://hendricks266....ke32_vp8_psx.7z

This is a very good tutorial in terms of the file setup, but the actual conversion process is as simple as FFmpeg and this command line:

ffmpeg -i <input> -an -vcodec libvpx -quality best <output>.ivf


You'll get much better results than with a web-converter, and it will work with just about every input video format that exists. Note that the "-an" specifically disables audio from being added to the output file.

View PostCaptain Awesome, on 09 May 2012 - 11:56 AM, said:

I think this deserves a sticky.

Nah, this is better suited for the wiki.
1

User is offline   MusicallyInspired 

  • The Sarien Encounter

#11

Nice! Can someone remind me how I can add my own sounds again (with a unique number, not overriding other sounds)? Is that done by altering the CONs? I assume you can't just add your own number in a sounds.def file without first defining that number in DEFS.CON? Because that doesn't seem to be working for me. Keeps saying "invalid sound" in the log.

EDIT: n/m. Didn't add it USER.CON as well.

This post has been edited by MusicallyInspired: 09 May 2012 - 06:41 PM

0

User is offline   Hank 

#12

Not sure about modern coders; I add a sound name to the def.con, say Belly and give it the next available number, 459.
the def.con looks like this
define BELLY  459

then I spell out the details in the user.con

definesound BELLY  feuer3.ogg      0   0   255 12  0

I am typing to slow. lol anyway ok n/m Posted Image

This post has been edited by Hank: 09 May 2012 - 06:46 PM

1

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#13

I used my second post to show how you can convert videos using FFmpeg that Hendricks pointed out.
2

User is online   fgsfds 

#14

How can I set custom framerate and resolution when using ffmpeg? Documentation says about -r and -s parameters, but "-r 15" or "-s 1280x720" doesn't work.

This post has been edited by empy: 09 May 2012 - 11:54 PM

0

User is offline   OpenMaw 

  • Judge Mental

#15

QUESTION: Would it be possible to implement functionality to allow IFV's to be used as a form of animated texture?
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#16

It would be a great feature, but I dont think it's something that viable as of now.
Although Helix would know the real answer.
0

User is offline   thatguy 

#17

Any idea of when we might see an updating on making new Animations instead of replacing hardcoded ones? Also, can these be triggered at will through the con?
0

User is offline   Helixhorned 

  • EDuke32 Developer

#18

View Postempy, on 09 May 2012 - 11:52 PM, said:

How can I set custom framerate and resolution when using ffmpeg? Documentation says about -r and -s parameters, but "-r 15" or "-s 1280x720" doesn't work.

Is this a question about ffmpeg usage or presumed incorrect displaying of ffmpeg-encoded videos in EDuke32? The frame rate in particular is calculated like in a VP8 code example: there's some strange fallback case to 30 fps, where I'm unsure what it's supposed to do.

View PostCommando Nukem, on 08 July 2012 - 02:57 PM, said:

QUESTION: Would it be possible to implement functionality to allow IFV's to be used as a form of animated texture?

Theoretically yes, since what we do now is re-upload each frame of the video to one reserved GL texture. However, the interface with the game world would have to be worked out, and on the implementation side there's probably adding another fragment shader bit to Polymer.

View Posts.b.Newsom, on 10 July 2012 - 10:48 AM, said:

Any idea of when we might see an updating on making new Animations instead of replacing hardcoded ones? Also, can these be triggered at will through the con?

Well, features are hacked into EDuke32 on a when-it's-needed basis (at least sometimes). Would you need animations in between a running game, or only on arbitrary map change boundaries?
0

User is offline   LeoD 

  • Duke4.net topic/3513

#19

Cody, may I use your intro in my Z-Pack?

View PostCommando Nukem, on 08 July 2012 - 02:57 PM, said:

QUESTION: Would it be possible to implement functionality to allow IFV's to be used as a form of animated texture?

View PostHelixhorned, on 10 July 2012 - 11:28 AM, said:

Theoretically yes, since what we do now is re-upload each frame of the video to one reserved GL texture. However, the interface with the game world would have to be worked out, and on the implementation side there's probably adding another fragment shader bit to Polymer.
Animated PNG? I could imagine this might be easier to implement though less powerful.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #20

View PostLeoD, on 10 July 2012 - 02:23 PM, said:

Cody, may I use your intro in my Z-Pack?

Where did Cody make his own? The one in the YouTube video at the top is the one from the XBLA port; he linked to my high-quality FFmpeg conversion of it in his post. You may use it unrestricted by me because 3D Realms made it. However, 1) ideally it would be in the mainline HRP, since we already replaced Parkar's logo renders with the XBLA menu images, and 2) it would be best if we made our own, both for copyright and because the new nuke logo has at least one noticeable problem: the explosion looks fake, instead of it dissipating like the original, it's simply a texture that rotates and shrinks in size, and it looks bad.

View PostLeoD, on 10 July 2012 - 02:23 PM, said:

Animated PNG? I could imagine this might be easier to implement though less powerful.

If we are also going forward with a frame-by-frame option it would be best to go with ProAsm's idea, simply a sequence of images in a zip file. However, since VP8 format is already in, adding a different format is not a shortcut to success.
0

User is offline   thatguy 

#21

View PostHelixhorned, on 10 July 2012 - 11:28 AM, said:

Well, features are hacked into EDuke32 on a when-it's-needed basis (at least sometimes). Would you need animations in between a running game, or only on arbitrary map change boundaries?


In map, individual instances. I want to be able to trigger as many individual clips/animations in specific instances in any part of a given map, trigger either by a trigger or interaction (all controlled through con).
0

User is offline   LeoD 

  • Duke4.net topic/3513

#22

View PostHendricks266, on 10 July 2012 - 06:10 PM, said:

Where did Cody make his own? The one in the YouTube video at the top is the one from the XBLA port; he linked to my high-quality FFmpeg conversion of it in his post. You may use it unrestricted by me because 3D Realms made it. However, 1) ideally it would be in the mainline HRP, since we already replaced Parkar's logo renders with the XBLA menu images, and 2) it would be best if we made our own, both for copyright and because the new nuke logo has at least one noticeable problem: the explosion looks fake, instead of it dissipating like the original, it's simply a texture that rotates and shrinks in size, and it looks bad.
I admit I just FlashGot the vid from Post#1 and was too lazy to read the rest of the thread too thoroughly...
Your FFmpeg command line proposal yields pretty bad/lowres results because FFmpeg has an interesting interpretation of -quality best.
Other than CON, DEF or MHK files, the IVF clip can not be put into an autoloaded zip file or a -jDIR. This should be changed before starting to replace the animations.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#23

@Cody: about those "slow" vids, could you see if the newest revision makes them any better? I was quite astonished when my 3-year old PC performed much better than my brother's one which he recently upgraded (I think it's the memory modules). The current revision will also print out some statistics after playing a video, so we can compare them for a given one, for example, Hendricks' old rip of the Nuke logo animation from XBLA. I'm especially interested in cases where the decoding can't keep up with the actual frame rate.

My values:
Spoiler

sidenote: this shows how unpredictable it will be performance-wise to decode VP8 videos in-game...


View PostLeoD, on 12 July 2012 - 03:44 PM, said:

(...) the IVF clip can not be put into an autoloaded zip file or a -jDIR.

Loading an IVF file from a zip file or a "game_dir"/"-j" directory both work for me. Dunno about the autoload stuff, since I'm not using it.
1

User is offline   sedition 

#24

Just a quick note on converting a video to WebM:
If you don't want to use an online converter or you have a video on your hard drive already which you want to convert, you also can use the Free WebM Video Converter by DVDvideosoft. It comes along with Freestudio (I'm currently using version 5.6.1).
Just have a look at www.dvdvideosoft.com
0

User is offline   OpenMaw 

  • Judge Mental

#25

View PostLeoD, on 10 July 2012 - 02:23 PM, said:

Cody, may I use your intro in my Z-Pack?

Animated PNG? I could imagine this might be easier to implement though less powerful.


To a point that would be awesome... BUT, I was thinking more along the lines of created full motion clips to replace the three framers in the original game. I don't think an animated PNG could do the interloping needed for that.
0

User is offline   LeoD 

  • Duke4.net topic/3513

#26

View PostHelixhorned, on 13 July 2012 - 12:18 PM, said:

Loading an IVF file from a zip file or a "game_dir"/"-j" directory both work for me. Dunno about the autoload stuff, since I'm not using it.
My "-jDIR" command line had an inherited -nologo. D'oh! :(
But the autoload/-gZIPFILE problem remains for me. I have attached my test setup. (Just add eduke32 and duke3d.grp).

Attached File(s)



This post has been edited by LeoD: 15 July 2012 - 05:18 AM

0

User is online   blizzart 

#27

I´ve just tested this with the first option (video only - I haven´t merged in the sound, yet), Cody, and it works absolutely fine.

Even a video with about four minutes runs smooth as logo.ivf. I downloaded the video from Youtube with FreeStudio and converted it with the first option you´ve posted. The quality is still very good.

Thank you for this tutorial!
1

User is offline   Zaxtor 

#28

Is there a length limit of vid?
When you make excessively long ANM (in old eduke ~2009) it can crash.

Well haven't tried long AMN in new eduke....................YET.


But if we replace that existing ANM with this stuff can it let us make very long clips without crashing or etc.
0

User is offline   Zaxtor 

#29

Played with it a bit.
Had little trouble but as soon updated to the newest duke it worked.

Played with it, I put a random vid and vid was like over 3mins or so for logo. It played the vid completely without any issues.
Vid plays little slower than normal (ultima online) test vid I used.

I'll adapt to speed issues since UO and Duke are diff games.

Also is cool you can control the sounds and not obligated to use sounds that you don't want.
of course has to be in .def file.

I called mine vidclips.def and defined it in duke3d.def of course.

And again is a damn cool thing.

This post has been edited by Zaxtor: 20 October 2012 - 09:04 PM

0

User is online   fgsfds 

#30

What frame rate should IVF have? I have video with 15 fps and it seems eduke runs it with 30 fps, because it plays 2x faster.
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options