Skip to main content

Notice

Please be aware that much of the software linked to or mentioned on this forum is niche and therefore infrequently downloaded. Lots of anti-virus scanners and so-called malware detectors like to flag infrequently downloaded software as bad until it is either downloaded enough times, or its developer actually bothers with getting each individual release allow listed by every single AV vendor. You can do many people a great favor when encountering such a "problem" example by submitting them to your AV vendor for examination. For almost everything on this forum, it is a false positive.
Topic: How to Encode Flac like another Flac for a game (Read 281 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to Encode Flac like another Flac for a game

Hello Everyone i was facing lots of problem while encoding Flac file but fortunatly i found your website and i regesterd myself to ask for some of my quistions.
hope you are all fine and things are going well with you.
i am here and i need your help.
I am looking to replace gun and voice sound in Call of Duty Ghost and Advanced Warfare, Both Games and some other titles like Modern warfare 2019 using Infinity ward 6 Engine.
The Sound that they used in game for PC Version is FLAC file with some specific Block in it (refer to screenshots samples) and when i started to edit and modify the FLACs it doesn't work and game voice and that specific Soundfile.pak become silent.
i am attaching the samples ( Flac Samples_original and my Encoding Version.zip) which include 1 sample of orginal flac from Game Call of Duty Ghosts and one Encoded version of my encoding.
you can see in Hex editor the Diffrences between my encoding and original one From Game, its missing a block i thing and i dont know how to write a command line for it.
I am using Flac.exe V 1.2.1 UTC 2007-09-17 same as game engine.
can any body help me with this? and tell me what is Fsize inside Flac File and how to encode that way?
Thanks and sorry for my bad English.

Here is the Link for FLAC samples https://mega.nz/file/HfRjSCgC#3sjxCTRj5 ... fEE0xgEEo4
and Here is the link for Hex editor screenshots https://mega.nz/file/nSZxjQLQ#WhSlqs5pX ... 1CAlv78smw

Re: How to Encode Flac like another Flac for a game

Reply #1
The highlighted parts contain APPLICATION and SEEKTABLE blocks:
Code: [Select]
]$ metaflac --list --application-data-format=hexdump "Original Sound from Game.flac"
...
METADATA block #2
  type: 2 (APPLICATION)
  is last: false
  length: 8
  application ID: 6673697a
  data contents:
    00000000: 6E 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 n[..
METADATA block #3
  type: 3 (SEEKTABLE)
  is last: true
  length: 36
  seek points: 2
    point 0: sample_number=0, stream_offset=0, frame_samples=1024
    point 1: sample_number=11264, stream_offset=17208, frame_samples=1024
The APPLICATION block contains id "fsiz" and 4 bytes of application specific data: 6E 5B 00 00. The application data in the other file ("Someone Modified this ...") is: A0 C6 00 00. What does it mean? I don't know.

Also, AFAIK, the standard tools (flac, metaflac) do not provide any way to set or modify the APPLICATION block.

Re: How to Encode Flac like another Flac for a game

Reply #2
The highlighted parts contain APPLICATION and SEEKTABLE blocks:
Code: [Select]
]$ metaflac --list --application-data-format=hexdump "Original Sound from Game.flac"
...
METADATA block #2
  type: 2 (APPLICATION)
  is last: false
  length: 8
  application ID: 6673697a
  data contents:
    00000000: 6E 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 n[..
METADATA block #3
  type: 3 (SEEKTABLE)
  is last: true
  length: 36
  seek points: 2
    point 0: sample_number=0, stream_offset=0, frame_samples=1024
    point 1: sample_number=11264, stream_offset=17208, frame_samples=1024
The APPLICATION block contains id "fsiz" and 4 bytes of application specific data: 6E 5B 00 00. The application data in the other file ("Someone Modified this ...") is: A0 C6 00 00. What does it mean? I don't know.

Also, AFAIK, the standard tools (flac, metaflac) do not provide any way to set or modify the APPLICATION block.
First of all thanks for your reply and your useful information then I have another question regarding encoding.
Is it possible to encode a flac file and specify the application and seek table so that game can read it correctly?

Re: How to Encode Flac like another Flac for a game

Reply #3
And also could you please help me with command line to set the fsiz ID in flac?
This website is my last chance and the only place where I think I can find my answers.
Thanks again.

 
SimplePortal 1.0.0 RC1 © 2008-2021