Code Monkey home page Code Monkey logo

dash-proxy's Issues

Merging Stream files not giving mp4 as output

Thanks for such a great python code. i have downloaded all M4 files from the mpd source.

now i am unable to convert them in mp4 files on windows PC
copy *.m4 << output.mp4

Please provide me suggestion how i can merge all m4 files and play the video.

Thanks in Advance

Any way to select a size?

Noticed first that the tool craps out because of folders it's trying to access that doesn't exist. But it fails over and over as the mpd file has multiple size videos and loops thru them all or seems to. Is there a way to select a size or select the highest quality?

DOWNLOADING ISSUE

Running dash proxy for stream https://d9an9suwcevit.cloudfront.net/drm/2f855c48-575d-4db8-97e6-8ccc13b16f40/720p/drm/stream.mpd. Output goes in .
mpd=[<Element '{urn:mpeg:dash:schema:mpd:2011}Period' at 0x7fdb7fa6a1b0>]
Starting a downloader for Representation (period=0 adaptation-set=0 representation=0)
requesting video/avc1/init.mp4 from https://d9an9suwcevit.cloudfront.net/drm/2f855c48-575d-4db8-97e6-8ccc13b16f40/720p/drm/video/avc1/init.mp4
Traceback (most recent call last):
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 289, in
main()
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 286, in main
run(args)
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 275, in run
return proxy.run()
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 115, in run
self.refresh_mpd()
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 129, in refresh_mpd
self.handle_mpd(mpd)
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 155, in handle_mpd
self.ensure_downloader(mpd, rep_addr)
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 173, in ensure_downloader
downloader.handle_mpd(mpd, self.get_base_url(mpd))
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 209, in handle_mpd
self.download_template(initialization_template, rep)
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 240, in download_template
self.write(dest, r.content)
File "/home/oem/Desktop/dash-proxy/dash-proxy/./dashproxy.py", line 264, in write
f = open(dest, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: './video/avc1/init.mp'

error none type

i have this error
have pyhton pip dependences installed
what more should install for this program work like should be work WITHOUT errors
thanks

python ./dashproxy.py https://------.mpd -o. -d
Running dash proxy for stream https://-------.mpd. Output goes in .
mpd=[<Element '{urn:mpeg:dash:schema:mpd:2011}Period' at 0x0000023B3BC46310>]
Starting a downloader for Representation (period=0 adaptation-set=0 representation=0)
Traceback (most recent call last):
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 289, in
main()
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 286, in main
run(args)
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 275, in run
return proxy.run()
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 115, in run
self.refresh_mpd()
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 129, in refresh_mpd
self.handle_mpd(mpd)
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 155, in handle_mpd
self.ensure_downloader(mpd, rep_addr)
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 173, in ensure_downloader
downloader.handle_mpd(mpd, self.get_base_url(mpd))
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 204, in handle_mpd
segment_timeline = self.mpd.segment_timeline(self.rep_addr)
File "D:\Jonathan\Programas\Video_Encriptado\cmder_mini\dashproxy.py", line 77, in segment_timeline
return self.segment_template(rep_addr).find('mpd:SegmentTimeline', ns)
AttributeError: 'NoneType' object has no attribute 'find'

Add support for http header

Pls add support for http header like user-agent: chrome.... Etc .becuz when mirroring from dash if they (server owner) find request from other user
-agent they might block it.

IndexError: list index out of range

IndexError: list index out of range

>> $ ./dashproxy.py http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd -o .
Running dash proxy for stream http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd. Output goes in .
mpd=[]
Traceback (most recent call last):
  File "./dashproxy.py", line 289, in <module>
    main()
  File "./dashproxy.py", line 286, in main
    run(args)
  File "./dashproxy.py", line 275, in run
    return proxy.run()
  File "./dashproxy.py", line 115, in run
    self.refresh_mpd()
  File "./dashproxy.py", line 129, in refresh_mpd
    self.handle_mpd(mpd)
  File "./dashproxy.py", line 150, in handle_mpd
    period = periods[0]
IndexError: list index out of range

Bad handling of server-provided URLs containing ".." links to parent dir

This tool will write into ../ when the server gives an URL with /../ in it. This is a security flaw.

On the other hand, if ../whatever/ doesn't exist, it crashes the application with IOError: [Errno 2] No such file or directory:. It doesn't create missing directories as needed. This is a separate bug, filed as #8.

cannot download

not downloading

←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-18821973333.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-18959360000.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-18998613333.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-18978986666.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-19018240000.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-19037866666.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-19096746666.mp4 server returned 503←[0m ←[31mcannot download http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01-audio_eng=64000-19057493333.mp4 server returned 503←[0m

this is the MPD link
http://cdn.cvattv.com.ar/vod/c5eds/vod/AMCM2000000000130905-Eli_Roth_s_H_T2_E01/_/vod_dash/AMCM2000000000130905-Eli_Roth_s_H_T2_E01.mpd

https://pastebin.com/raw/9xZ3pzJR

AttributeError: 'NoneType' object has no attribute 'find'

The utilty doesn't seem to work for some of the DASH-IF test assets:

python dashproxy.py "https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/TwoPeriods/TwoPeriod_OnDemand.mpd" -o .
�[32mRunning dash proxy for stream https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/
TwoPeriods/TwoPeriod_OnDemand.mpd. Output goes in .�[0m
�[32mmpd=[<Element '{urn:mpeg:dash:schema:mpd:2011}Period' at 0x5675890>, <Element '{urn:mpeg:dash:sche
ma:mpd:2011}Period' at 0x567e470>]�[0m
�[32mStarting a downloader for Representation (period=0 adaptation-set=0 representation=0)�[0m
Traceback (most recent call last):
  File "dashproxy.py", line 289, in <module>
    main()
  File "dashproxy.py", line 286, in main
    run(args)
  File "dashproxy.py", line 275, in run
    return proxy.run()
  File "dashproxy.py", line 115, in run
    self.refresh_mpd()
  File "dashproxy.py", line 129, in refresh_mpd
    self.handle_mpd(mpd)
  File "dashproxy.py", line 155, in handle_mpd
    self.ensure_downloader(mpd, rep_addr)
  File "dashproxy.py", line 173, in ensure_downloader
    downloader.handle_mpd(mpd, self.get_base_url(mpd))
  File "dashproxy.py", line 204, in handle_mpd
    segment_timeline = self.mpd.segment_timeline(self.rep_addr)
  File "dashproxy.py", line 77, in segment_timeline
    return self.segment_template(rep_addr).find('mpd:SegmentTimeline', ns)
AttributeError: 'NoneType' object has no attribute 'find'

Python 2.7.14 on Windows 10 x64

converting stream issue

Hi there,
Thank you very much for sharing this project!

I've successfully downloaded the content of a manifest.mpd source and I can see it's creating .m4v files - but I'm not sure how I can use this.
my initial goal is to create a single .mp4 file from the streamed content.

Any insights?

help

hi im beginner in python, can someone make a guide how to run this script??
i search and dont found any guide on internet how to use this script

Directores are not created as needed

When a stream links to elements in different directories, the program tries to write into those directories locally, but the directories are not automatically created. Instead, the application crashes. E..g:

IOError: [Errno 2] No such file or directory: './../live-md-a/10156570984736141_0-init.m4'                                      

(After $ mkdir ../live-md-a the program can be relaunched and the stream will be downloaded.)

I guess the obvious solution is to rewrite the manifests so that they don't reference any other directories than that of the manifest itself. That would also solve #7. (Filenames would have to be rewritten too, to avoid collisions.)

error in documentation

The content of http://server.com/Manifest.m3u8 will be downloaded to the output directory

MPEG-DASH uses .mpd 😄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.