Video Bitrate Filtering
Media Live allows you to filter output streams by video bitrate.
To achieve it, you need to:
- On the console, set Minimum Video Bitrate (bit/s) and Max Video Bitrate (bit/s). For details, see Creating a Channel.
- Add URL request parameter pkg_manifestfilter. For details about the parameter, see Table 1.
Table 2 describes the status codes returned for URL requests.
Table 1 URL request parameter for filtering bitrates URL Parameter
Configuration
Description
pkg_manifestfilter
video_bitrate
Filters video bitrates, in bit/s.
Value range: 0-2147483647. By default, the values at both ends are inclusive.
Example value: stream.mpd?pkg_manifestfilter=video_bitrate:0-2147483647
If a range is specified, the start value must be less than the end value. Up to five ranges are supported, separated by commas (,).
Table 2 Status codes Status Code
Bitrate Filtering Parameter Example
Error Message
Error Description
Solution
200
?pkg_manifestfilter=video_bitrate:0-1
-
This is normal. Videos are filtered.
-
400
?pkg_manifestfilter=video_bitrate:0-48000&pkg_manifestfilter=video_bitrate:0-48000
parse bandwidth filter error
Duplicate bitrate filtering parameters.
Delete duplicate bitrate filtering parameters.
400
?pkg_manifestfilter=video_bitrate:rhododendron
parse bandwidth filter error
Invalid parameter.
Correct the configuration.
400
?pkg_manifestfilter=video_bitrate:300-0
?pkg_manifestfilter=video_bitrate:300-300
parse bandwidth filter error
Invalid value range.
If a range is specified, the start value must be less than the end value.
400
?pkg_manifestfilter=video_bitrate:0-2147483648
parse bandwidth filter error
Invalid range value (exceeds the maximum allowed value).
The parameter value must be within the allowed range.
400
?pkg_manifestfilter=video_bitrate:is:0-44100
parse bandwidth filter error
The query string format is incorrect.
Correct the configuration.
400
?pkg_manifestfilter=video_bitrate:abcdef....
parse bandwidth filter error
The parameter string contains more than 1,024 characters.
Correct the configuration.
400
rate.m3u8?pkg_manifestfilter=video_bitrate:0-48000
parse bandwidth filter error
Parameters in the bitrate index request must be consistent with those in the top-level index response. The bitrate index request should not contain the pkg_manifestfilter parameter.
The bitrate index request should not contain the pkg_manifestfilter parameter.
Example: https://example.com/out/v1/ad06307d7d8b42faba42db50d100aaee/index.m3u8?pkg_manifestfilter=video_bitrate:0-1499999&aaa=bbb
The returned top-level manifest URLs do not contain the pkg_manifestfilter parameter, as shown below:
#EXTM3U #EXT-X-VERSION:3 #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-STREAM-INF:BANDWIDTH=2753858,AVERAGE-BANDWIDTH=1792323,RESOLUTION=640x480,FRAME-RATE=30.000,CODECS="avc1.4D401E,mp4a.40.2" index_3.m3u8?aaa=bbb #EXT-X-STREAM-INF:BANDWIDTH=1433841,AVERAGE-BANDWIDTH=967305,RESOLUTION=320x240,FRAME-RATE=30.000,CODECS="avc1.4D400D,mp4a.40.2" index_4.m3u8?aaa=bbb
400
1.[ts|m4v|m4a...]?pkg_manifestfilter=video_bitrate:0-48000
parse bandwidth filter error
Parameters in the segment request must be consistent with those in the index response. The segment request should not contain the pkg_manifestfilter parameter.
The segment request should not contain the pkg_manifestfilter parameter.
400
?pkg_manifestfilter=video_bitrate:0-1
parse bandwidth filter error
The video bitrate filtering result is empty.
If the video bitrate filtering result is empty, the parameter configuration is incorrect. Correct the settings.
400
?pkg_manifestfilter=video_bitrate:0-10,110-200,300-400,500-600,700-900,1000-2000
parse bandwidth filter error
A maximum of five video bitrate ranges can be configured.
The value of video_bitrate cannot contain more than five ranges.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.