Jump to content

Photo

XWM audio format?


  • Please log in to reply
88 replies to this topic

#11
ZomBBoognish

ZomBBoognish

    Journeyman

  • Members
  • Pip
  • 37 posts
Found a newer version of the DirectX SDK released in 2010, I'll let you know if it contains the XACT program that they use to create xWMA files we're looking for.

Edited by ZomBBoognish, 18 November 2011 - 05:26 AM.


#12
TheSilvan

TheSilvan

    Stranger

  • Members
  • Pip
  • 7 posts
The music files I checked appeared to be encoded in (approximately) 47 kbit/s. Am I doing it wrong or... ? :O

Edit: Now, to make this clear -- I did not directly check the bitrate, but divided file size by time length.

Edited by TheSilvan, 19 November 2011 - 01:47 AM.


#13
GT500

GT500

    Regular

  • Premium Member
  • 51 posts

The music files I checked appeared to be encoded in (approximately) 47 kbit/s. Am I doing it wrong or... ? :O


Considering that the FFmpeg plugin for xWMA was thrown together rather quickly, and was just intended to play game sounds and music for ScummVM, it is possible that it is not reading the bitrate correctly. It is also possible that there is a VLC bug related to that particular FFmpeg plugin.

I honestly don't know much about the xWMA container. From what I've read the audio is usually Windows Media Audio version 2, but there is no requirement to actually encode the audio in a Microsoft format such as WMA.

VLC reports that the XWM files from Skyrim are encoded in WMA (which VLC can play), and the game audio doesn't sound low quality, so chances are it is just an issue with reading the data from the xWMA container. I did check with recent builds of MPlayer for Windows, and they don't appear to be able to play the audio at all, but it is possible that the various MPlayer builds I tried did not include the xWMA plugin for FFmpeg when they compiled the FFmpeg libraries.

I have seen mention of xWMA converters (I never found any of these converters though) using xWMAencode to convert XWM files into something more usable, so someone with more skill in these matters may be able to figure out how to do that. If I get really bored, I may even install a Windows XP VM in VMware Player and see if I can figure out how to do it myself. The only programming language I know is Java, so if I did manage to figure it out then I would probably just write a batch file to automate some of the functions, and then compile that into an EXE.

#14
iceburg

iceburg

    Old hand

  • Premium Member
  • 976 posts
I've found a link that tells me how I can create a batch file to convert all of the songs at the same time (instead of one by one), but I don't know enough to edit it to follow iroquoispliskin's guide. Could anyone make a batch file that we could use to meet those suggestions?
Thank you!

http://wiki.videolan.org/Transcode

ps. I'm using vista/ 7.

Edited by iceburg, 19 November 2011 - 11:42 PM.


#15
Kentoss

Kentoss

    Journeyman

  • Supporter
  • Pip
  • 27 posts
What you'd want to do is download the DirectX SDK for xWMAEncoder.exe, then write a batch program that loops through each xwm file and runs the xWMAEncoder application through command line to get a .wav from the xwm file. I didn't feel like downloading the 500 MB package that is the DirectX SDK, so I looked around for alternate methods for conversion. One I found that is quite tedious but works with a simple download is this program from this post.

Because the author forces the application to look for .wav files instead of xwm files, you have to rename the xwm files to .wav first, then choose that file in the application, then select the output destination and hit convert. Works pretty flawlessly, it's just tedious to do for more than a few files.

#16
LHammonds

LHammonds

    Ghost in da Machine

  • Supporter
  • PipPipPipPipPip
  • 12,333 posts
To convert to and from XWM music files for Skyrim, you need to download Microsoft's DirectX SDK (572MB) in order to get the teeny tiny program called xwmaencode.exe

You then run that command and pass the file names as the parameters.

Syntax: xwmaencode <source> <target>

Example #1 (Convert to XWM)

xwmaencode conan.wav conan.xwm

Example #2 (Convert to WAV)

xwmaencode conan.xwm conan.wav

I might be tempted to write a batch processing script for this...but depends on how much time I have available.

xWMA Command-Line Encoder (documentation)
DirectX SDK (June 2010)

LHammonds

#17
Kentoss

Kentoss

    Journeyman

  • Supporter
  • Pip
  • 27 posts
I decided to go ahead and download the 572 MB SDK to pull out the xWMAEncode.exe for anyone else who's interested in converting the sounds and music found in the game. I didn't see anywhere that said I couldn't upload this particular utility on it's own, but if it is against some rules that I didn't see, please let me know or feel free to remove the link. Here's a step-by-step tutorial for the PC version:

1. First, you'll need a BSA unpacker. As long as it lets you extract the xwm files, it would work fine. I used this BSA unpacker and it did fine.

2. Once we have the unpacker, launch it and navigate it to C:\Program Files\Steam\steamapps\common\skyrim\Data (Note: If your Steam folder differs from the default install location, you'll need to change the path accordingly)

Posted Image

3. Select the Skyrim - Sounds.bsa file and hit open. My program warned me about an unknown version number, and that's OK. Hit Yes to open it anyway. Once inside we should have a list of all the xwm files like so:

Posted Image

From here you can select the files you want to export, then hit extract, or hit extract all to do the whole archive. From here you need to select a destination for the files. I put a folder on my desktop called Skyrim Sound Files, but you can do whatever. Just make sure that you extract the BSA into an empty folder, as the BSA unpacker will create the folders and sub-folders as found in the BSA itself.

4. Now that we have all of the .xwm files from the BSA, we need to get that xWMAEncode.exe from the DirectX SDK I was talking about. I've gone ahead and uploaded that exe for your convenience at this link. Download that file and put it in to the directory that we created earlier, the one that holds all of the sound files and folders.

5. Now we're going to make the magical batch file that loops through all of the xwm files and converts them using xWMAEncode.exe. For convenience, I've also uploaded it at this link. If you download it, make sure you save it to the same folder as xWMAEncode.exe and the sound files.

5a. So first we need to create a new text file in the same directory as xWMAEncode.exe and the sound files and rename it to convert_xwm_to_wav.bat.

5b. Next, right click on the .bat file and click edit.

Posted Image

5c. A blank notepad window should come up. Inside, copy and paste the following:

for /r . %%T IN (*.xwm) do @xWMAEncode.exe "%%T" "%%~pT%%~nT.wav"

5d. Save the file and close the window.

6. Run the newly created convert_xwm_to_wav.bat file and let it finish, otherwise it may not convert everything. It may take a while.

7. Once completed, you should now see the converted .wav files next to the .xwm files like so:

Posted Image

The wav files will be a lot bigger than the xwm files, so make sure you have room for them all. If you want to further compress the files, you can convert them to mp3 with something like dbPoweramp or lame.exe.

If you need further assistance feel free to ask and I'll do my best to help! :)

#18
nandchan

nandchan

    Fan

  • Banned
  • PipPipPip
  • 289 posts
If there's an ffmpeg plugin to decode it, then transcoding to PCM is straightforward - but if the bitrate of the XWM files is low, there's nothing you can do save for buying the OST CD box.

Edited by nandchan, 21 November 2011 - 04:22 PM.


#19
Sulo

Sulo

    Pirate Captain

  • Premium Member
  • 755 posts

I decided to go ahead and download the 572 MB SDK to pull out the xWMAEncode.exe for anyone else who's interested in converting the sounds and music found in the game.


You, sir, made me really, really happy, y'know?

BIIIIIIG Thanks and kudos - everything works more than fine, without stuttering and any other crap. Whoa... :thumbsup:

#20
pierrota411

pierrota411

    Stranger

  • Members
  • Pip
  • 1 posts
hey! im peter from france, i have just understand your very good tutorial to convert in xwma format audio file, just want to thx you a lot, continue share audio pack beacause, it s beautyfull theme song and i dont know the artist.




Page loaded in: 1.082 seconds