ogg file from telegram

Hello, when i open ogg files, previously saved from the Telegram Desktop App, Audacity close immediately without errors, even if i drag the ogg file and then drop it on Audacity interface, simply, Audacity vanish.
i use audacity 2.2.2 on windows 10 1607 32 bit.
the same file copied with usb stick on xubuntu and opened with audacity 2.2.1 works fine.
i think is a windows issue, cause if i remember right, even version 2.2.1 and 2.1.3 they had the same behavior.
there is something i can do to fix this?
apart of converting in another format obviously…
Thanks in advance…

Can you create a small test file for us to try?

sure, here it is

That file is not really an OGG file. It is an opus file that has been named as an OGG file.

audio_2018-08-22_08-35-11.ogg
Format                                   : OGG
File size                                : 25.1 KiB
Duration                                 : 10s 475ms
Overall bit rate                         : 19.6 Kbps

Audio
ID                                       : 1901067049 (0x714FFB29)
Format                                   : Opus
Duration                                 : 10s 475ms
Channel(s)                               : 1 channel
Channel positions                        : Front: C
Sampling rate                            : 16.0 KHz
Compression mode                         : Lossy
Writing library                          : libopus unknown-fixed

Audacity does not natively support Opus. If FFmpeg is installed, Audacity will attempt to use FFmpeg for importing Opus files.
On Linux (Xubuntu 16.04), FFmpeg handles the file with no problem (despite the wrong file extension). I’ve not tried on Windows yet.

Does your Telegram Desktop App give any options for the files it creates?

i don’t see any option in telegram to change the audio format.
this audio files, are vocal notes that i download to my pc trought the Desktop version of the Telegram App.
if i download a vocal from Whatsapp Web for example (Opus extension), are be imported normally.
i had try to rename .ogg in .opus but no luck.
i have installed from Audacity site both library, LAME and FFMPEG.
But why vanish? instead to show an error message for unsupported file format for example?

I’m pretty sure that is not intended. My guess is that FFmpeg is crashing, which is then taking down Audacity. I may be able to discover a little more when I get chance to try this on Windows.

I’m getting the same results. Audacity closes when I try to open the file. (Audacity 2.2.2, win10 64-bit)

I was able to convert the file to WAV with TAudioConverter. (TAudioConverter sometimes gives an error when starting in Windows 10, but after a couple of tries it runs.)

I’ve not tested, but I expect that Foobar2000 will be able to convert it (https://www.foobar2000.org/)
Foobar2000 is also an excellent, free, lightweight audio player for Windows.

I use Foobar2000 from Win98… :slight_smile:
I think the file have some problem, but is audible in foobar, aimp and irfanview but i need to convert it for be used with audacity

Testing with Audacity 2.2.2 on Windows 10 64-bit, Audacity crashes when attempting to import “audio_2018-08-22_08-35-11.ogg”

Testing with Audacity 2.3.0 alpha on the same machine, the file is imported correctly.
Audacity 2.3.0 is due to be released in a few weeks.

Workaround until Audacity 2.3.0 is released:
The current version of Foobar2000 is able to convert the opus file to a WAV file, which can then be imported into Audacity.

Problem found!
i have read the file structure of ogg container: https://www.loc.gov/preservation/digital/formats/fdd/fdd000026.shtml
So, i’ve opened in hexadecimal editor the ogg file

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  4F 67 67 53 00 02 00 00 00 00 00 00 00 00 29 FB  OggS..........)û
00000010  4F 71 00 00 00 00 2A 36 18 3A 01 13 4F 70 75 73  Oq....*6.:..Opus
00000020  48 65 61 64 01 01 38 01 80 3E 00 00 00 00 00 4F  Head..8.€>.....O
00000030  67 67 53 00 00 00 00 00 00 00 00 00 00 29 FB 4F  ggS..........)ûO
00000040  71 01 00 00 00 29 E1 7B AF 03 FF FF FE 4F 70 75  q....)á{¯.ÿÿþOpu
00000050  73 54 61 67 73 15 00 00 00 6C 69 62 6F 70 75 73  sTags....libopus
00000060  20 75 6E 6B 6E 6F 77 6E 2D 66 69 78 65 64 00 00   unknown-fixed..
00000070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000090  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000A0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000D0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000120  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000130  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000140  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000150  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000160  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000170  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000180  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000190  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001A0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001D0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000200  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000210  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000220  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000230  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000240  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000250  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000260  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000270  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000280  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000290  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000002A0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000002B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000002C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000002D0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000002E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000002F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000300  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000310  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000320  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000330  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000340  00 00 00 00 00 00 00 00 00 4F 67 67 53 00 00 40  .........OggS..@
00000350  0B 00 00 00 00 00 00 29 FB 4F 71 02 00 00 00 34  .......)ûOq....4
00000360  29 A8 52 01 14 58 02 F9 15 71 9D 30 D8 AB 98 40  )¨R..X.ù.q.0Ø«˜@
00000370  35 17 AE 13 27 5A E2 5C 97 4F 67 67 53 00 00 80  5.®.'Zâ\—OggS..€
00000380  16 00 00 00 00 00 00 29 FB 4F 71 03 00 00 00 13  .......)ûOq.....
00000390  EB C6 08 01 14 58 01 B8 DD 7C E5 54 B0 FA 12 74  ëÆ...X.¸Ý|åT°ú.t
000003A0  99 F1 CD 1A 7F 6E A9 FB AC                       ™ñÍ..n©û¬

this are the first 3 “pages” of the file…

i think that the sub-pages that contains zeroes are the problem, maybe other audio players simply skip that part but for Audacity is a problem.
if i change that part with this:

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  4F 67 67 53 00 02 00 00 00 00 00 00 00 00 29 FB  OggS..........)û
00000010  4F 71 00 00 00 00 2A 36 18 3A 01 13 4F 70 75 73  Oq....*6.:..Opus
00000020  48 65 61 64 01 01 38 01 80 3E 00 00 00 00 00 4F  Head..8.€>.....O
00000030  67 67 53 00 00 00 00 00 00 00 00 00 00 29 FB 4F  ggS..........)ûO
00000040  71 01 00 00 00 29 E1 7B AF 01 21 4F 70 75 73 54  q....)á{¯.!OpusT
00000050  61 67 73 15 00 00 00 6C 69 62 6F 70 75 73 20 75  ags....libopus u
00000060  6E 6B 6E 6F 77 6E 2D 66 69 78 65 64 4F 67 67 53  nknown-fixedOggS
00000070  00 00 40 0B 00 00 00 00 00 00 29 FB 4F 71 02 00  ..@.......)ûOq..
00000080  00 00 34 29 A8 52 01 14 58 02 F9 15 71 9D 30 D8  ..4)¨R..X.ù.q.0Ø
00000090  AB 98 40 35 17 AE 13 27 5A E2 5C 97 4F 67 67 53  «˜@5.®.'Zâ\—OggS
000000A0  00 00 80 16 00 00 00 00 00 00 29 FB 4F 71 03 00  ..€.......)ûOq..
000000B0  00 00 13 EB C6 08 01 14 58 01 B8 DD 7C E5 54 B0  ...ëÆ...X.¸Ý|åT°
000000C0  FA 12 74 99 F1 CD 1A 7F 6E A9 FB AC              ú.t™ñÍ..n©û¬

the file works great

the header tells me that the first page have 3 sub-pages, 03 that are longs FFh (255), FFh (255) and FEh (254) characters

00000040 71 01 00 00 00 29 E1 7B AF 03 FF FF FE 4F 70 75 q…)á{¯.ÿÿþOpu

so, deleting all unnecessary zeroes, remains 1 sub-page, 33 characters long… 21h (33)

00000040 71 01 00 00 00 29 E1 7B AF 01 21 4F 70 75 73 54 q…)á{¯.!OpusT
00000050 61 67 73 15 00 00 00 6C 69 62 6F 70 75 73 20 75 ags…libopus u
00000060 6E 6B 6E 6F 77 6E 2D 66 69 78 65 64 … … … … … nknown-fixed

Ok, Great!