Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to Encode Flac like another Flac for a game (Read 1851 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.