Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Dynamic packaging filters by track name do not work #122

@bragma

Description

@bragma

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Hi, I am trying to create an account filter to remove tracks with a specified name (to be exact, I am trying to remove tracks with 50 fps frame rate, in my case they have frame rate specified in the name).
Here is the list of tracks in my asset:

image

I am using this code:

mediaServicesAccount.GetMediaServicesAccountFilters().CreateOrUpdateAsync(
    Azure.WaitUntil.Completed,
    "remove50fps",
    new MediaServicesAccountFilterData
    {
        Tracks =
        {
            new FilterTrackSelection(
                trackSelections: new List<FilterTrackPropertyCondition>
                {
                    new FilterTrackPropertyCondition(
                        FilterTrackPropertyType.Name,
                        "Video-6000-50-1920x1080-6000.mp4_1",
                        FilterTrackPropertyCompareOperation.NotEqual
                    )
                }
            )
        }
    });

Any log messages given by the failure

No error messages are given and the filter is created.

Expected/desired behavior

Track with index 0 (corresponding to the filtered out track) should not be present in the filtered manifest. There should be 8 tracks in the manifest, out of 9 total tracks in the manifest.

This is the manifest without the filter:

https://XXXXX/Sequence_07.ism/manifest

<?xml version="1.0" encoding="UTF-8"?>
<SmoothStreamingMedia MajorVersion="2" MinorVersion="2" Duration="106000000" TimeScale="10000000">
    <StreamIndex Chunks="6" Type="video" Url="QualityLevels({bitrate})/Fragments(video={start time})" QualityLevels="9">
        <QualityLevel Index="0" Bitrate="6060727" FourCC="H264" MaxWidth="1920" MaxHeight="1080" CodecPrivateData="000000016764002AACD940780227E59A808080A0000003002000000C91E30632C00000000168E93B2C8B" />
        <QualityLevel Index="1" Bitrate="4591870" FourCC="H264" MaxWidth="1920" MaxHeight="1080" CodecPrivateData="0000000167640028ACD940780227E59A808080A0000003002000000651E30632C00000000168E93B2C8B" />
        <QualityLevel Index="2" Bitrate="4440969" FourCC="H264" MaxWidth="1280" MaxHeight="720" CodecPrivateData="0000000167640020ACD9405005BA6A020202800000030080000032478C18CB0000000168E93B2C8B" />
        <QualityLevel Index="3" Bitrate="3363752" FourCC="H264" MaxWidth="1280" MaxHeight="720" CodecPrivateData="000000016764001FACD9405005BA6A020202800000030080000019478C18CB0000000168E93B2C8B" />
        <QualityLevel Index="4" Bitrate="2245569" FourCC="H264" MaxWidth="960" MaxHeight="540" CodecPrivateData="000000016764001FACD940F0117EE6A02020280000030008000003019478C18CB00000000168E93B2C8B" />
        <QualityLevel Index="5" Bitrate="1486577" FourCC="H264" MaxWidth="960" MaxHeight="540" CodecPrivateData="000000016764001FACD940F0117EE6A02020280000030008000003019478C18CB00000000168E93B2C8B" />
        <QualityLevel Index="6" Bitrate="988225" FourCC="H264" MaxWidth="640" MaxHeight="360" CodecPrivateData="000000016764001EACD940A02FF966A02020280000030008000003019478B16CB00000000168E93B2C8B" />
        <QualityLevel Index="7" Bitrate="638526" FourCC="H264" MaxWidth="640" MaxHeight="360" CodecPrivateData="000000016764001EACD940A02FF966A02020280000030008000003019478B16CB00000000168E93B2C8B" />
        <QualityLevel Index="8" Bitrate="372253" FourCC="H264" MaxWidth="320" MaxHeight="180" CodecPrivateData="000000016764000DACD941419F9E6A020202800000030080000019478A14CB0000000168E93B2C8B" />
        <c t="0" d="20000000" r="5" />
        <c d="6000000" />
    </StreamIndex>
</SmoothStreamingMedia>

The filtered manifest is the same. This is the manifest with the filter applied:

https://XXXXX/Sequence_07.ism/manifest/manifest(filter=remove50fps)

<?xml version="1.0" encoding="UTF-8"?>
<SmoothStreamingMedia MajorVersion="2" MinorVersion="2" Duration="106000000" TimeScale="10000000">
    <StreamIndex Chunks="6" Type="video" Url="QualityLevels({bitrate})/Fragments(video={start time})" QualityLevels="9">
        <QualityLevel Index="0" Bitrate="6060727" FourCC="H264" MaxWidth="1920" MaxHeight="1080" CodecPrivateData="000000016764002AACD940780227E59A808080A0000003002000000C91E30632C00000000168E93B2C8B" />
        <QualityLevel Index="1" Bitrate="4591870" FourCC="H264" MaxWidth="1920" MaxHeight="1080" CodecPrivateData="0000000167640028ACD940780227E59A808080A0000003002000000651E30632C00000000168E93B2C8B" />
        <QualityLevel Index="2" Bitrate="4440969" FourCC="H264" MaxWidth="1280" MaxHeight="720" CodecPrivateData="0000000167640020ACD9405005BA6A020202800000030080000032478C18CB0000000168E93B2C8B" />
        <QualityLevel Index="3" Bitrate="3363752" FourCC="H264" MaxWidth="1280" MaxHeight="720" CodecPrivateData="000000016764001FACD9405005BA6A020202800000030080000019478C18CB0000000168E93B2C8B" />
        <QualityLevel Index="4" Bitrate="2245569" FourCC="H264" MaxWidth="960" MaxHeight="540" CodecPrivateData="000000016764001FACD940F0117EE6A02020280000030008000003019478C18CB00000000168E93B2C8B" />
        <QualityLevel Index="5" Bitrate="1486577" FourCC="H264" MaxWidth="960" MaxHeight="540" CodecPrivateData="000000016764001FACD940F0117EE6A02020280000030008000003019478C18CB00000000168E93B2C8B" />
        <QualityLevel Index="6" Bitrate="988225" FourCC="H264" MaxWidth="640" MaxHeight="360" CodecPrivateData="000000016764001EACD940A02FF966A02020280000030008000003019478B16CB00000000168E93B2C8B" />
        <QualityLevel Index="7" Bitrate="638526" FourCC="H264" MaxWidth="640" MaxHeight="360" CodecPrivateData="000000016764001EACD940A02FF966A02020280000030008000003019478B16CB00000000168E93B2C8B" />
        <QualityLevel Index="8" Bitrate="372253" FourCC="H264" MaxWidth="320" MaxHeight="180" CodecPrivateData="000000016764000DACD941419F9E6A020202800000030080000019478A14CB0000000168E93B2C8B" />
        <c t="0" d="20000000" r="5" />
        <c d="6000000" />
    </StreamIndex>
</SmoothStreamingMedia>

Versions

Azure Media Services v3
Azure.ResourceManager.Media 1.1.0

Mention any other details that might be useful

Filters based on other conditions (ex: bitrate) do work.

If I invert the condition (FilterTrackPropertyCompareOperation.Equal), all tracks are removed. I suspect something is wrong with the track name value used in comparison.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions