Join also our Discord channel! Click here.

Extracting Audio files from Assassin's Creed Valhalla

Get help on any and all audio formats, or chip in and help others!
Post Reply
Karimmusa
ultra-n00b
Posts: 6
Joined: Wed Nov 18, 2020 10:04 pm
Been thanked: 1 time

Extracting Audio files from Assassin's Creed Valhalla

Post by Karimmusa » Wed Nov 18, 2020 11:38 pm

Hey guys,
I've been trying for atleast two days with this game and I can't for the life of me convert the files extracted from the pck file
So I extracted the music for Assassin's Creed Origins simply by using WWise unpacker and it worked like a charm.

For this game it's a pck file and when extracting the files I'm met with .WAV files
so for the music.pck file it gives me 691 file, only 122 get converted by wwise to ogg files.
The rest of the files are simply not convertable WAV files.
I either get
Parse error: expected 0x42 fmt if vorb Messing
or
parse error: unknown chunk type
Depending on the tool

I tried using a wwise_ima_adpcm tool but I cannot seem to convert the files to wem in the first place
Here are some sample files

https://mega.nz/fm/R2hTxIBI
Can anyone atleast confirm if they are corrupted files or something?

Anyone can help with this please?
Thanks in advance

brendan19
ultra-veteran
ultra-veteran
Posts: 380
Joined: Thu Aug 12, 2010 8:15 am
Has thanked: 54 times
Been thanked: 87 times

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by brendan19 » Fri Nov 20, 2020 4:30 pm

You haven't included the decryption key for the MEGA folder.

Karimmusa
ultra-n00b
Posts: 6
Joined: Wed Nov 18, 2020 10:04 pm
Been thanked: 1 time

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by Karimmusa » Fri Nov 20, 2020 4:56 pm

Sorry about that
I've uploaded the original PCK file to Gdrive, can you help me with that?
https://bit.ly/3kQnNQd

LinkOFF
beginner
Posts: 22
Joined: Mon Sep 08, 2014 12:32 am
Has thanked: 5 times
Been thanked: 2 times

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by LinkOFF » Fri Nov 20, 2020 6:24 pm

QuickBMS Script:

Code: Select all

# scan data for wave files
# RIFF and RIFX header supported
# note: There are wave files with a wrong file size after RIFF/RIFX
#       This script takes the stream size, adds the header size and writes the correct size after RIFF/RIFX
# (c) 2012-06-26 by AlphaTwentyThree
#
# future update plans:
# - option to also write data between found wave files to disk
# - option to automatically transform the file to a playable or at least decodable format

for i = 1                        # run through loop with count variable i
   FindLoc OFFSET string "WAVE" 0 ""   # search for "WAVE", save position as variable OFFSET
   if OFFSET == ""                  # when nothing is found
      cleanexit                  # the script exits (e.g. at end of file)
   endif
   math OFFSET -= 8               # jump to possible
   goto OFFSET                     # RIFF/RIFX file start
   getDstring IDENT 4               # read string of 4 bytes, save variable as IDENT
   if IDENT == "RIFX"               # differentiate between header possibilities
      endian big                  # set endianness to big, if file has RIFX identifier
      callfunction write 1         # see function section below
   elif IDENT == "RIFF"            # endianness stays little
      callfunction write 1         # also run function
   else                        # string "WAVE" found, but doesn't belong to wave file
      set SIZE 0xc               # do as if something with 0xc bytes was found to continue search from the right position
   endif
   set SEARCH OFFSET               # set marker to position from where to search next
   math SEARCH += SIZE               # (that would be after the file that was found)
   if SEARCH == FSIZE               # in case the last found file ends with the main file, we exit
      cleanexit
   endif
   goto SEARCH                     # if we haven't exited the script above, we set out cursor to after the last found file
next i

startfunction write                  # function "write" starts here, is called when a wave file is found above
   get NAME basename               # save name without extension under variable NAME
   string NAME += "_"               # add underscore to the name
   string NAME += i               # add the loop variable to the name
   goto OFFSET                     # set cursor to the beginning of the found file
   get DUMMY long                  # RIFF/RIFX identifier, not needed
   get DUMMY long                  # riff size, not needed
   get DUMMY long                  # "WAVE", not needed, we arrive at the "fmt " section
   for                           # loop search for the "data" section at the start of the stream (get the stream size from there)
      getDstring AREA_NAME 4         # name of area in header
      get AREA_SIZE long            # size of area in header
      savepos MYOFF               # save position we are at
      if AREA_NAME == "data"         # when we arrive at the needed "data" area:
         break                  # we exit the loop
      else                     # otherwise:
         if AREA_NAME == "LIST"      # that's the area of the marker names
            callfunction retrievename 1 # see below
         endif
         math MYOFF += AREA_SIZE      # not reached "data" area -> adjust cursor position...
         goto MYOFF               # ... and go there
      endif
   next                        # remember: the cursor is now directly at the stream start
   set STREAMSIZE AREA_SIZE         # the last AREA_SIZE is the size we need (size of the audio stream)
   set HEADERSIZE MYOFF            # 
   math HEADERSIZE -= OFFSET         # calculate the size of the stream header (offset - offset = size)
   set SIZE HEADERSIZE               # 
   math SIZE += STREAMSIZE            # calculate complete file size (header + stream = file)
   log MEMORY_FILE OFFSET SIZE         # write file to memory
   math SIZE -= 8                  # subtract 8 bytes to get the riff size
   putVarChr MEMORY_FILE 4 SIZE long    # write the correct riff size to the header inside the memory
   string NAME += ".wav"            # add extension to the name (the name could contain the name of the first marker if the file has markers)
   math SIZE += 8                  # add the subtracted 8 bytes again
   log NAME 0 SIZE MEMORY_FILE         # write file in memory to disk
endfunction                        # remember that we continue with our next i now!

startfunction retrievename            # get possible file name from first marker name, rmember: our cursor is after the size of the LIST area
   get DUMMY long                   # always "adtl", not needed
   get DUMMY long                  # always "labl", not needed
   get MSIZE long                  # size of the label area for this marker
   math MSIZE -= 4                  # subtracting 4 bytes leaves us with the length of the marker label
   get DUMMY long                  # marker type, not needed
   getDstring MNAME MSIZE            # cursor is at the beginning of the label name, now get the marker name with the desired length MSIZE
   string NAME += "~"
   string NAME += MNAME            # add the marker name to the file name
endfunction

Karimmusa
ultra-n00b
Posts: 6
Joined: Wed Nov 18, 2020 10:04 pm
Been thanked: 1 time

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by Karimmusa » Fri Nov 20, 2020 8:34 pm

I'm not having any problems in extracting the files from the pck, I'm having a problem in converting them into playable files.
When I use your script I get the WAV files but they are simply unplayable and cannot be converted.

Karimmusa
ultra-n00b
Posts: 6
Joined: Wed Nov 18, 2020 10:04 pm
Been thanked: 1 time

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by Karimmusa » Fri Nov 20, 2020 9:09 pm

Here are some sample .wem files that I managed to extracted, and they are simply not getting converted to any playable form

https://drive.google.com/file/d/1e4Zbde ... sp=sharing

LinkOFF
beginner
Posts: 22
Joined: Mon Sep 08, 2014 12:32 am
Has thanked: 5 times
Been thanked: 2 times

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by LinkOFF » Sat Nov 21, 2020 6:10 pm

Karimmusa wrote:
Fri Nov 20, 2020 8:34 pm
I'm not having any problems in extracting the files from the pck, I'm having a problem in converting them into playable files.
When I use your script I get the WAV files but they are simply unplayable and cannot be converted.
Try this - https://github.com/Vextil/Wwise-Unpacker
Works perfectly for me with your first sample file.

Karimmusa
ultra-n00b
Posts: 6
Joined: Wed Nov 18, 2020 10:04 pm
Been thanked: 1 time

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by Karimmusa » Sat Nov 21, 2020 8:24 pm

LinkOFF wrote:
Sat Nov 21, 2020 6:10 pm
Karimmusa wrote:
Fri Nov 20, 2020 8:34 pm
I'm not having any problems in extracting the files from the pck, I'm having a problem in converting them into playable files.
When I use your script I get the WAV files but they are simply unplayable and cannot be converted.
Try this - https://github.com/Vextil/Wwise-Unpacker
Works perfectly for me with your first sample file.
I'm sorry can you tell me exactly how were you able to do that? Were you able to convert the 1030365303.wem file in this link ?
https://drive.google.com/file/d/1e4Zbde ... Mrwu9/view
And if so can you share with me how were you able to do that?
Thanks

Karimmusa
ultra-n00b
Posts: 6
Joined: Wed Nov 18, 2020 10:04 pm
Been thanked: 1 time

Re: Extracting Audio files from Assassin's Creed Valhalla

Post by Karimmusa » Sun Nov 22, 2020 11:00 pm

Posting this here for anyone trying the same
I was able to extract everything and play it
here is how
First thing you need to do is to extract the files usind this tool only!
https://github.com/bnnm/wwiser-utils/bl ... ractor.bms
It will extract everything in .wem format
make sure that you use the latest version of Quick bms from here :
https://aluigi.altervista.org/quickbms.htm
Third: install Foobar 2000 from here :
https://www.foobar2000.org/download
and lastly install this plugin for Foobar 2000 :
https://vgmstream-builds.s3-us-west-1.a ... -component
after installing it and applying it you should be able to play all the files and convert them

Post Reply