> ## Documentation Index
> Fetch the complete documentation index at: https://docs.probe.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming Format Analysis

> Comprehensive guide to analyzing HLS, DASH, and live streaming protocols with Probe.dev

## Overview

Probe.dev provides comprehensive analysis capabilities for streaming media formats and protocols. Whether you're working with adaptive streaming formats like HLS and DASH, or live streaming protocols such as RTMP, RTSP, and SRT, our API can extract detailed technical information to help optimize your streaming workflows.

<Info>
  Streaming analysis supports video, audio, and caption tracks across all formats and protocols, providing the same level of detail as traditional file analysis. For adaptive streaming formats (HLS/DASH), each quality variant appears as a separate track in the results.
</Info>

## Adaptive Streaming Formats

### HLS (HTTP Live Streaming)

HLS is Apple's adaptive streaming protocol that delivers content over HTTP using playlists and media segments.

#### Master Playlist Analysis

Analyze multi-bitrate HLS streams to understand the available quality levels:

```bash theme={null}
curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=https://probelibrary.s3.amazonaws.com/hls/sample/big_buck_bunny.m3u8" \
  --data-urlencode "inject_json=true"
```

**Key Information Extracted:**

* Variant streams and their bitrates
* Resolution and frame rate for each quality level
* Audio and subtitle track information
* Codec details (H.264, AAC, etc.)
* Segment duration and structure

<Info>
  Each HLS variant (quality level) appears as a separate track in the analysis results, with the same field structure as single file analysis. You'll receive detailed codec, resolution, and bitrate information for each variant stream.
</Info>

#### Media Playlist Analysis

For individual quality levels, you can analyze specific media playlists:

```json theme={null}
{
  "url": "https://example.com/hls/720p.m3u8",
  "mediainfo": {
    "enabled": true,
    "output": "JSON"
  }
}
```

<Tip>
  Use MediaInfo for HLS analysis as it provides excellent support for playlist parsing and segment information.
</Tip>

### DASH (Dynamic Adaptive Streaming over HTTP)

DASH is an international standard for adaptive streaming that uses XML manifests to describe media presentations.

#### MPD (Media Presentation Description) Analysis

Analyze DASH manifests to understand adaptation sets and representations:

```bash theme={null}
curl -X POST https://api.probe.dev/v1/probe/file \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd",
    "inject_json": true,
    "mediainfo": {
      "enabled": true,
      "output": "JSON"
    },
    "ffprobe": {
      "enabled": true,
      "show_streams": true,
      "show_format": true
    }
  }'
```

**Key Information Extracted:**

* Adaptation sets for video, audio, and text
* Multiple representations within each adaptation set
* Codec profiles and levels
* Segment templates and timelines
* Accessibility features

<Info>
  Each DASH representation (quality variant) within adaptation sets appears as a separate track in the analysis results. You'll receive the same detailed field structure as single file analysis for each representation.
</Info>

#### Live vs VOD DASH Analysis

DASH manifests can represent both live and video-on-demand content:

<Tabs>
  <Tab title="VOD DASH">
    ```json theme={null}
    {
      "manifest_type": "static",
      "duration": "PT634S",
      "profiles": "urn:mpeg:dash:profile:isoff-main:2011"
    }
    ```
  </Tab>

  <Tab title="Live DASH">
    ```json theme={null}
    {
      "manifest_type": "dynamic",
      "availability_start_time": "2024-01-15T10:00:00Z",
      "time_shift_buffer_depth": "PT300S"
    }
    ```
  </Tab>
</Tabs>

## HLS Validation with MediaStreamValidator

### Apple's HLS Compliance Checking

MediaStreamValidator provides industry-standard HLS compliance validation using Apple's official tooling. This dedicated endpoint validates HLS streams against Apple's technical specifications, essential for App Store submissions and debugging playback issues.

#### HLS Compliance Validation

Validate HLS playlists for Apple compliance:

```bash theme={null}
curl -G https://api.probe.dev/v1/probe/mediastreamvalidator \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=https://probelibrary.s3.amazonaws.com/hls/sample/big_buck_bunny.m3u8" \
  --data-urlencode "parse_playlist_only=true"
```

#### Deep Stream Analysis

For comprehensive validation including segment analysis:

```bash theme={null}
curl -X POST https://api.probe.dev/v1/probe/mediastreamvalidator \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/master.m3u8",
    "parse_playlist_only": false,
    "enable_cli_output": true,
    "timeout": 650000
  }'
```

**Key Validation Features:**

* Apple HLS specification compliance
* Segment integrity verification
* Bitrate ladder validation
* Codec compatibility checking
* Accessibility compliance (closed captions)

**Common Use Cases:**

* Pre-publish HLS validation
* App Store submission requirements
* Debugging playback issues across Apple devices
* Quality assurance workflows
* CI/CD pipeline integration

<Warning>
  MediaStreamValidator analysis typically takes 12-15 seconds to complete due to comprehensive stream validation. Use selectively during staging or pre-publish workflows.
</Warning>

<Note>
  Use `parse_playlist_only=true` for faster playlist-only validation, or `false` for complete segment analysis including media content validation.
</Note>

## Live Streaming Protocols

### RTMP (Real-Time Messaging Protocol)

RTMP is widely used for live streaming and video-on-demand delivery.

#### Live Stream Analysis

Analyze active RTMP streams:

```bash theme={null}
curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=rtmp://live.example.com/stream/stream_key" \
  --data-urlencode "only=ffprobe" \
  --data-urlencode "timeout=30000"
```

#### VOD Content Analysis

Examine RTMP video-on-demand content:

```bash theme={null}
curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=rtmp://matthewc.co.uk/vod/scooter" \
  --data-urlencode "inject_json=true"
```

**Common RTMP URL Patterns:**

```
rtmp://server.example.com/live/stream_key
rtmp://server.example.com/vod/video_name
rtmp://server.example.com/app/playpath
rtmps://secure.example.com/live/stream_key (SSL)
```

### RTSP (Real Time Streaming Protocol)

RTSP is commonly used for IP cameras and surveillance systems.

#### Camera Stream Analysis

Analyze IP camera feeds:

```bash theme={null}
curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=rtsp://camera.example.com:554/stream1" \
  --data-urlencode "ffprobe[show_streams]=true" \
  --data-urlencode "ffprobe[timeout]=15000"
```

**Common RTSP URL Patterns:**

```
rtsp://camera.example.com/stream
rtsp://camera.example.com:554/live/stream
rtsp://username:password@camera.example.com/stream
rtsps://secure.camera.example.com/stream (SSL)
```

### SRT (Secure Reliable Transport)

SRT provides low-latency, secure streaming with error recovery.

#### SRT Stream Analysis

Analyze SRT streams for technical specifications:

```bash theme={null}
curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=srt://server.example.com:1234" \
  --data-urlencode "only=ffprobe"
```

**SRT URL Formats:**

```
srt://server.example.com:port
srt://server.example.com:port?streamid=stream_name
srt://server.example.com:port?passphrase=secret&latency=200
```

## Analysis Tools Comparison

Different tools provide varying levels of detail for streaming formats:

| **Tool**                 | **HLS**      | **DASH**   | **RTMP**   | **RTSP**   | **SRT**    | **Best For**                       |
| ------------------------ | ------------ | ---------- | ---------- | ---------- | ---------- | ---------------------------------- |
| **FFprobe**              | ✅ Basic      | ✅ Basic    | ✅ Full     | ✅ Full     | ✅ Full     | Live streams, technical details    |
| **MediaInfo**            | ✅ Full       | ✅ Full     | ✅ Full     | ✅ Full     | ❌ Limited  | Playlist/manifest analysis         |
| **Probe Report**         | ✅ Enhanced   | ✅ Enhanced | ✅ Enhanced | ✅ Enhanced | ✅ Enhanced | Comprehensive analysis             |
| **MediaStreamValidator** | ✅ Compliance | ❌ N/A      | ❌ N/A      | ❌ N/A      | ❌ N/A      | Apple HLS specification validation |

<Note>
  For streaming formats, we recommend using MediaInfo for playlist/manifest analysis and RTMP/RTSP streams, FFprobe for SRT and detailed live protocol analysis, and MediaStreamValidator for HLS compliance validation.
</Note>

## Performance Considerations

### Timeout Settings

Streaming analysis may require longer timeouts:

```json theme={null}
{
  "url": "rtmp://live.example.com/stream",
  "timeout": 30000,
  "queue_timeout": 60000,
  "ffprobe": {
    "timeout": 25000
  }
}
```

### Recommended Timeouts by Protocol

| **Protocol** | **Recommended Timeout** | **Reason**                           |
| ------------ | ----------------------- | ------------------------------------ |
| HLS/DASH     | 30-60 seconds           | Playlist parsing + segment analysis  |
| RTMP Live    | 15-30 seconds           | Connection establishment + buffering |
| RTSP         | 10-20 seconds           | Network latency + authentication     |
| SRT          | 15-25 seconds           | Handshake + initial packet analysis  |

## Use Cases and Examples

### Streaming Quality Monitoring

Monitor HLS stream quality across different bitrates:

<Steps>
  <Step title="Analyze Master Playlist">
    Extract all available quality levels and their specifications.

    ```bash theme={null}
    curl -G https://api.probe.dev/v1/probe/file \
      --data-urlencode "token=${PROBE_API_TOKEN}" \
      --data-urlencode "url=https://stream.example.com/master.m3u8" \
      --data-urlencode "only=mediainfo"
    ```
  </Step>

  <Step title="Check Individual Quality Levels">
    Analyze specific bitrate streams for consistency.

    ```bash theme={null}
    curl -G https://api.probe.dev/v1/probe/file \
      --data-urlencode "token=${PROBE_API_TOKEN}" \
      --data-urlencode "url=https://stream.example.com/720p.m3u8" \
      --data-urlencode "inject_json=true"
    ```
  </Step>

  <Step title="Validate Segment Integrity">
    Ensure segments are properly encoded and accessible.

    <Check>
      Verify consistent codecs, resolution, and timing across all quality levels.
    </Check>
  </Step>
</Steps>

### Live Stream Health Check

Monitor live streaming endpoints for availability and quality:

```bash theme={null}
# Monitor RTMP publish endpoint
curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "url=rtmp://live.example.com/stream/health_check" \
  --data-urlencode "timeout=15000"
```

### Multi-Protocol Analysis

Compare the same content across different delivery methods:

<CodeGroup>
  ```bash HLS Analysis theme={null}
  curl -G https://api.probe.dev/v1/probe/file \
    --data-urlencode "token=${PROBE_API_TOKEN}" \
    --data-urlencode "url=https://stream.example.com/content.m3u8"
  ```

  ```bash DASH Analysis theme={null}
  curl -G https://api.probe.dev/v1/probe/file \
    --data-urlencode "token=${PROBE_API_TOKEN}" \
    --data-urlencode "url=https://stream.example.com/content.mpd"
  ```

  ```bash RTMP Analysis theme={null}
  curl -G https://api.probe.dev/v1/probe/file \
    --data-urlencode "token=${PROBE_API_TOKEN}" \
    --data-urlencode "url=rtmp://stream.example.com/live/content"
  ```
</CodeGroup>

## Troubleshooting

### Common Issues

<AccordionGroup>
  <Accordion title="Connection Timeouts">
    **Symptoms:** Request times out without returning data

    **Solutions:**

    * Increase timeout values (30-60 seconds)
    * Verify stream is active and accessible
    * Check network connectivity to streaming server
    * Test with a shorter analysis duration
  </Accordion>

  <Accordion title="Authentication Failures">
    **Symptoms:** 403 Forbidden or authentication errors

    **Solutions:**

    * Include credentials in RTSP URLs: `rtsp://user:pass@camera.example.com/stream`
    * Verify API token has sufficient permissions
    * Check if the streaming server requires specific user agents
    * Ensure SSL certificates are valid for HTTPS/RTMPS/RTSPS
  </Accordion>

  <Accordion title="Incomplete Analysis">
    **Symptoms:** Partial data returned or missing streams

    **Solutions:**

    * Increase buffer time for live streams
    * Try different analysis tools (FFprobe vs MediaInfo)
    * Check if stream requires specific connection parameters
    * Verify stream is stable and not dropping frames
  </Accordion>
</AccordionGroup>

### Error Handling

When streaming analysis encounters issues, Probe.dev returns the actual error messages from the underlying analysis tools (FFprobe, MediaInfo) along with their exit codes. Common error patterns include:

* **Connection errors** - Network issues or unreachable streams
* **Protocol errors** - Unsupported or malformed URLs
* **Timeout errors** - Analysis duration exceeded configured limits
* **Authentication errors** - Access denied by streaming server
* **Format errors** - Unrecognized or corrupted stream format

Check the `error` field in the tool response for specific details from FFprobe or MediaInfo.

## Best Practices

<CardGroup cols={2}>
  <Card title="Performance" icon="gauge">
    * Set appropriate timeouts for each protocol
    * Use specific analysis tools for each format
    * Monitor API usage for streaming endpoints
    * Cache results for frequently analyzed streams
  </Card>

  <Card title="Reliability" icon="shield-check">
    * Implement retry logic for live streams
    * Validate stream availability before analysis
    * Handle intermittent connection issues
    * Use health check endpoints when available
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Media Sources Guide" icon="link" href="/guides/media-sources">
    Learn about all supported media source types
  </Card>

  <Card title="Report Types" icon="chart-bar" href="/guides/report-types">
    Choose the right analysis tools for your streams
  </Card>

  <Card title="Sample Library" icon="video" href="/reference/sample-media-library">
    Try streaming examples with our test sources
  </Card>

  <Card title="MCP Integration" icon="plug" href="/guides/mcp-integration">
    Use streaming analysis with AI assistants
  </Card>
</CardGroup>
