Support for Steam Broadcasting #621

Open
PolarManne opened this Issue Dec 2, 2014 · 10 comments

Projects

None yet

7 participants

@PolarManne

It just got introduced this morning, and it's be nice to see it implemented.
http://steamcommunity.com/?subsection=broadcasts

@TkTech
TkTech commented Dec 2, 2014

The stream is interesting. For now, it appears to require a logged in user to work. Examples are all for this live stream: http://steamcommunity.com/broadcast/watch/76561198067563695

First, a request is made to get the video stream. Example:

http://steamcommunity.com/broadcast/getbroadcastmpd/?steamid=76561198067563695&broadcastid=0

{
    "success": "ready",
    "retry": 0,
    "broadcastid": "12547374920780913142",
    "url": "http://81.171.106.194:80/broadcast/3118622223253298157/manifest/?viewer=87917971236267582",
    "appid": "570",
    "app_title": "Dota 2",
    "title": "Dota 2",
    "viewer_count": 194
}

Then you take the url value in the JSON returned to find the manifest. Example:

http://81.171.106.194/broadcast/3118622223253298157/manifest/?viewer=user_id

Where user_id is your steam community user id (looks like 76561198067563695). Result is as below:

<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" availabilityStartTime="2014-12-02T19:54:15Z" publishTime="2014-12-02T19:54:15Z" minimumUpdatePeriod="PT30S" minBufferTime="PT3S" timeShiftBufferDepth="PT120S">
<Period id="1" start="PT0S">
<AdaptationSet id="1" segmentAlignment="true" startWithSAP="1" maxWidth="1280" maxHeight="720" lang="und">
<ContentComponent id="1" contentType="video"/>
<ContentComponent id="2" contentType="audio"/>
<SegmentTemplate timescale="1000" duration="3000" media="http://broadcast.akamai.steamstatic.com/broadcast/3118622223253298157/segment/$Number$/?broadcast_origin=par_valve129" startNumber="1" initialization="http://broadcast.akamai.steamstatic.com/broadcast/3118622223253298157/segment/init/?broadcast_origin=par_valve129"/>
<Representation id="main" mimeType="video/mp4" codecs="avc1.4d4032,mp4a.40.2" sar="1:1" audioSamplingRate="48000" startWithSAP="1" bandwidth="3500"></Representation>
</AdaptationSet>
</Period>
</MPD>

These videos can be rewound, and appear to be in 3 second chunks (the duration field, divided by the timescale field). So for every 3 seconds, you make a request to

... to get the next/previous chunk of mp4 video.

Notes:

  • It looks like this has been setup to allow multiple streams per user, but currently m_ulBroadcastID is hardcoded to 0, so any url that has a broadcastid in it should just be 0.
  • All of the IDs used in the broadcast system are steam community ids (big long numbers like 76561198067563695) and not the older steamids.
  • There is only one codec supported, video/mp4;codecs="avc1.4d4032,mp4a.40.2
@Kein
Kein commented Dec 6, 2014

For some weird reason it always 3500000 for bandwidth. Regardless of what bitrate source/streamer chooses.

@TkTech
TkTech commented Dec 6, 2014

@Kein Possibly the maximum streaming bandwith from akamai, not the source? I don't think Valve has any control over the message returned by Akamai.

@Kein
Kein commented Dec 6, 2014

When the streamer chooses resolution it changes accordingly in the manifest, but not the bitrate. That's weird. Source/streamer can stream even at 480@750Kbit/s and the broadcast still will deliver as 480@3500.

???

@Tester798

So, is it working now?

@VackerSimon

@Tester798 I haven't seen any progress.

@Tester798

@VackerSimon that's sad(
Then I suppose this issue should be open?

@VackerSimon

@Tester798 It is open.

@Tester798

@VackerSimon yes, it's open now.

@iGoreSchmidt
iGoreSchmidt commented Apr 20, 2016 edited

guys... ... any success?
thx

@desperation123 desperation123 referenced this issue in streamlink/streamlink Nov 17, 2016
Open

Support for Steam Broadcasting #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment