Getting Started¶
This guide walks you through creating your first video pipeline with Flex Video.
Prerequisites¶
Before you begin, ensure Flex Video is running:
Access the web interface at http://localhost:8080.
Creating Your First Pipeline¶
Option 1: Using the Web Interface¶
- Open the Flex Video web interface at
http://localhost:8080 - Click New Pipeline
- Configure your pipeline:
- Pipeline ID: Enter a unique name (e.g.,
my-first-stream) - Source: Enter your video source URI
- Encoding: Select codec and quality settings
- Output: Configure where to send the transcoded stream
- Click Create
- Click Play to start the pipeline
Option 2: Using the REST API¶
Create a simple pipeline that transcodes an RTSP stream:
curl -X POST http://localhost:3539/flex/pipeline \
-H "Content-Type: application/json" \
-d '{
"id": "my-first-stream",
"mode": "simple",
"on_demand": true,
"source": {
"uri": "rtsp://192.168.1.100:8554/live",
"latency_ms": 200
},
"encoding": {
"codec": "h264",
"bitrate": 2000,
"width": 1920,
"height": 1080,
"fps": 30,
"quality": 7
},
"output": {
"uri": "rtsp://0.0.0.0:8731/my-first-stream"
}
}'
Start the pipeline:
Option 3: Using a Test Pattern¶
Don't have a video source? Use a test pattern:
curl -X POST http://localhost:3539/flex/pipeline \
-H "Content-Type: application/json" \
-d '{
"id": "test-stream",
"mode": "simple",
"on_demand": true,
"source": {
"uri": "test://smpte"
},
"encoding": {
"codec": "h264",
"bitrate": 1000,
"width": 1280,
"height": 720,
"fps": 30,
"quality": 5
},
"output": {
"uri": "rtsp://0.0.0.0:8731/test"
}
}'
Available test patterns: smpte, ball, snow, black, white, checkers-1, circular, zone-plate
Viewing Your Stream¶
Once your pipeline is playing, view the output stream:
Pipeline States¶
Pipelines transition through these states:
| State | Description |
|---|---|
ready | Pipeline created, not yet started |
playing | Pipeline is actively processing video |
paused | Pipeline is paused (buffers held) |
error | Pipeline encountered an error |
Check pipeline status:
Stopping and Deleting¶
Stop a running pipeline:
Delete a pipeline:
Next Steps¶
- Web Interface Guide - Learn the UI in detail
- Pipeline Configuration - Advanced pipeline options
- Camera Setup - Use V4L2 cameras as sources