Featured Post

Deus Ex - Extraction Guides (Master Post)

Deus Ex (2000) Extract Audio Extract Textures & Models Deus Ex: The Conspiracy (2002) Extract Video Deus Ex: Invisible War (2003) Extrac...

Saturday, 18 March 2023

Deus Ex: Human Revolution - Extract Audio & Video

Note: All tools used are linked at the bottom of the post.

In this guide I will cover:

  • How to extract content from the game and locate audio and video files
  • How to convert the audio and video into formats such as .wav, .mp3, and .mp4

Extracting the files from the game using Gibbed DeusEx3

  1. Extract the contents of the Gibbed DeusEx3 archive into the installation location for Deus Ex: Human Revolution
  2. Drag and drop BIGFILE.000 onto Gibbed.DeusEx3.Unpack.exe to start the extraction
  3. The command prompt will open showing the progress of the extraction and close when complete


    Note: The extraction will fail if the file path is too long. As shown above, the extraction paths are quite long already, so it’s better to perform this extraction at the root of a drive. If this becomes a problem, you can copy all of the BIGFILEs (000 through 008) into a new folder at the root of the drive you’re using. Be mindful of disk space too, as each extraction has the size of about 17 GB.

  4. The extracted content can be found in the same directory in a folder named BIGFILE_unpack
  5. In this folder there is an .xml namemap which lists all the content. If searching for something in particular in the unpacked folder, this file can be useful to open in a text editor and search for specific things such as music or models

Locate and extract audio

  1. Navigate to the .mul file. In the bigfile.xml namemap and in the filename, voiceover audio is denoted by the prefixes "dia" "rad" "3tr" and are mostly found in the \pc-w\audio\streams\vo\eng folder in each of the extracted folders, as well as in the _UNKNOWN folder, but these are not named clearly. Adam Jensen’s voice is seperate from the NPC audio as well which would be found in the npcs/unique folder under each location Music is located in the default\pc-w\music folder

    Below is a table showing the different kind of voice audio that can be found:
  2. Create a .bat file matching the following command, but pointing to your extraction location of Gibbed.DeusEx3.built - Gibbed.DeusEx3.Demux.exe

    FOR %%A IN (*.mul) DO "...\Gibbed.DeusEx3.Demux.exe" %%A

    Example:

  3. Save it into the folder with the .mul files you want to extract, and run it

  4. The .mul files in the folder are now converted into .fsb files

Convert audio using vgmstream

  1. Extract vgmstream archive. The vgmstream-cli.exe program is supposed to be used within the command line, but also works via the file browser (the following instructions will cover the latter)
  2. Create a .bat file matching the following command, but pointing to your extraction location of vgmstream - vgmstream-cli.exe

    FOR /R %%a IN (*.fsb) DO "...\vgmstream-cli.exe" -l 2 -f 10 -o "%%a.wav" "%%a"

    Example: 
  3. Save it into the folder with the .fsb files you want to convert and run it
  4. The .fsb files in the folder should now be converted into .wav files

    Note: If you don’t want to use this batch method, you can use FSB Extractor - FMOD Sample Bank Extraction Tool to convert the .fsb files, as covered in the next section:

Convert audio using FSB Extractor (alternative method)

  1. Load the .fsb file with Main > Open…
  2. You should now be able to see the contents of the .fsb file, as well as see the other .fsb files in the same folder under Directory Listing
  3. Select the audio sample in the browser > Entries > Extract to Folder… > choose extraction location
  4. The .fsb file should now be exported as an .mp3 file in the folder

Locate and extract video cinematics using VGMToolbox

  1. Navigate to the .usm file. In the bigfile.xml namemap and in the filename, cinematics are denoted by the prefixes "cut" "sce" "cin". Most cinematics can be found within individual folders in:

    BIGFILE_unpack\default\pc-w\design_database\videos\cinematics\final_cinematics

    Example:
  2. Open VGMToolbox > Misc. Tools > Steam Tools > Video Demultiplexer > Options > set the Format to USM (CRI Movie 2) > check Extract Audio and Video > drag and drop the .usm file you want to extract into the grey area
  3. Multiple files will then be extracted in the folder the .usm file was in. The .m2v file is the video, and the .adx files are all audio streams, one with music/sound effects, the rest with voice over, all different based on localisation. The English one should be first, usually denoted with a 1 after the first number, the sfx denoted with a 0. For example in the screenshot below the sound effects are in the file ending in 40534641 and English voice over is the file ending in 41534641. I will come back to this point later when combining the audio and video streams.

Convert cinematic audio using FFmpeg-based ADX converter

  1. Extract the contents of FFmpeg-based-ADX-converter archive
  2. Place the .adx files into the SOUND folder (the output destination will be the SOUND_raw folder)
  3. Run the adx_to_wav.bat > Command Prompt will open and display the status of the conversion
  4. The .adx files should now be converted to .wav streams in the SOUND_raw folder

Convert cinematic video using VLC Media Player

  1. Open VLC Media Player > Media > Convert/Save
  2. The Open Media window will open. Click the Add... button > select the .m2v file you want > drop-down arrow to the right of Convert/Save > Convert
  3. The Convert window will open. Under Settings > Profile drop-down > Video - H.264 + MP3 (MP4) > profile edition (wrench icon)
  4. The Profile edition window will open. Encapsulation tab > check MP4/MOV > Video codec tab > check Keep original video track > Audio codec tab > keep it unchecked (there is no audio in the video) > Save


    Note: You can choose not to modify the original codec to maintain the same quality as shown above, however due to the original file format .m2v the converted output from VLC will be using the MPEG-1 codec even as an .mp4. This kind of video tends to not have support in modern software or browsers, so you may need to change the codec to be "web friendly". To do this when converting you need to set the format to H.264 instead. As for the bitrate, just set it to a number close to the original file and Save.

  5. Back in the Convert window set the destination path by clicking Browse > select folder you want to save the converted file (make sure to change the file extension to .mp4 in the save dialog) > Start
  6. The .m2v file should now be converted into a .mp4 file, and can be played as normal

Combine extracted audio and video into one .mp4 file

As mentioned before, the video cutscenes contain multiple additional audio channels for language localization. In order to combine audio and video a language needs to be selected for the character's voices to be in the final video.
  1. After converting the .adx files into .wav, select the .wav file that contains the stream with the language you want. Then find the main stereo audio channel that has the music, sound effects, and so on (it should be the first one).
  2. Open Audacity (or any other audio editing software you prefer), and load both .wav files as different channels. Do not move them around individually, as they should be synced together automatically.
  3. Select all the audio and export all as a combined Stereo .wav file.
    Now we have a .wav file that contains a mixdown of the music, sound effects, and dialogue, and we have an .mp4 file with video but no sound. These two files need to be combined into one .mp4 file so we can get video with sound. To do this you need ffmpeg.
  4. Download ffmpeg and extract the .zip. Within the extracted files, there should be a folder called bin. Inside bin you should find ffmpeg.exe. Place the .mp4 video and the .wav file you want to combine into this folder.
  5. In the address bar, type in cmd, and tap the enter key. Now a Command Prompt window will open within the folder.
  6. Enter the following command, making sure to match the file names for the .mp4 and .wav with the files you have. Please note that special characters can cause cmd to behave strangely or fail to work properly, so if you run into any issues I would advise just to rename the video to video.mp4 and the audio to audio.wav and then run the command without modifying it:

    ffmpeg -i video.mp4 -i audio.wav -c:v copy -shortest output.mp4

    If you are interested in understanding more about what the command does, I went into more details about it in another guide.
  7. Once complete you'll find a video within the same folder named output.mp4 which should now have both audio and video playing.
View the result on YouTube:

Tools

No comments:

Post a Comment