File placed in "audio files" category as well as added to playlist.
Some audio files are categorized as just files.
Operating system: Manjaro Linux x64
Version of Telegram Desktop: 1.6.2
Used theme: Default
Example of file that was categorized as just "file":
test.ogg
test.opus
I've got the same problem for mp3 files as well. The problem has been persisting for quite a while. Sometimes it works on my laptop, but not on my desktop even though both are running the most up-to-date version of Manjaro x64 and telegram-desktop from the community repository. I think there is a package/are packages missing...
There are hundreds of audio codecs available. To support every single one is not easy. And eg. ogg is a container and not a codec/stream. The ogg file which you provided contains a video and an audio stream. The video stream is corrupted though.
I have removed the video stream from your file and voila it works as an audio file in Telegram.

The second one is the fixed one.
Your original test.ogg
$ ffmpeg -i test.ogg -hide_banner
[ogg @ 0x55accd891880] 8192 bytes of comment header remain
[ogg @ 0x55accd891880] invalid pts -104
Input #0, ogg, from 'test.ogg':
Duration: 00:08:24.27, start: 0.000000, bitrate: 215 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 224 kb/s
Metadata:
ARTIST : Ария
ALBUM : Мания Величия
track : 03
TITLE : Волонтёр
GENRE : Heavy Metal
DATE : 1985
Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 300x300 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Cover (front)
title : Обложка.jpg
Removing the video stream:
$ ffmpeg -i test.ogg -vn -c:a copy test3.ogg
The fixed ogg
$ ffmpeg -i test3.ogg -hide_banner
Input #0, ogg, from 'test3.ogg':
Duration: 00:08:24.27, start: 0.000000, bitrate: 213 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 224 kb/s
Metadata:
ARTIST : Ария
ALBUM : Мания Величия
track : 03
TITLE : Волонтёр
GENRE : Heavy Metal
DATE : 1985
ENCODER : Lavf57.83.100
About your second file. I guess it is just not a supported codec by Telegram. If you look at fileinfo.com eg. It already says:
The Opus codec is used for Voice over IP (VoIP), video conferencing, in-game chat. The Opus format was standardized by the IETF and is maintained by Xiph.Org.
Since the Opus codec is primarily used for streaming, files with the ".opus" extension that are encoded with the Opus codec are not common.
~ https://fileinfo.com/extension/opus
And so I don't even know why it should be used to listen to music. Usually, you do not want to use codecs which are for communication because most of the time they are very lossy and so do not have good quality for video. Imagine being on the phone with a friend, most of the time the sound of his/her voice sounds noticeably different than in real life. And now imagine using this quality for music. XD I don't think you would want that.
https://mega.nz/#F!EoklhC6B!PXWNAWY0aeLTxHh8D6Jpkw
Here are the files for you to test by yourself.
yes that test.ogg is corrupted. I can't play it with mpv and ffprobe give me errors. (IDK why it works for you probably because of ffmpeg version or whatever it doesn't matter)
[ogg @ 0x7f3c648a61c0] 8192 bytes of comment header remain
[ogg @ 0x7f3c648a61c0] Header processing failed: Invalid data found when processing input
test.ogg: Invalid data found when processing input
But I tried a ogg vorbis and ogg opus with cover art (.ogg), telegram-desktop (v1.6.7) also don't recognize it as audio.
Currently telegram-desktop seems does not recognize .opus as audio file at all.
According to RFC7845
9. Content Type
......
The RECOMMENDED filename extension for Ogg Opus files is '.opus'.
lots of applications are still using .ogg for Ogg Opus files probably due to historical reasons.
@Nachtalb
And so I don't even know why it should be used to listen to music.
- Most of music on YouTube are in opus format, you usually get a opus file in webm container when you
youtube-dl -f bestaudio. For some music I can only find on YouTube, I download it by using youtube-dl and use ffmpeg to add title (to including the youtube link) with-c:a copy, I use.opusas extension cuz it's just one opus audio stream.- For some lossless music I download from various source for free, bought from online music store, I usually encode it in opus format with a target rate of 160 kbit/s.
- opus seems also widely used for soundtrack in games? am not sure about this cuz I rarely play games.
- opus is an amazing audio codec, it's not only suit for VoIP but also perfect for listening to music.
I have original.flac (4:50, with cover art 700x700) transcode to mp3 with ffmpeg, andopusencto opus.
original.flac 35M
mp3_320k.mp3 12M
mp3_abr_320k.mp3 11M
mp3_v0.mp3 8.9M
mp3_v3.mp3 6.0M
opus_160k.opus 5.7M
opus_128k.opus 4.6M
By looking at spectrum of these audio files, you will notice that MP3 320k (CBR) which is adopted by most of online music stores are actually cut 20kHz+, while opus VBR always cut 20kHz+ and still remain a few. MP3 VBR keeps more on 20kHz+, but 20kHz+ is not important, you can't heard the differences anyway.
and for blow 20kHz, the quality
opus 160k > opus 128k > mp3 320k > mp3 v0
while opus 160k just about half size of mp3 320k.
Opus Recommended Settings | xiph.org
Music Storage
Opus at 128 KB/s (VBR) is pretty much transparent
opus 160kbit/s was considered as a very high quality encode.
for people who store lossless music and upload to Telegram, they may encode by themselve and result in find out how great opus is and use it.
I have some music I store in lossless format but convert to opus with correct metadata and cover art and listing on my smartphone, and sometimes I upload it to telegram and listen to it.
Currently I need to convert to opus on computer, adb push to my phone, and upload it from telegram-android (have to keep the resolution of covert art lower than 900x900 or it will be upload as file instead of music).
or remove the album art and rename to .ogg so that I can send via telegram-desktop, but it's a ugly approach for sharing opus music.
It could be much convenient some people who use opus for listing to music like me if telegram-desktop have better support for Ogg Opus file (.opus, and cover art in .ogg).
https://github.com/telegramdesktop/tdesktop/issues/1754#issuecomment-195084523
https://github.com/telegramdesktop/tdesktop/issues/1754#issuecomment-195114412
https://github.com/telegramdesktop/tdesktop/issues/1754#issuecomment-195196829
https://github.com/telegramdesktop/tdesktop/issues/1754#issuecomment-241182259
@ixearth
Thanks for the info on the opus format. Didn't know about the wide usage of it and just looked at the fileinfo.com entry. 👍
@Nachtalb About video stream in the test file.ogg: I just added the cover of 300*300 px with EasyTag, and older versions of telegram-desktop was perceived a file as audio. How do I add covers to audio now? By the way, the mobile version perceives a file correctly and shows a cover.
@strannik-j you can add album art as a video stream and use .ogg as container by using ffmpeg, remember to use -c:a copy to avoid re-encode. but this probably not the correct way to embed an image as cover art to an audio file.
opus-tools can't import-picture for opus, while metaflac support to do so.
opusenc (from opus-tools) only can be used for convert lossless audio format to opus, optionally add covert art. actually you can convert opus to lossless format with cover added, and convert to opus by using opusenc (or add cover art in this step), but this could reduce the audio quality due to re-encoding.
I don't recommend to add cover art to opus. for music you can't get at lossless quality, you can just edit the metadata (title, artist names etc) or maybe just file name. and use music player to fetch album art from other source while playing. There are lots of music players support fetch cover art from online sources.
Telegram Desktop does not show any cover art, Telegram for Android/iOS fetch cover art from iTunes store (by read metadata or file name). I don't think it display the cover art in metadata.
Generally I just convert flac which included cover art to opus by using opusenc, and the cover art will be remain there.
Most helpful comment
There are hundreds of audio codecs available. To support every single one is not easy. And eg.
oggis a container and not a codec/stream. The ogg file which you provided contains a video and an audio stream. The video stream is corrupted though.I have removed the video stream from your file and voila it works as an audio file in Telegram.
The second one is the fixed one.
Your original
test.oggRemoving the video stream:
The fixed ogg
About your second file. I guess it is just not a supported codec by Telegram. If you look at fileinfo.com eg. It already says:
And so I don't even know why it should be used to listen to music. Usually, you do not want to use codecs which are for communication because most of the time they are very lossy and so do not have good quality for video. Imagine being on the phone with a friend, most of the time the sound of his/her voice sounds noticeably different than in real life. And now imagine using this quality for music. XD I don't think you would want that.