m3u8 conversion settings - panuozzo77/StreamingCommunity GitHub Wiki
This section documents the settings that control how StreamingCommunity converts downloaded HLS (HTTP Live Streaming) content. These settings allow you to customize the encoding process, including codec selection, bitrate settings, and hardware acceleration options.
These settings are found in the M3U8_CONVERSION
section of the config.json
file:
{
"M3U8_CONVERSION": {
"use_codec": false,
"use_vcodec": true,
"use_acodec": true,
"use_bitrate": true,
"use_gpu": false,
"default_preset": "ultrafast"
}
}
- Type: Boolean
-
Default:
false
- Description: Controls whether specific codec settings are applied during conversion. When enabled, the application will use custom codec configurations.
-
Usage: Set to
true
if you want to use specific codec settings. This is a master switch that enables the use of codec-specific options.
- Type: Boolean
-
Default:
true
- Description: Controls whether a specific video codec is used during conversion. When enabled, the application will use a specific video codec rather than the default.
-
Usage: Set to
true
to use a specific video codec. The actual codec used depends on other settings and available codecs.
- Type: Boolean
-
Default:
true
- Description: Controls whether a specific audio codec is used during conversion. When enabled, the application will use a specific audio codec rather than the default.
-
Usage: Set to
true
to use a specific audio codec. The actual codec used depends on other settings and available codecs.
- Type: Boolean
-
Default:
true
- Description: Controls whether bitrate settings are applied during conversion. When enabled, the application will use specific bitrate settings for video and audio.
-
Usage: Set to
true
to apply bitrate settings. This can help control file size and quality.
- Type: Boolean
-
Default:
false
- Description: Controls whether GPU acceleration is used for encoding. When enabled, the application will attempt to use hardware acceleration if available.
-
Usage: Set to
true
to enable GPU acceleration. This can significantly speed up encoding but requires compatible hardware and drivers.
- Type: String
-
Default:
"ultrafast"
- Description: Sets the FFmpeg encoding preset to use. This controls the trade-off between encoding speed and compression efficiency.
-
Options:
-
"ultrafast"
: Extremely fast conversion but larger file size -
"superfast"
: Very fast with good quality/size ratio -
"veryfast"
: Fast with good compression -
"faster"
: Optimal balance for most users -
"fast"
: Good compression, moderate time -
"medium"
: FFmpeg default setting -
"slow"
: High quality, slower process -
"slower"
: Very high quality, slow process -
"veryslow"
: Maximum quality, very slow process
-
- Usage: Choose based on your priority between conversion speed and file size/quality.
The default_preset
setting offers a range of options that balance encoding speed against file size and quality:
Preset | Speed | File Size | Quality | Recommended Use |
---|---|---|---|---|
ultrafast | Fastest | Largest | Lowest | Quick previews, testing |
superfast | Very Fast | Large | Low | Fast conversions when quality isn't critical |
veryfast | Fast | Medium-Large | Medium-Low | Good balance for most casual users |
faster | Medium-Fast | Medium | Medium | Default recommendation for most users |
fast | Medium | Medium-Small | Medium-High | Good quality with reasonable speed |
medium | Medium-Slow | Small | High | FFmpeg's default, good balance |
slow | Slow | Smaller | Higher | When quality matters more than time |
slower | Very Slow | Very Small | Very High | High-quality archiving |
veryslow | Extremely Slow | Smallest | Highest | Maximum quality, best compression |
When use_gpu
is enabled, the system will use available hardware acceleration:
-
NVIDIA: Uses NVENC encoder
- Requires NVIDIA GPU with NVENC support
- Requires updated NVIDIA drivers
- Requires FFmpeg compiled with NVENC support
-
AMD: Uses AMF encoder
- Requires AMD GPU with VCE/VCN support
- Requires updated AMD drivers
- Requires FFmpeg compiled with AMF support
-
Intel: Uses QSV encoder
- Requires Intel CPU with Quick Sync Video
- Requires FFmpeg compiled with QSV support
{
"M3U8_CONVERSION": {
"use_codec": false,
"use_vcodec": true,
"use_acodec": true,
"use_bitrate": false,
"use_gpu": true,
"default_preset": "ultrafast"
}
}
{
"M3U8_CONVERSION": {
"use_codec": true,
"use_vcodec": true,
"use_acodec": true,
"use_bitrate": true,
"use_gpu": false,
"default_preset": "slow"
}
}
{
"M3U8_CONVERSION": {
"use_codec": false,
"use_vcodec": true,
"use_acodec": true,
"use_bitrate": true,
"use_gpu": true,
"default_preset": "faster"
}
}
You can access and modify these settings programmatically:
from StreamingCommunity.Util.config_json import config_manager
# Get a configuration value
preset = config_manager.get('M3U8_CONVERSION', 'default_preset')
# Set a configuration value
config_manager.set_key('M3U8_CONVERSION', 'default_preset', 'medium')
config_manager.save_config()
- M3U8 Download Settings - Configure download behavior
- M3U8 Parser Settings - Configure HLS playlist parsing