Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content steering POC using shaka packager and exoplayer. #17

Open
sr1990 opened this issue Nov 4, 2022 · 9 comments
Open

Content steering POC using shaka packager and exoplayer. #17

sr1990 opened this issue Nov 4, 2022 · 9 comments
Assignees
Labels
documentation Improvements or additions to documentation implemented Implemented in new doc, please check if you have any final comments

Comments

@sr1990
Copy link

sr1990 commented Nov 4, 2022

Hi all,
While trying to understand how content steering packaging and playback worked (https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf), I have
created a small POC using Shaka packager to indicate content steering information, exoplayer for playback and a simple node js content steering server.

Shaka packager branch:
https://github.com/sr1990/shaka-packager/tree/content_steering1

Example command line in shaka packager:

../packager \
 'in=Sintel-1280x720.mp4,stream=video,init_segment=h264_1280p/init.mp4,segment_template=h264_1280p/$Number$.m4s' \
 'in=Sintel-768x432.mp4,stream=video,init_segment=h264_768p/init.mp4,segment_template=h264_768p/$Number$.m4s' \
 'in=Sintel-audio.mp4,stream=audio,init_segment=audioSintel/init.mp4,segment_template=audioSintel/$Number$.m4s' \
 --mpd_output h264SintelCS1.mpd --generate_static_live_mpd
--content_steering_default_service_location alpha
--content_steering_query_before_start
--content_steering_url "http://10.0.0.220:3000/ContentSteering"
--content_steering_base_urls "alpha=http://10.0.0.220:3000/B/,beta=http://10.0.0.220:3000/C/"

Creates mpd with:

 <ContentSteering defaultServiceLocation="alpha" queryBeforeStart="true">http://10.0.0.220:3000/ContentSteering</ContentSteering>
 <BaseURL serviceLocation="alpha">http://10.0.0.220:3000/B/</BaseURL>
 <BaseURL serviceLocation="beta">http://10.0.0.220:3000/C/</BaseURL>

Exoplayer changes are at https://github.com/sr1990/ExoPlayer/tree/ContentSteering1

Steps and notes for setup are at :
sr1990/ExoPlayer@b72a9c9#diff-ebf5ab7c66a927d7d49320be5%5B%E2%80%A6%5Da1d316fb514ec66712449ab102abad6

Note: Right now, edge cases are not handled and code needs a lot of refactoring on the player side.

@haudiobe
Copy link

haudiobe commented Nov 4, 2022

Live TF 2022/11/04:

Thank you for the information. It does not impact the current specification, but very useful information for implementers.

@dsilhavy please have look here and we should promote this as part of test assets and so on.

@sr1990 we will publish a new version shortly for another round of review and we would like to point to your implementations as long as they are aligned with our updated spec. Please work with @wilaw to get access to the latest version and he will also add a reference to your implementations in this doc. Thank you again.

@haudiobe haudiobe added documentation Improvements or additions to documentation wontfix This will not be worked on accepted-needs-implementation Accepted and needs implementation and removed wontfix This will not be worked on labels Nov 4, 2022
@sr1990
Copy link
Author

sr1990 commented Dec 1, 2022

Based on @wilaw 's demo and discussion,
I have updated the packager to add the ContentSteering element at the end of mpd.
Example at: sr1990/ExoPlayer@f5aa358

Also updated the player to append query parameters (_DASH_pathway and _DASH_throughput) to the requests sent to content steering server.
Example logs from content steering server:

/ContentSteering?_DASH_pathway=alpha&_DASH_throughput=84267048
/ContentSteering?_DASH_pathway=beta&_DASH_throughput=131642064
/ContentSteering?_DASH_pathway=alpha&_DASH_throughput=131642064

@haudiobe haudiobe removed the accepted-needs-implementation Accepted and needs implementation label Dec 13, 2022
@haudiobe
Copy link

2022/12/13 new version going to community review by the end of the months

@sr1990
Copy link
Author

sr1990 commented Dec 21, 2022

Based on v0.9.6, following are some updates to the above implementation:
On the packager side,

  1. Location element can be specified using content_steering_locations flag which accepts comma separated <service location, url> pairs.
  2. ContentSteering@defaultServiceLocation attribute with multiple serviceLocations can be specified using --content_steering_default_service_location flag.
    Example:
../packager \
 'input=udp://[127.0.0.1:1234?interface=0.0.0.0,stream=video,init_segment=live-video1.mp4,segment_template=live-video1-$Number$.mp4](http://127.0.0.1:1234/?interface=0.0.0.0,stream=video,init_segment=live-video1.mp4,segment_template=live-video1-$Number$.mp4)' \
'input=udp://[127.0.0.1:1234?interface=0.0.0.0,stream=video,init_segment=live-video2.mp4,segment_template=live-video2-$Number$.mp4](http://127.0.0.1:1234/?interface=0.0.0.0,stream=video,init_segment=live-video2.mp4,segment_template=live-video2-$Number$.mp4)' \
 --mpd_output live.mpd \
 --content_steering_default_service_location "alpha,1234" \
 --content_steering_url "http://10.0.0.221:3000/ContentSteering" \
 --content_steering_base_urls "alpha=http://10.0.0.221:3000/A/,beta=http://10.0.0.221:3000/B/" \
 --segment_duration 4 \
 --content_steering_locations "1234=http://10.0.0.221:3000/locationA/live.mpd,5678=http://10.0.0.221:3000/locationB/live.mpd"

will create mpd that contains the following elements.
Location

  <Location serviceLocation="1234">http://10.0.0.221:3000/locationA/live.mpd</Location>
  <Location serviceLocation="5678">http://10.0.0.221:3000/locationB/live.mpd</Location>

BaseUrls

  <BaseURL serviceLocation="alpha">http://10.0.0.221:3000/A/</BaseURL>
  <BaseURL serviceLocation="beta">http://10.0.0.221:3000/B/</BaseURL>

Content Steering
<ContentSteering defaultServiceLocation="alpha,1234">http://10.0.0.221:3000/ContentSteering</ContentSteering>

On the player side,

  1. The _DASH_pathway and _DASH_throughput query arg parameters can now report multiple values.
    Example content server logs:
    /ContentSteering?_DASH_pathway:"1234,5678,beta"&_DASH_throughput:694307,795166,62654744
  2. Parse multiple serviceLocations indicated by ContentSteering@defaultServiceLocation attribute.

Updated info: https://github.com/sr1990/ExoPlayer/blob/804f1505beb37299a1f8862becd4b765c043abdb/ContentSteeringREADME.txt#L146

@haudiobe
Copy link

haudiobe commented Jan 9, 2024

Encourage to review the latest specification here: https://members.dashif.org/wg/Interoperability/document/4810

@sr1990
Copy link
Author

sr1990 commented Jan 11, 2024

@haudiobe

  1. On page 9, shouldn't the following line
    "At the start of playback, the DASH client requests the MPD from one CDN, in this case from CDN2."
    mention CDN1 instead of CDN2 according to figure 4.2?

  2. On page 15, in point 15, should a reference to the scenario described in section 19c, particularly the case where the client has blacklisted a preferred service location be added here? This addition would provide clarification if these requests occur within the time-to-live (TTL) period of the blacklist.

@haudiobe
Copy link

@haudiobe

  1. On page 9, shouldn't the following line
    "At the start of playback, the DASH client requests the MPD from one CDN, in this case from CDN2."
    mention CDN1 instead of CDN2 according to figure 4.2?

It seems not be a bug, but correct. Can you check one more time in the published spec: https://www.etsi.org/deliver/etsi_ts/103900_103999/103998/01.01.01_60/ts_103998v010101p.pdf

  1. On page 15, in point 15, should a reference to the scenario described in section 19c, particularly the case where the client has blacklisted a preferred service location be added here? This addition would provide clarification if these requests occur within the time-to-live (TTL) period of the blacklist.

This clause has been updated significantly, Can you check of you issue is addressed and f not, possbly file a new issue https://www.etsi.org/deliver/etsi_ts/103900_103999/103998/01.01.01_60/ts_103998v010101p.pdf

@haudiobe haudiobe added the implemented Implemented in new doc, please check if you have any final comments label Feb 20, 2024
@yreznik-brightcove
Copy link

There is a related ticket (and open call for contributions) in ExoPlayer project: google/ExoPlayer#11203

@haudiobe
Copy link

haudiobe commented Feb 23, 2024

Live TF 2024/02/23

  • Shaka Player implements Content Steering
  • Exo Player is working on it

We wait for @sr1990 to come back if the latest version of ExoPlayer and ShakaPackager support the latest published spec and if the question from above are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation implemented Implemented in new doc, please check if you have any final comments
Projects
None yet
Development

No branches or pull requests

4 participants