{"success":true,"data":{"ext":"opus","name":"OPUS","description":"Opus is a lossy audio coding format standardized by the IETF and developed by the Xiph.Org Foundation with contributions from Skype, Mozilla, and others. It is used for real-time voice communication, streaming audio, online meetings, and media playback in web and mobile applications. The format is generally safe to handle, although, as with any media file, malformed or corrupted files may expose vulnerabilities in vulnerable decoders.","mime":["audio/opus"],"risk_level":"Safe","signatures":[{"hex":"4F 67 67 53 00 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 4F 70 75 73 48 65 61 64","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["oga","ogg","spx","aac","ac3","aif"],"usage":{"python":"def is_opus(file_path: str) -> bool:\n    \"\"\"Check if file is a valid OPUS by magic bytes.\"\"\"\n    signature = bytes([0x4F, 0x67, 0x67, 0x53, 0x00, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])\n    with open(file_path, \"rb\") as f:\n        return f.read(36) == signature","node":"function isOPUS(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4F, 0x67, 0x67, 0x53, 0x00, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64]);\n  return buffer.subarray(0, 36).equals(signature);\n}","go":"func IsOPUS(data []byte) bool {\n    signature := []byte{0x4F, 0x67, 0x67, 0x53, 0x00, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64}\n    if len(data) < 36 {\n        return false\n    }\n    return bytes.Equal(data[:36], signature)\n}"},"category":"Audio"}}