HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: t100base on 2022-04-11 21:58:15

Title: Corrupt ogg file from shutdown device
Post by: t100base on 2022-04-11 21:58:15
Hello,

I was recording something on my android phone with a recording app, and the phone suddenly shutdown. The recording app produced an ogg file with data but it will not play. I've tried vlc, audacity, i've tried importing as raw data in audacity, and there is no data just static sound. I don't know anything about audio file, i tried using a hex editor, but i dont know what am suppose to look for, the corrupt file is missing moov and the mdata line as question marks. I don't know how to recover this file, and it's a very important file.
Title: Re: Corrupt ogg file from shutdown device
Post by: ktf on 2022-04-12 14:58:24
You could try with ffmpeg. Easiest way is by looking in the audacity settings, and installing it from there. Then, import with Import -> Audio and setting File Type to FFmpeg-compatible files.
Title: Re: Corrupt ogg file from shutdown device
Post by: t100base on 2022-04-12 21:04:28
You could try with ffmpeg. Easiest way is by looking in the audacity settings, and installing it from there. Then, import with Import -> Audio and setting File Type to FFmpeg-compatible files.

i have FFmpeg library in audacity, 55.33.100. I tried the import setting with the FFmpeg-compatible files filter rule set to the top, it's not working. when i import as raw data, i chose signed 16 bit PCM, default endianness, 1 channel (mono),44100hz & 4800hz, also tried little-endian, and 2 channels (stereo). I get the same results, static sound. The file has data, so there has to be a way for me to get the sound recording.
Title: Re: Corrupt ogg file from shutdown device
Post by: DVDdoug on 2022-04-12 21:22:47
I don't have a solution but extracting the raw data won't help with compressed files.    Compression is a lot like encryption and it's useless garbage (noise) if it's not decoded/decompressed correctly.   And of course there is less data than you'd have in an uncompressed file so for example, you might have one minute of static noise instead of 5 minutes of music.
 
...You can open a WAV file as raw data if you know (or if you guess) the parameters, and you'll the good audio plus a little click at the beginning where the header is converted to audio data.

Therre are a couple of tools that can sometimes repair MP3 files but I don't know of anything like that for ogg (and I've never searched).
Title: Re: Corrupt ogg file from shutdown device
Post by: rutra80 on 2022-04-12 22:01:47
Importing as PCM can't work, you might try vorbis or opus if available.

Here are all the details of the container:
https://www.xiph.org/ogg/

You might try vorbis-tools if anything is parsable, maybe demux it...
Title: Re: Corrupt ogg file from shutdown device
Post by: Porcus on 2022-04-12 22:48:49
ogg file
[...]
the corrupt file is missing moov
First: are you sure it is Ogg?
What kind of file does the recording app usually produce?
Title: Re: Corrupt ogg file from shutdown device
Post by: t100base on 2022-06-25 00:28:24
Sorry I've been away. the apps produces ogg files, and i will try the vorbis.
Title: Re: Corrupt ogg file from shutdown device
Post by: t100base on 2022-06-25 01:50:57
Sorry I've been away. the apps produces ogg files, and i will try the vorbis.


I installed vorbis-tools, and every time I try to play the file with ogg123, I get "Error opening test.ogg using the oggvorbis module.  The file may be corrupted." This happens even if I play a working file from the recording app. I downloaded a sample ogg file from the internet, and ogg123 plays the file just fine. Also, when I use the command ogginfo for my file is says "ERROR: No Ogg data found in file test.ogg, Input probably not Ogg," it says that for working files from the recording app as well. Now the recording app i'm using spits out files in Ogg format, so it has to be ogg.

I installed Opus tools but i don't know how to use it. I don't know what demux is, but i'm probably going to try that next.

update: opus spits out the same error as vorbis-tool. I don't know what to do.
Title: Re: Corrupt ogg file from shutdown device
Post by: Markuza97 on 2022-06-25 03:14:05
Can you upload corrupted file and one working file (from same app) for us?