m3u8 conversion settings - panuozzo77/StreamingCommunity GitHub Wiki

M3U8 Conversion Settings

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.

Configuration Location

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"
    }
}

Available Settings

use_codec

  • 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.

use_vcodec

  • 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.

use_acodec

  • 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.

use_bitrate

  • 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.

use_gpu

  • 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.

default_preset

  • 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.

Advanced Encoding Options

Encoding Presets Explained

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

GPU Acceleration

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

Optimizing Conversion Settings

For Speed (Fastest Conversion)

{
    "M3U8_CONVERSION": {
        "use_codec": false,
        "use_vcodec": true,
        "use_acodec": true,
        "use_bitrate": false,
        "use_gpu": true,
        "default_preset": "ultrafast"
    }
}

For Quality (Best Output)

{
    "M3U8_CONVERSION": {
        "use_codec": true,
        "use_vcodec": true,
        "use_acodec": true,
        "use_bitrate": true,
        "use_gpu": false,
        "default_preset": "slow"
    }
}

For Balance (Recommended)

{
    "M3U8_CONVERSION": {
        "use_codec": false,
        "use_vcodec": true,
        "use_acodec": true,
        "use_bitrate": true,
        "use_gpu": true,
        "default_preset": "faster"
    }
}

Programmatic Access

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()

Related Settings

⚠️ **GitHub.com Fallback** ⚠️