From psychonaut at nothingisreal.com Thu Jul 27 19:18:42 2017 From: psychonaut at nothingisreal.com (Tristan Miller) Date: Thu, 27 Jul 2017 21:18:42 +0200 Subject: [Vorbis] Fixing Ogg Vorbis files with incorrectly framed headers Message-ID: <20170727211842.48d521d5.psychonaut@nothingisreal.com> Greetings. Possibly as the result of buggy tagging software, several hundred of my Ogg Vorbis files exhibit the following warning when examined by ogginfo: WARNING: Vorbis stream 1 does not have headers correctly framed. Terminal header page contains additional packets or has non-zero granulepos Nonetheless, most media players can play these files without any problem. A notable exception is any player using the recently released GStreamer 1.12.1 (see ). In fact, even though my files were corrupted several years ago, I hadn't noticed this until a few weeks ago when I upgraded GStreamer to the latest version. Can anyone advise me how I can fix my files short of re-encoding them? I already tried using vorbiscomment to extract and then re-apply the tags to the file. In this case ogginfo no longer issues any warning about the file, but GStreamer applications still refuse to play it, as the following example demonstrates. A sample corrupted file can be obtained at . $ ogginfo somefile.ogg Processing file "somefile.ogg"... New logical stream (#1, serial: 34778229): type vorbis WARNING: Vorbis stream 1 does not have headers correctly framed. Terminal header page contains additional packets or has non-zero granulepos Vorbis headers parsed for stream 1, information follows... Version: 0 Vendor: Xiph.Org libVorbis I 20040629 (1.1.0) Channels: 2 Rate: 44100 […] $ gst-play-1.0 somefile.ogg Press 'k' to see a list of keyboard shortcuts. Now playing /tmp/somefile.ogg ERROR Could not decode stream. for file:///tmp/somefile.ogg ERROR debug information: gstvorbisdec.c(352): vorbis_handle_header_packet (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstVorbisDec:vorbisdec0: couldn't read header packet (-132) Reached end of play list. $ vorbiscomment --list --raw --escapes somefile.ogg >somefile.txt $ vorbiscomment --write --raw --escapes somefile.ogg