StreamGear API: Single-Source Mode ¶
Overview¶
In this mode, StreamGear transcodes entire audio-video file (as opposed to frames-by-frame) into a sequence of multiple smaller chunks/segments for adaptive streaming.
This mode works exceptionally well when you're transcoding long-duration lossless videos(with audio) files for streaming that requires no interruptions. But on the downside, the provided source cannot be flexibly manipulated or transformed before sending onto FFmpeg Pipeline for processing.
SteamGear supports both MPEG-DASH (Dynamic Adaptive Streaming over HTTP, ISO/IEC 23009-1) and Apple HLS (HTTP Live Streaming) with this mode.
For this mode, StreamGear API provides exclusive transcode_source()
method to easily process audio-video files into streamable chunks.
This mode can be easily activated by assigning suitable video path as input to -video_source
attribute of stream_params
dictionary parameter, during StreamGear initialization.
New in v0.2.2
Apple HLS support was added in v0.2.2
.
Please Remember
- Using
stream()
function instead oftranscode_source()
in Single-Source Mode will instantly result inRuntimeError
! - Any invalid value to the
-video_source
attribute will result inAssertionError
!
Usage Examples¶
After going through StreamGear Usage Examples, Checkout more of its advanced configurations here ➶
Parameters¶
References¶
FAQs¶