bruvzg / gdsdecomp

Godot reverse engineering tools
MIT License
1.34k stars 134 forks source link

Conversion of Resource of type AudioStreamOggVorbis not implemented #146

Closed lyssieth closed 7 months ago

lyssieth commented 8 months ago

System information

Linux (Nobara, kernel 6.5)

Issue description

While trying to recover a project and export the whole thing, it fails to recover the ogg files. Or, rather, it manages some of them, but they don't show up in the asset tree like most other resources, but remain as .godot/imported/*.oggvorbisstr files.

The specific project I'm trying to use this for has a script that looks through the resource tree for the specific audio files, rather than using the imported ones. I'm unsure what for, exactly, but I'd like for it to work so I can further experiment.

Steps to reproduce

  1. Create a project
  2. Import any ogg
  3. Export it (unknown if settings relevant; I did it without embedding pck, enabled all resources)
  4. Try and recover it from the pck
  5. Look for .ogg files

Recovery log

gdre_export.log

Minimal reproduction project

test.zip (file was too big, so it's using my own upload server. using a random car .ogg I found)

lyssieth commented 8 months ago

I tried hacking at it myself for a while today, to no avail. Either I don't understand how the whole importing process works (more likely), or it's just not a two-way process (still likely).

nikitalita commented 8 months ago

I will take a closer look this weekend; can you upload the PCK that this happened on?

lyssieth commented 8 months ago

It's in the test.zip in the first message. It'll download as a long hash and not test.zip because I'm too lazy to add a renaming feature to my content server (I really should do that though)

LunarExpress commented 8 months ago

I have also encountered this issue and look forward to fix. It seems that the packaged ogg file cannot be recovered.

nikitalita commented 8 months ago

They changed how the ogg vorbis streams were packed. I’ll try to add this sometime soon.

VyzerMusic commented 7 months ago

They changed how the ogg vorbis streams were packed. I’ll try to add this sometime soon.

So in the future, it may be possible to convert ".oggvorbisstr" files into ".ogg" or any other type of playable audio file? Cuz I'm having an issue with that and haven't found any ways to get the files to be playable

nikitalita commented 7 months ago

This is probably going to take a while; the data in the ogg resources no longer contains the header information, so just writing the data out will no longer work. Additionally, the libvorbis API is rather unintuitive and doesn't really have functionality for writing out an ogg file; You can apparently can reconstruct headers by feeding it packets and then writing out pages, but I have no idea if that will actually result in a usable ogg file.

VyzerMusic commented 7 months ago

Ah alright, well I'm in no rush or anything, hopefully it ends up being possible in one way or another

nikitalita commented 6 months ago

New release with this in: https://github.com/bruvzg/gdsdecomp/releases/tag/v0.6.0

VyzerMusic commented 6 months ago

THAT'S AMAZING! Thank you so much for your work! Much appreciated!