PDA

View Full Version : UT3 Oggextract: tool to extract music and sounds from upk files


Nereid
27th Jan 2008, 04:26 PM
[repost from before crash]

A while ago I wrote a program that extracts Ogg files that are embedded inside upk files. I was motivated to write this because there was no way to extract data from cooked upk files in UnrealEd, and I wanted to export UT3 sounds.

This is a command-line program, so to use it (on Windows), extract the binaries somewhere, open the command prompt and navigate to this directory, and type the command oggextract blah.upk assuming blah.upk is the path to the upk file you want to obtain sounds from. Unfortunately, I haven't quite figured out how to name the files properly, so at the moment you'll get filenames that resemble A_Music_GoDown.upk_0000168b.ogg, which unfortunately isn't very helpful if there are a lot of sounds in the package (for the curious, 0000168b is the (hexadecimal) offset in the file where the beginning of the ogg file is found). If I feel like it I might try to figure out how to get the names of the SoundNodeWave objects one day.

Note that this program should be able to extract embedded Ogg data from any files, not just upk files. Feel free to use the code for whatever you want.

Latest version: December 30, 2007.

Download and source at http://moriya.ca/oggextract/

EisWiesel
28th Jan 2008, 02:59 PM
link doesnt work, get timeout everytime :(

thx at first, would be very usefull and much needed, i just searched for some kind of programm to rip ogg-files from cooked upk-packages all the last time cause i need "A_Music_RomUT05.A_Music_RomUT05Mix" in my ut-tracklist :D

[edit] link work now after 2 days...
looks good, recommend people should put files to C:\WINDOWS\system32 to have it global in commandline

Nereid
30th Jan 2008, 01:16 AM
It didn't work because my internets was dead yesterday, Sorry. :P

[VaLkyR]Anubis
30th Jan 2008, 10:51 AM
Nereid you rocks,thank you very much for this tool.:-)

Raynor.Z
30th Jan 2008, 10:56 AM
Yeah, now I can extract Coret music, thanks for that utility.

mirrodin
6th Oct 2008, 03:30 PM
Nice utility! as a composer myself I find this should make it much easier for me to be able to analyze how the composers for the retail game developed the music samples. That way I can easily just line up each cue into my DAW and write my own composition to match whatever arrangement i chose from the retail song's pieces i put together. A really useful and quick way of coming up with your own music!

pine
29th Oct 2008, 10:50 PM
It takes some work, and you get a lot of disjointed/useless files, but worth the effort imho. Thanks Nereid! :tup:

mirrodin
30th Oct 2008, 12:44 AM
I wonder if it's possible for this utility to be expanded to extract the ogg files with their respective titles stored inside the packages.

<X-EvE-X>
7th Apr 2009, 02:47 PM
after download when i double klick the application it comes up but dissapears immediately

Kazimira
7th Apr 2009, 03:17 PM
Is there a way to do the same with immage files? I want to export some stuff for skinning but the editor freaks out on me.

gades
11th Apr 2009, 06:29 AM
after download when i double klick the application it comes up but dissapears immediately

You have to run it from the commandline:
Start Button/Run/cmd
A Dos box should pop up. Use cd:\directoryname to change directories, to where you placed oggextract. Then go oggextract whatever.upk (I drag a copy of the upk file to the oggextract directory 1st).

Nereid
12th May 2009, 02:17 AM
I wonder if it's possible for this utility to be expanded to extract the ogg files with their respective titles stored inside the packages.

I have no idea what the .upk file structure is like. I just search the file for stuff that looks like pieces of an Ogg file and extract them.

Psy_Commando
10th Oct 2009, 08:18 PM
hey there, yesterday I stumbled on your neat little program, while I was looking for something to extract mass effect sounds and music. I was a little annoyed that the filename wouldn't get extracted, so I gave a shot at messing around with the code.

It should name properly the extracted audio, and an output dir can be specified. I rewritten the whole main function, added lots of comments, and turned it into c++. However, because I used windows.h, its only for windows, but only a few functions need to be changed to make it linux compatible. I included the source code, the exe, and the visual studio 2005 sln.

I hope someone will find this useful.

Waffnuffly
10th Oct 2009, 10:47 PM
Oh, I'll have to try this again on the Gears of War music, as I used oggextract to grab all that stuff. When I extracted the UT3 music, I used some other program someone made that grabbed the titles, but that didn't work for GoW.

Teridax
17th Oct 2009, 02:58 PM
I'm having a bit of trouble with this; whenever I try and run the prompt, I get the following error message:

This application has failed to start because cygwin1.dll was not found. Re-installing the application may fix this problem.

I've got no clue why it's doing this. I moved the files to C:\WINDOWS\system32, and everything should technically be working. I'm kind of guessing that the fact that I have Vista has something to do with it. Any help with this would be greatly appreciated. :)

Raynor.Z
17th Oct 2009, 04:49 PM
It says the cause: you need file named cygwin1.dll to be in same directory (or path) with your executable.
Try from here: http://www.dll-files.com/dllindex/dll-files.shtml?cygwin1

Teridax
17th Oct 2009, 05:35 PM
I did move the cygwin1.dll that came with the oggextractor to the same directory, though, and it still says that it can't find it.

Edit: That's weird, I used the cygwin1.dll you linked to, and it worked once, but now I'm getting the same error again.

colir
18th Feb 2010, 03:25 AM
Hello,
i'm a newbbie with command line.
Can someone explain me how to extract sound from gears of war step by step please?

thanks you

Pablooo
24th Mar 2010, 02:03 PM
Hello, I donīt know if I did something wrong but I extracted the ogg files from the UT3 demo but no one plays. I tried in Winamp that supports oog vorbis and VLC.
I got 37 files from the CookedPC directory like
VCTF-Suspense_LOC_int.ut3_000837df or
UTFrontEnd.ut3_01371f35

Any hint on whatīs going on?
btw I used Nereid extractor.

Thanks in advanced.

GreatEmerald
24th Mar 2010, 03:01 PM
IIRC it doesn't work on demo files.

Pablooo
28th Mar 2010, 06:04 PM
:(
Thanks for clearing it out, I better get the full one :)

Ionium
1st Apr 2010, 10:42 PM
hey there, yesterday I stumbled on your neat little program, while I was looking for something to extract mass effect sounds and music. I was a little annoyed that the filename wouldn't get extracted, so I gave a shot at messing around with the code.

It should name properly the extracted audio, and an output dir can be specified. I rewritten the whole main function, added lots of comments, and turned it into c++. However, because I used windows.h, its only for windows, but only a few functions need to be changed to make it linux compatible. I included the source code, the exe, and the visual studio 2005 sln.

I hope someone will find this useful.

How to use it? Everytime I try extract.exe soundfile.upk sounds, it doesnt work, says exporting 0 files...

Ionium
17th Apr 2010, 02:28 AM
Anyone?

Glorfindel
8th May 2010, 11:55 AM
I did move the cygwin1.dll that came with the oggextractor to the same directory, though, and it still says that it can't find it.

Edit: That's weird, I used the cygwin1.dll you linked to, and it worked once, but now I'm getting the same error again.

vista 32 bit or 64 bit?

GreatEmerald
22nd Jul 2010, 11:19 AM
I have to say thanks once again to both Nereid and Psy_Commando for this, it works on Mass Effect just perfectly.
(I can't believe the Mass Effect soundtrack doesn't include the awesome Virmire Combat music...)

von Boomslang
2nd Oct 2010, 08:24 AM
Hmm. Trying the extractor on files from The Scourge Project, the first one works, the second one doesn't (extracting 0 files). Much thanks anyway.

zynthetic
4th Oct 2010, 06:03 AM
How to use it? Everytime I try extract.exe soundfile.upk sounds, it doesnt work, says exporting 0 files...

Missed this.
If there is audio it should extract something. Not every upk labeled as audio actually contains audio, some just have nodes. You can usually tell based off the filesize. Extraction only seems to work properly on x32. If you're using a 64bit OS it will extract garbage. The files will be created but none of them seem to be created properly; unplayable.

GreatEmerald
4th Oct 2010, 08:29 AM
Missed this.
If there is audio it should extract something. Not every upk labeled as audio actually contains audio, some just have nodes. You can usually tell based off the filesize. Extraction only seems to work properly on x32. If you're using a 64bit OS it will extract garbage. The files will be created but none of them seem to be created properly; unplayable.

I'm using Win7 x64 and it extracts things just fine.

(Note: 64-bit = x64, 32-bit = x86 :) )

DJHicks
10th Oct 2011, 06:47 PM
So Sorry to "necro post" but i was sent over to here via google and have now registered as i'm really enjoying all the reading here.

I was wondering if anyone could upload the Ogg Extracter as the address in the OP is not working.

Most appreciated thank you very much!

Nereid
10th Oct 2011, 10:18 PM
Oops, sorry, the DNS thing for that domain was out of date. Should be working now, or at least in a few hours.

edit: Actually I just changed the link to a domain name I actually try to maintain. Hopefully it never goes down now.

DJHicks
11th Oct 2011, 07:31 AM
Excellent thank you very much!!!

Squishpoke
28th Oct 2011, 06:02 AM
C:\Windows\System32 C:\Users\MyUserName\Desktop\oggextract\oggextract.exe
Usage: oggextract <filename>
C:\Windows\System32 oggextract A_Character_CorruptEnigma.upk
'oggextract' is not recognized as an internal or external command, operable program or batch file.

:(

http404error
19th Dec 2011, 10:27 PM
Thank you so much! Works like a charm. (Used it on Mirror's Edge to great success).

Psy_Commando's version didn't work for me, though. I'm on Windows 7 x64, if that matters.

Squishpoke: you need to be in the folder containing the program to invoke it.

cd ..
cd ..
cd Users
cd MyUserName
cd Desktop
cd oggextract
oggextract A_Character_CorruptEnigma.upk

...Provided you copied that upk into the /oggextract/ folder on your desktop. It's not going to search the whole computer for that file.

For anyone else who needs help, this nifty guide was just a few google steps away: http://www.cs.princeton.edu/courses/archive/spr05/cos126/cmd-prompt.html

Bi()ha2arD
20th Dec 2011, 08:31 AM
change directory to C:\Users\MyUserName\Desktop\oggextract\ , then run the command. you probably need to specify the complete path to the upk file too.
That or you just drop the oggextract.exe into the same folder as the .upk, navigate to that folder in cmd and then just execute oggextract A_Character_CorruptEnigma.upk

http404error
20th Dec 2011, 10:19 AM
Thanks! Worked like a charm.

However, Psy_Commando's didn't work, even on files that worked with the original.