Skip to content

plugins.brightcove: support for HLS stream URLs with query strings + RTMPE stream URLs - #790

Merged
beardypig merged 2 commits into
streamlink:masterfrom
melmorabity:brightcove_fix
Apr 14, 2017
Merged

plugins.brightcove: support for HLS stream URLs with query strings + RTMPE stream URLs#790
beardypig merged 2 commits into
streamlink:masterfrom
melmorabity:brightcove_fix

Conversation

@melmorabity

Copy link
Copy Markdown
Contributor

This PR provides small improvements for the BrightcovePlayer class, required for a plugin I'm currently writing to support bfmtv.com.

  • support for HLS playlist URLs with query strings.

    For example, with the account ID 5067014665001 and the player ID 5080870408001, the API returns the following data:

{
[...]
    "account_id": "5067014665001",
    "sources": [
        {
            "avg_bitrate": null,
            "width": null,
            "src": "https://rmcsporthdslive-lh.akamaihd.net/i/DVMR_BFMSPORT@182576/master.m3u8?__nn__=5078103454001&hdnea=st=1492124400~exp=1492128000~acl=/i/*~hmac=83b8f65edb5480d9cd997c203f0e1809353d0d9e2f166252775c7f31fc9545cc",
            "size": 0,
            "height": null,
            "duration": -1,
            "container": "M2TS",
            "codec": "H264",
            "asset_id": "5080888428001"
        },
        {
            "avg_bitrate": null,
            "width": null,
            "src": "http://rmcsporthdslive-lh.akamaihd.net/z/DVMR_BFMSPORT@182576/manifest.f4m?__nn__=5078103454001&hdnea=st=1492124400~exp=1492128000~acl=/z/*~hmac=52b50e23396bf819e557cc6fab1e49e0944f78ebfe79c95e89769e34617aa900",
            "size": 0,
            "height": null,
            "duration": -1,
            "container": "MP4",
            "codec": "H264",
            "asset_id": "5080888429001"
        }
    ],
    "name": "LIVE BFM Sport",
[...]
    "id": "5080870408001",
[...]
}
  • support for RTMPE streams.

    For example, with the account ID 1969646226001 and the player ID 5393084243001, the API returns the following data:

{
[...]
    "account_id": "1969646226001",
    "sources": [
        {
            "avg_bitrate": 512000,
            "width": 480,
            "duration": 2904095,
            "size": 187337224,
            "stream_name": "mp4:23/1969646226001/201704/3218/1969646226001_5393113723001_5393084243001.mp4",
            "codec": "H264",
            "asset_id": "5393113723001",
            "container": "MP4",
            "height": 270,
            "app_name": "rtmpe://cp101677.edgefcs.net/ondemand"
        },
        {
            "avg_bitrate": 994000,
            "width": 640,
            "duration": 2904095,
            "size": 362560618,
            "stream_name": "mp4:23/1969646226001/201704/3218/1969646226001_5393114353001_5393084243001.mp4",
            "codec": "H264",
            "asset_id": "5393114353001",
            "container": "MP4",
            "height": 360,
            "app_name": "rtmpe://cp101677.edgefcs.net/ondemand"
        },
[...]
    ],
    "name": "LA CITE DISPARUE DE POMPEI",
[...]
    "id": "5393084243001",
[...]
}

@codecov

codecov Bot commented Apr 14, 2017

Copy link
Copy Markdown

Codecov Report

Merging #790 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #790   +/-   ##
=======================================
  Coverage   48.78%   48.78%           
=======================================
  Files          76       76           
  Lines        6188     6188           
=======================================
  Hits         3019     3019           
  Misses       3169     3169

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca9b6f5...27cb521. Read the comment docs.

@beardypig

Copy link
Copy Markdown
Member

Cool looks good, thanks :-)

@beardypig
beardypig merged commit 041585c into streamlink:master Apr 14, 2017
@melmorabity
melmorabity deleted the brightcove_fix branch April 14, 2017 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants