Emby Emby Emby Learn
  • Emby Home
  • Video
  • Audio
  • Media Files
    • Subtitles and captions
    • Photos and images
    • Metadata and discovery
    • Libraries and media collections
    • Playback and streaming
    • Media hardware acceleration
    • Displays and AV connections
    • Live TV and recording
  1. Emby Learn
  2. Subtitles and captions
  3. Subtitle processing in Emby
  4. Subtitle overlay filters
  5. GPU subtitle overlay
  6. OpenCL subtitle overlay
Search Results for

    Show / Hide Table of Contents

    OpenCL subtitle overlay

    OpenCL subtitle composition operates on compatible device image planes, after subtitle content has been rendered into an accepted image representation.

    OpenCL can execute image composition on device-accessible data. For subtitles, the text or graphics must first become a compatible image layer with the correct time, placement and coverage.

    The OpenCL blend kernel does not itself parse an ASS script, choose a font or recover a caption service. Those are preceding responsibilities.

    A concrete source reference

    The pinned Emby FFmpeg 5.1-emby_2023_06_25_u1 contains the video filter overlay_opencl. Its source reads main/overlay hardware-frame contexts and selects kernels for no-alpha, internal-alpha or separate-alpha cases.

    That verifies a composition design in this dated source. It does not say which filter graph every current Emby build selects or whether a particular compiled binary enabled it.

    Subtitle rendering supplies a compatible layer, while device video and the uploaded/mapped layer feed OpenCL composition.

    A subtitle-to-video stage can bridge from subtitle media into this video-overlay input model. The representation and resource cost of that bridge are part of the route.

    Plane interpretation must agree

    A multi-plane video format has distinct luma/chroma image grids. The source's separate-alpha handling includes the relevant chroma subsampling adjustments.

    For an ideal 3840 × 2160 NV12 picture, the luma plane has that sample grid and its interleaved chroma plane has 1920 × 1080 two-component locations. Position and alpha calculations must respect which plane is being processed.

    A packed RGBA layer has another representation. It cannot become compatible merely because both inputs are called “GPU images”.

    Context and synchronization complete the job

    The image objects must be usable in the OpenCL context/queue executing the kernel. Compatible device sharing or a supported mapping path can avoid some copying; otherwise transfers are needed.

    Video decode completion, subtitle image readiness and composition completion establish dependencies. The encoder must consume the completed output rather than an image whose writes are still in progress.

    A CPU-rendered layer can therefore coexist with GPU composition. If the main video remains in a compatible device route, uploading the subtitle layer can avoid downloading every main picture.

    For an Emby investigation, identify the bundled version, selected graph, underlying formats and device contexts. OpenCL availability describes a technology boundary; the actual route describes the work it performed.

    See Also

    • Hardware subtitle overlay pipeline
    • Software subtitle overlay
    • Subtitle overlay filtering

    References

    • Emby FFmpeg source archive: 2023_06_25-u1
    • Khronos OpenCL specification
    • libass: Subtitle rendering library
    • FFmpeg filter documentation
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top