BLooperZ / remonstered

Builds sound resource for ScummVM using High-Quality SFX and Speech from DOTT Remastered.
GNU General Public License v3.0
23 stars 1 forks source link

Full Throttle .SAN encoding file format #4

Open d0k3 opened 2 years ago

d0k3 commented 2 years ago

.SAN files in Full Throttle are always encoded as OGG, even if no audio format is specified when running remonster.exe.

Shouldn't lossless FLAC be the standard format here? I may be wrong, but OGG leads to a sometimes noticable loss in audio quality and should only be used when specified via the -f ogg command line parameter.

BLooperZ commented 2 years ago

Thank you for the suggestion,

I chose ogg for the cutscenes as they are already encoded in ogg in the remastered edition, (audio stream of ogv) and ideally, using ogg, we could use the audio stream as is without re-encoding.

Although currently, as ScummVM does not support 6 channels of audio, the script has to down-mix the audio to 2 channels. The quality loss is by the down-mixing, something is off in the parameters I used, and I was not able to figure out better parameters myself😅 (please see comment here: https://forums.scummvm.org/viewtopic.php?p=94725#p94725)

please note that currently even when specifying audio format, cutscenes audio stay ogg.

d0k3 commented 2 years ago

Thanks for the detailed reply! This source mentions the downmixing problem as well and suggests keeping SANs as is instead. Dunno if it makes sense, since SCUMMVM shouldn't be able to properly handle anything above stereo (again if I'm not wrong).

SirYodaJedi commented 2 years ago

This source mentions the downmixing problem as well and suggests keeping SANs as is instead. Dunno if it makes sense, since SCUMMVM shouldn't be able to properly handle anything above stereo (again if I'm not wrong).

I might've been the one to write that (it's been a while since I've touched the page, so I'm not sure). IIRC, the unconverted SANs are functionally identical to the classic SANs from the original game, so using them should just result in using the classic (mono/stereo) audio. The remastered FMVs are stored in separate OGV files, with Theora video and Vorbis audio; these are synced up with the SANs by the game engine.

And I also have no clue what would be causing the alleged reverb issues; probably some issue with ffmpeg's default downmixing algorithm differing from how FT:R handles downmixing.

d0k3 commented 2 years ago

I'm not at all familiar with the SCUMMVM source code. Maybe one way to go about it is, check there, or ask a friendly SCUMMVM developer like @dreammaster (crossing my fingers he'll see the notification) how SCUMMVM currently (and in the future) handles the 6 channel audio from those Full Throttle .SANs. Maybe it just throws away everything but the main 2 channels?

SirYodaJedi commented 2 years ago

...how SCUMMVM currently (and in the future) handles the 6 channel audio from those Full Throttle .SANs. Maybe it just throws away everything but the main 2 channels?

Last I checked, if you put a 6-channel Ogg file (from the OGVs) in place of the 2-channel one that ScummVM tools's compress_scumm_san creates from the SAN, then the cutscene audio just doesn't play (see the feature request ticket I made specifically regarding streamlining this problem). Playing just the "main channels" would be slightly more graceful (especially since the rears have dialogue, for some reason), although it wouldn't be as simple as just telling the audio player code to only play back the first two channels, as Vorbis uses a weird non-standard default channel map of FL,C,LR,BL,BR,LFE instead of the more common FL,FR,C,LFE,BL,BR used by other codecs (ex: FLAC, DTS, AC3).