{% extends "base.html" %} {% load static %} {% load widget_tweaks %} {% block title %} {% if form.instance.pk %}Edit Channel{% else %}Create Channel{% endif %} - Stream Processor {% endblock %} {% block page_title %} {% if form.instance.pk %}Edit Channel{% else %}Create Channel{% endif %} {% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% if form.instance.pk %} Edit Channel {% else %} Create Channel {% endif %}

{% if form.instance.pk %} Update channel configuration and streaming parameters {% else %} Configure a new streaming channel for HLS capture {% endif %}

Channel Configuration Guidelines

Configure your streaming channel with HLS source URL and capture parameters

Ensure the HLS URL is accessible and ends with .m3u8

Test your configuration before saving to avoid streaming issues

Channel Settings

Configure your streaming channel parameters

{% csrf_token %}

Basic Information

{{ form.name|add_class:"form-control input-with-icon" }}
{% if form.name.errors %}
{{ form.name.errors.0 }}
{% endif %}
URL slug will be automatically generated from the channel name
{{ form.hls_url|add_class:"form-control input-with-icon" }}
{% if form.hls_url.errors %}
{{ form.hls_url.errors.0 }}
{% endif %}
{{ form.hls_url.help_text }}
{{ form.description|add_class:"form-control" }} {% if form.description.errors %}
{{ form.description.errors.0 }}
{% endif %}
Optional description of the channel content

Channel Status

{{ form.is_active|add_class:"form-check-input" }}
Enable this channel for streaming and processing
{% if form.is_active.errors %}
{{ form.is_active.errors.0 }}
{% endif %}
{{ form.output_directory }}

HLS Configuration

{{ form.segment_duration|add_class:"form-control input-with-icon" }}
{% if form.segment_duration.errors %}
{{ form.segment_duration.errors.0 }}
{% endif %}
{{ form.segment_duration.help_text }}
{{ form.max_segments|add_class:"form-control input-with-icon" }}
{% if form.max_segments.errors %}
{{ form.max_segments.errors.0 }}
{% endif %}
{{ form.max_segments.help_text }}

Retry Configuration

{{ form.retry_attempts|add_class:"form-control input-with-icon" }}
{% if form.retry_attempts.errors %}
{{ form.retry_attempts.errors.0 }}
{% endif %}
{{ form.retry_attempts.help_text }}
{{ form.retry_interval|add_class:"form-control input-with-icon" }}
{% if form.retry_interval.errors %}
{{ form.retry_interval.errors.0 }}
{% endif %}
{{ form.retry_interval.help_text }}
{% if form.instance.pk %} {% endif %}
Cancel

Configuration Examples

Pre-configured settings for common use cases

Standard Configuration

Segment Duration: 6 seconds
Max Segments: 10
Retry Attempts: 5
Retry Interval: 10 seconds

Balanced configuration for most streams

Low Latency Configuration

Segment Duration: 2 seconds
Max Segments: 5
Retry Attempts: 3
Retry Interval: 5 seconds

Optimized for minimal delay

Important Notes

HLS URL must be accessible and return a valid .m3u8 playlist

Lower segment duration reduces latency but increases processing overhead

Higher retry attempts improve reliability but may delay error detection

Output directory must be writable by the application

{% endblock %}