HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: lithopsian on 2014-03-18 15:22:04

Title: Corrupt Theora/Opus files?
Post by: lithopsian on 2014-03-18 15:22:04
I notice that a lot of video files with an Opus soundtrack (mixed Theora/Opus in an Ogg container) do not play the audio, either in Firefox or in my new plugin.  To me, they appear to be corrupt in having an extra byte in the header.  Can anyone confirm?  Here is an example:
https://en.wikipedia.org/wiki/File:Alexandr...1,_Paganini.ogv (https://en.wikipedia.org/wiki/File:Alexandre_Dubach,_Caprice_No._21,_Paganini.ogv)
Title: Corrupt Theora/Opus files?
Post by: itisljar on 2014-03-18 16:28:42
Version 33.0.1750.154 m, Windows 8.1, fully patched, no sound. I see video, though.
Title: Corrupt Theora/Opus files?
Post by: AliceWonder on 2014-03-18 16:44:15
Fedora 20, midori-0.5.7-1.fc20.x86_64 (browser) using gstreamer1-1.2.3-1.fc20.x86_64 for media backend.

I see video, hear no audio.
Title: Corrupt Theora/Opus files?
Post by: azaqiel on 2014-03-18 17:56:53
video plays in Chrome (35.0.1883.0). video plays offline, too. still no audio, BUT...

MediaInfo shows me there is no audio track for the downloaded .ogv file:
Code: [Select]
General
ID                            : 364188336 (0x15B512B0)
Complete name                  : C:\Users\Christopher\Downloads\Alexandre_Dubach,_Caprice_No._21,_Paganini.ogv.160p.ogv
Format                        : OGG
File size                      : 3.27 MiB
Writing application            : ffmpeg2theora-0.27
SOURCE_OSHASH                  : 221da140c138bd4e

Video
ID                            : 1528858952 (0x5B208948)
Format                        : Theora
Bit rate                      : 158 Kbps
Width                          : 284 pixels
Height                        : 160 pixels
Display aspect ratio          : 16:9
Frame rate                    : 15.000 fps
Compression mode              : Lossy
Bits/(Pixel*Frame)            : 0.232
Writing library                : Xiph.Org libtheora 1.1 20090822 (Thusnelda)
there's also the webm file (I believe the web-based player plays this by default) with still no audio:
Code: [Select]
General
Unique ID                      : 169356918134500365770791865341396576982 (0x7F68F4BBEB9CF9396196B24A68CAEAD6)
Complete name                  : C:\Users\Christopher\Downloads\Alexandre_Dubach,_Caprice_No._21,_Paganini.ogv.360p.webm
Format                        : WebM
Format version                : Version 2
File size                      : 10.2 MiB
Duration                      : 2mn 51s
Overall bit rate              : 498 Kbps
Writing application            : Lavf53.21.1
Writing library                : Lavf53.21.1

Video
ID                            : 1
Format                        : VP8
Codec ID                      : V_VP8
Bit rate                      : 472 Kbps
Width                          : 640 pixels
Height                        : 360 pixels
Display aspect ratio          : 16:9
Frame rate mode                : Variable
Compression mode              : Lossy
Default                        : Yes
Forced                        : No
seems like a pointless upload, if it's supposed to be of a person playing an instrument with no audio track.

EDIT: https://upload.wikimedia.org/wikipedia/en/5...2C_Paganini.ogv (https://upload.wikimedia.org/wikipedia/en/5/5c/Alexandre_Dubach%2C_Caprice_No._21%2C_Paganini.ogv)
there is audio there. plays in Chrome, version above. got that link from the line that reads "Original file", just under the video.  must be a mediawiki mishap on conversion to the webm and other resolutions. I have not downloaded the file to double check that the audio actually is Opus.
Title: Corrupt Theora/Opus files?
Post by: lithopsian on 2014-03-18 18:00:26
There's an OpusHead page in there, but I see that the serial number is the same as the Theora header, so wouldn't work even if there are audio pages in multiplexed there.
Title: Corrupt Theora/Opus files?
Post by: azaqiel on 2014-03-18 18:06:38
EDIT: https://upload.wikimedia.org/wikipedia/en/5...2C_Paganini.ogv (https://upload.wikimedia.org/wikipedia/en/5/5c/Alexandre_Dubach%2C_Caprice_No._21%2C_Paganini.ogv)
there is audio there. plays in Chrome, version above. got that link from the line that reads "Original file", just under the video.  must be a mediawiki mishap on conversion to the webm and other resolutions. I have not downloaded the file to double check that the audio actually is Opus.

now, this is somewhat strange.  Firefox version 31.0a1 (Nightly) on Windows 8.1: the file is corrupt.  though, like I quoted, it does play in Chrome 35.0.1883.0.

EDIT: so many edits... MediaInfo output:
Code: [Select]
General
Complete name                  : C:\Users\Christopher\Downloads\Alexandre_Dubach,_Caprice_No._21,_Paganini.ogv
Format                        : OGG
File size                      : 43.7 MiB
Duration                      : 2mn 51s
Overall bit rate              : 2 138 Kbps
Writing application            : Lavf55.16.102
creation_time                  : 1970-01-01 00:00:00
handler_name                  : VideoHandler
major_brand                    : mp42
minor_version                  : 0
compatible_brands              : isommp42

Video
ID                            : 410931424 (0x187E50E0)
Format                        : Theora
Duration                      : 2mn 51s
Nominal bit rate              : 2 000 Kbps
Width                          : 1 280 pixels
Height                        : 720 pixels
Display aspect ratio          : 16:9
Frame rate                    : 25.000 fps
Compression mode              : Lossy
Bits/(Pixel*Frame)            : 0.087
Writing library                : Lavf55.16.102

Audio
ID                            : 403100138 (0x1806D1EA)
Format                        : Opus
Duration                      : 2mn 51s
Channel(s)                    : 2 channels
Channel positions              : Front: L R
Sampling rate                  : 8 000 Hz
Compression mode              : Lossy
Writing library                : Lavf55.16.102
if the "serial numbers" are in the ID field, they are actually different. and it does play offline - Windows 8.1, with CCCP installed (viewed in MPC-HC).
Title: Corrupt Theora/Opus files?
Post by: lithopsian on 2014-03-18 19:20:40
You're right, the serial numbers are different.  I looked at the wrong bytes before.

I've gone through the hexdump in more detail.  It appears that the Ogg page header is OK, but the OpusHead page has a byte 0x13 before the OpusHead characters.  That isn't valid.  Looks like some decoders can read past it, but others don't.  Vorbis and Theora both have leading identification bytes, 0x80 and 0x01 respectively, but Opus isn't supposed to have one.