Is there a way to *extract* the opus audio stream out of a WEM file?

Catjj

Member
OP
Newcomer
Joined
Mar 10, 2023
Messages
8
Trophies
0
Age
24
XP
54
Country
France
Greetings, people of GBAtemp!

I've recently ripped all the content of xenoblade chronicles definitive edition's romFS container using ryujinx. after a little bit of research, I managed to get my hands on the game's BGM folder. As expected, the music files are stored into a proprietary, not-wildly-compatible format: The WEM file format. However, examining the files with vgmstream revealed something truly unexpected: the files are actually encoded as 196kbps CBR opus ! I was wondering if there was not a way to simply extract that opus stream without transcoding, but vgmstream is unable to do so: I can either directly convert the files to opus (and taking the risk of further degrading perceivable audio quality), or convert them to a lossless format like FLAC (and creating a file 10x bigger than it should be). Would perhaps anyone here know a tool to simply extract that opus stream without any additional quality loss?

In any case, thanks for reading this! May everyone have a magnificent day ! :)
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,280
Trophies
3
XP
12,046
Country
Poland
Uh, you are sure vgmstream is not just copying opus streams to compatible with PC players file without reencoding? Since Nintendo OPUS as it is is not compatible with PC audio players because of header differences. I have never heard about vgmstream using lossy conversion. Either it's copying streams to any format supported by audio players on PC that supports those streams, or it's unpacking them to lossless WAV.


Send here some original files as examples.
 
  • Like
Reactions: Ryccardo

Catjj

Member
OP
Newcomer
Joined
Mar 10, 2023
Messages
8
Trophies
0
Age
24
XP
54
Country
France
as far as I know, vgmstream does not seem to offer additional encoding/decoding options; meaning that, right now, the only way for me to turn those WEM files into OPUS ones is to use foobar2000's "convert" option, which *does* transcode the audio. I've attached 2 samples: an original wem file, and an opus file directly converted from that wem file (192kbps VBR). I've picked VBR to show that the opus file's bitrate variates, whereas the one of the wem file does not. That clearly indicates that the opus file has been re-encoded. Also choosing 196 CBR opus for conversion would not help either, as the file still has to be re-encoded, and would just result in an even lower audio quality...:(

EDIT: I can't upload the samples as the archive containing them is too big to be attached to this post. I also can't provide a Google drive link as I am a new user. My apologies :(
 
Last edited by Catjj,

Catjj

Member
OP
Newcomer
Joined
Mar 10, 2023
Messages
8
Trophies
0
Age
24
XP
54
Country
France
Thanks for reminding me that vgmstream was not ONLY a foobar plugin X)
I've tried using the command line window version Annnnd... I had no luck with it🥲 The output file will always be in wav format no matter what command I type, or libraries I install.... :(
Well, at this point I think I will just stop bothering you guys and try to get in touch with the vgmstream community to see if what I'm asking for is even feasible.

But, in any case, thank you so much for taking the time to help me! I wish you, as well as every marvelous person here, a superb day! :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: BO1 is good, all 3 modes are good in that game