emarsden / dash-mpd-cli

Download media content from a DASH-MPEG or DASH-WebM MPD manifest
https://emarsden.github.io/dash-mpd-cli/
MIT License
302 stars 33 forks source link

Append token to request URL #27

Closed marukka closed 9 months ago

marukka commented 10 months ago

I am trying to download .mpd streams which request a token passed as a GET parameter in the HTTP request. As it doesnt seem like this is passing the the GET parameters from the URL I provide the program, any attempts to obtain the .m4s files results in HTTP 401 errors. Is there any way to do this with dash-mpd-cli?

PS C:\Users\Administrator\desktop> .\dash-mpd-cli.exe "https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/manifest.mpd?access_token=1!7vlgwMYEkBcGaHd6UuKkHMNkxD-wE2-pfN7mLltjz6bolOH7WH65BFJdm1Vnsz7ZTvbcy0BcZbzMT79sqSH9jQvvHe_S1UzQGJGbtvq-D_o-veaWmDEv-L0e_sYdffhuL6-Xk8uHy1DEcV9syYLVj02t612SGZtrYp6c052TfTOOk3g4FHLuj-cgkE5GcVa_C7Z5zZ8e8j5Kg8MuwiJbq2czfnqzzd6UQCg7m08YrGgO-JLRatYBUhyrW1-IXc0gyy5YgCR7jldbKD5Pzr9luZ09sX-YDzthtcdymDl8cx4cw400XhraY9JSjcV3cYt_jhrWyvVrCEO-sj9SaEWjhhv1Wb4cFlUkeP46KlBD7rNWNFjPdPioF8UBA2WGRU3pHgkZt2oyKYTOmzqrIK72Fr5wwF11rNV2xadgZDJ4FJ90z7oMXAVYuKUvom0TXk3LEpovz9bRkDdyS04UvrJDqQ7puo8zly5kRlHbEvGl_Smth1Bt9OIFgV9Yh8t0inG9U9joSzHkqIMlTqZcNCX0IJlpQQu622Nxk6ncA9EfzrwI2ZbfUk5IxTNgakMywm_-hWOJWOJjlB0kqjnC0Xh_wch_30R9IgK8t6BTAUAdDNLtIxRdAlyyXbnREaPZRnzoeqUIco3Vkl_vjIJzxTqAEpunWBkmov59mvaiz2FZX6Ckzatc3bXt_oUaNZhLfvbvMnxfO3874jaZXS66ZfiPiQgRhM2e-qHZotM7aXRav_g4UlwjBfvy80r-yw.." -v
[0s] [>-------------------------------------------------] Fetching DASH manifest                    Fetching the DASH manifest
DASH manifest has 1 period
Streams in period #1, duration 603.900s:
  video avc1.640028       |  7812 Kbps | 1920x1080
  video avc1.42c028       |  1953 Kbps |   854x480
Preparing download for period #1
  Video stream selected: bw=1953 Kbps resolution=854x480 codec=avc1.42c028
Period #1: fetching 0 audio, 121 video and 0 subtitle segments
[1s] [>-------------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/init.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/init.m4s
[1s] [#>------------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/1.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/1.m4s
[2s] [#>------------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/2.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/2.m4s
[2s] [##>-----------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/3.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/3.m4s
[2s] [##>-----------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/4.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/4.m4s
[2s] [##>-----------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/5.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/5.m4s
[3s] [###>----------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/6.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/6.m4s
[3s] [###>----------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/7.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/7.m4s
[3s] [####>---------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/8.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/8.m4s
[3s] [####>---------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/9.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/9.m4s
[4s] [#####>--------------------------------------------] Fetching video segments                   HTTP status client error (401 Unauthorized) for url (https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/10.m4s) fetching video segment https://public.boxcloud.com/api/2.0/internal_files/1300373106323/versions/1422096702323/representations/dash/content/video/480/10.m4s
Download failed: network error more than max_error_count network errors
emarsden commented 10 months ago

Indeed, the URL parameters should be passed through to the segments requests, but currently are not. Will fix.

emarsden commented 10 months ago

This should be fixed in the latest 0.2.11 release; please let me know if not.

If you know of a public MPD that uses this token scheme, that would be useful to add to our test suite.

marukka commented 10 months ago

Thank you so much!

On Sat, Dec 9, 2023 at 7:46 AM Eric Marsden @.***> wrote:

This should be fixed in the latest 0.2.11 release; please let me know if not.

If you know of a public MPD that uses this token scheme, that would be useful to add to our test suite.

— Reply to this email directly, view it on GitHub https://github.com/emarsden/dash-mpd-cli/issues/27#issuecomment-1848414838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXMZQ7PEKISOSVEPQ5JAVLYIRTURAVCNFSM6AAAAAA74TFIDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGQYTIOBTHA . You are receiving this because you authored the thread.Message ID: @.***>