You are not logged in.

#1 2017-11-19 12:33:51

zooky
Member
Registered: 2013-01-27
Posts: 18

Ogg Vorbis files getting corrupted

Hi,

I usually encode my music library in ogg vorbis, and regularly (and randomly?) have the same problem: when I rip and encode a CD, I can play the files for some time, and then sometimes after reading a file, it gets corrupted. I have not been able to understand the cause, it looks quite random. This does not happen for all the files that I play, it does not happen every time I play a file (it could be after playing it douzens of times), and sometimes it happens to one or half of the files in one album and not the others.

When I try to read one "corrupted file" with mplayer I get:

$ mplayer 01\ -\ Me\ and\ Your\ Mama.ogg 
MPlayer SVN-r37998 (C) 2000-2017 MPlayer Team
225 audio & 464 video codecs
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 01 - Me and Your Mama.ogg.
libavformat version 57.83.100 (external)
libavformat file format detected.
Invalid return value 0 for stream protocol
LAVF_header: av_open_input_stream() failed
[Ogg] stream 0: audio (Vorbis), -aid 0
DEMUX_OGG: header n. 2 broken! len=79, code: -132
Ogg file format detected.
Clip info:
 Album: “Awaken, My Love!”
 Artist: Childish Gambino
 Creation Date: 2016-12-02
 Genre: R&B/Soul
 Title: Me and Your Mama
 Track: 1
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 57.107.100 (external)
[vorbis @ 0x7efd11bcb000]Extradata corrupt.
Could not open codec.
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [libvorbis] Ogg/Vorbis audio decoder
OggVorbis: header n. 0 broken! len=30
ADecoder init failed :(
ADecoder init failed :(
Requested audio codec family [tremor] (afm=tremor) not available.
Enable it at compilation.
Cannot find codec for audio format 0x73627276.
Audio: no sound
Video: no video

Exiting... (End of file)

and here is the result of ogginfo on another file that got corrupted similarly:

$ ogginfo 02\ -\ Nowa.ogg | head
Traitement du fichier « 02 - Nowa.ogg »...

Nouveau flux logique (n°1, n° de série : 5c2570a5) : type vorbis
WARNING: Could not decode Vorbis header packet 2 - invalid Vorbis stream (1)
WARNING: Could not decode Vorbis header packet 2 - invalid Vorbis stream (1)
[...]
WARNING: Could not decode Vorbis header packet 2 - invalid Vorbis stream (1)
Vorbis stream 1:
	Total data length: 0 bytes
	Playback length: 0m:00.000s
	Average bitrate: -nan kb/s
Fin du flux logique 1

I used to rip with asunder which converts to ogg directly, and I also tried to first rip in flac, and then convert in ogg using soundconverter (OK, maybe they use the same encoder I'm not sure). So could it be a bug in the codec? Or is it possible that a music player can corrupt a file? I use guayadeque player.
It looks that once corrupted, the files cannot be played at all (by any player).

Thanks.

Offline

#2 2017-11-19 13:42:59

seth
Member
Registered: 2012-09-03
Posts: 51,796

Offline

#3 2017-11-19 16:25:13

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Ogg Vorbis files getting corrupted

If it turns out to not be a disk issue, just generate checksums for your files after you have ripped and encoded them. Then confirm the checksums the next time you face the corruption issue.

Also, you didn't mention which filesystem you are using and whether you checked your journal for any potential clues.

Offline

#4 2017-11-19 20:15:40

zooky
Member
Registered: 2013-01-27
Posts: 18

Re: Ogg Vorbis files getting corrupted

Ok I did not know SMART, I ran a short test without error, and I am doing the long one to be sure. But what I do not understand is why should I suspect a disk issue if I do not have any other problem with the disk? It really only happens with .ogg files, I guess if the disk had some problems I would have other corrupted files?

It's a SSD disk, using ext4 filesystem. I had a quick look at the journal, but I am not really sure what to look for? Regarding the checksums, can you learn something from them except detecting that a file has changed somehow? Or should I try to "monitor" a file to try to detect when the corruption happens?

Offline

#5 2017-11-19 20:33:38

progandy
Member
Registered: 2012-05-17
Posts: 5,203

Re: Ogg Vorbis files getting corrupted

It may be a problem with guayadeque, since it uses taglib. Maybe you are editing your tags or guayadeque somehow tries to write them even if you didn't change them.

taglib has a bug with ogg file corruption that has been fixed in git, but there is no new release yet.
https://github.com/taglib/taglib/issues/775


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2017-11-20 04:14:06

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Ogg Vorbis files getting corrupted

zooky wrote:

Regarding the checksums, can you learn something from them except detecting that a file has changed somehow? Or should I try to "monitor" a file to try to detect when the corruption happens?

Yeah, checksums can only help you detect whether a file changed or not. As for monitoring, how do you plan to do that? inotify?

progandy's analysis seems logical. You can stop using guayadeque temporarily and see if that helps.

Offline

#7 2017-11-20 07:20:12

zooky
Member
Registered: 2013-01-27
Posts: 18

Re: Ogg Vorbis files getting corrupted

Ok, regarding the checksum I do not really know how to do it, but I expect that there is a way, inotify seems indeed to be appropriate, thank you.
I think I will first try to use another player and see if propangy's suggestion is verified.
Anyway Guayadeque has not been updated for a long time.

Offline

Board footer

Powered by FluxBB