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
25
XP
64
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,307
Trophies
3
XP
12,100
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
25
XP
64
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
25
XP
64
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
  • No one is chatting at the moment.
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +1
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
    rqkaiju2 @ rqkaiju2: i like physical media because it actually feels like you own it. thats why i plan on burning...