This guide documents the AV1 video streams captured from Axis camera (10.176.12.35) with togglable overlays feature for analyzing the OBU (Open Bitstream Unit) structure.
- Description: Standard AV1 stream without togglable overlays
- Parameters:
videocodec=av1&streamprofile=vivek - Duration: 60 seconds
- Resolution: 3840x2160 (4K)
- Frame Rate: 25 fps
- Bitrate: ~1105 kbits/s
- Use Case: Baseline AV1 stream for comparison
- Description: AV1 stream with togglable overlays enabled (all overlays visible)
- Parameters:
videocodec=av1&streamprofile=vivek&videolayers=1&overlays=all - Duration: 60 seconds
- Resolution: 3840x2160 (4K)
- Frame Rate: 25 fps
- Bitrate: ~2057 kbits/s
- Use Case: Analyze OBU structure with overlay layer included
- Key Features:
- Contains both base layer and overlay layer
- Includes OBU_META_DATA with UUID:
aaaaaaaa-aaaa-aaaa-aaaa-70661eab1e02 - Each GOP starts with KEY FRAME + INTER FRAME structure
- Subsequent TUs contain two INTER FRAMEs marked as "not shown"
- Description: AV1 stream with togglable overlays enabled (overlays hidden)
- Parameters:
videocodec=av1&streamprofile=vivek&videolayers=1&overlays=off - Duration: 60 seconds
- Resolution: 3840x2160 (4K)
- Frame Rate: 25 fps
- Bitrate: ~1392 kbits/s
- Use Case: Analyze base layer only with togglable overlay metadata
The togglable overlays feature uses OBU_META_DATA (OBU Type 5) with:
- Metadata Type: 25 (Unregistered user private data)
- UUID:
aaaaaaaa-aaaa-aaaa-aaaa-70661eab1e02 - Location: Beginning of GOP within the Temporal Unit containing the keyframe
Observed Structure in av1_layers_all.ivf:
- OBU Header: Type 5 (Metadata)
- Metadata Type: 25
- Payload:
- Byte 0:
0x80(128) - Prefix/Flag - Bytes 1-16:
0xAA 0xAA ... 0x70 0x66 0x1E 0xAB 0x1E 0x02- This matches the UUID:
aaaaaaaa-aaaa-aaaa-aaaa-70661eab1e02
- This matches the UUID:
- Bytes 17+: Overlay configuration data
- Byte 0:
Each GOP in a togglable overlays stream follows this pattern (observed in trace):
- OBU_SEQUENCE_HEADER
- OBU_META_DATA (Type 25, containing the UUID)
- OBU_FRAME (Base Layer)
- Frame Type:
KEY FRAME(0) show_frame: 1 (Displayed)
- Frame Type:
- OBU_FRAME (Overlay Layer)
- Frame Type:
INTER FRAME(1) show_frame: 0 (Hidden)showable_frame: 1
- Frame Type:
- OBU_FRAME (Base Layer)
- Frame Type:
INTER FRAME(1) show_frame: 0 (Hidden)showable_frame: 1
- Frame Type:
- OBU_FRAME (Overlay Layer)
- Frame Type:
INTER FRAME(1) show_frame: 0 (Hidden)showable_frame: 1
- Frame Type:
- OBU_FRAME (Frame Header / Show Existing)
show_existing_frame: 1frame_to_show_map_idx: Determines which frame to display (Base or Overlay)
For reference, the standard AV1 stream (av1_standard.ivf) has a simpler structure:
Standard GOP Structure (TU 0):
- OBU_SEQUENCE_HEADER
- OBU_FRAME (Base Layer)
- Frame Type:
KEY FRAME(0) show_frame: 1 (Displayed)- Note: No OBU_METADATA and no hidden overlay frames.
- Frame Type:
Standard Subsequent TUs:
- OBU_FRAME (Base Layer)
- Frame Type:
INTER FRAME(1) show_frame: 1 (Displayed)
- Frame Type:
- Identify KEY FRAME via
OBU_SEQUENCE_HEADER - Identify
OBU_META_DATAwith togglable overlay UUID - Drop the
OBU_META_DATAin first TU of GOP - Drop the first
OBU_FRAMEin each TU of GOP - Drop all subsequent
OBU_FRAMEsin same GOP (or maintain counter and drop when count > 1)
- Identify KEY FRAME via
OBU_SEQUENCE_HEADER - Identify
OBU_META_DATAwith togglable overlay UUID - Drop the
OBU_META_DATAin first TU of GOP - Keep only the overlay layer frames
# Show detailed frame information
ffmpeg -i outputvivek_layers_all.ivf -vf showinfo -f null -
# Extract raw OBU data
ffmpeg -i outputvivek_layers_all.ivf -c copy -bsf:v trace_headers -f null - 2>&1 | grep -i obu# Decode and show frame details
aomdec --summary outputvivek_layers_all.ivf -o /dev/null# Analyze OBU structure
av1-grain outputvivek_layers_all.ivf- Standard AV1: ~1105 kbits/s
- Layers OFF: ~1392 kbits/s (+26%)
- Layers ALL: ~2057 kbits/s (+86%)
The increased bitrate with videolayers=1 confirms that both layers are being encoded and transmitted, even when overlays=off is set (the metadata is still present).
- Standard: 7.90 MB
- Layers OFF: 9.96 MB (+26%)
- Layers ALL: 14.72 MB (+86%)
ffmpeg -analyzeduration 10M -probesize 10M \
-i "http://root:Axis%40125Apass@10.176.12.35/axis-cgi/media.cgi?videocodec=av1&streamprofile=vivek" \
-t 60 -c copy -f ivf outputvivek.ivfffmpeg -analyzeduration 10M -probesize 10M \
-i "http://root:Axis%40125Apass@10.176.12.35/axis-cgi/media.cgi?videocodec=av1&streamprofile=vivek&videolayers=1&overlays=all" \
-t 60 -c copy -f ivf outputvivek_layers_all.ivfffmpeg -analyzeduration 10M -probesize 10M \
-i "http://root:Axis%40125Apass@10.176.12.35/axis-cgi/media.cgi?videocodec=av1&streamprofile=vivek&videolayers=1&overlays=off" \
-t 60 -c copy -f ivf outputvivek_layers_off.ivf- Use a hex editor to examine the raw OBU structure
- Look for the UUID
aaaaaaaa-aaaa-aaaa-aaaa-70661eab1e02in the metadata - Count OBU_FRAME occurrences per Temporal Unit
- Verify the "show_frame" flags in frame headers
- Compare GOP structures between standard and togglable overlay streams