xhlove / XstreamDL-CLI

命令行版本的HLS/DASH流下载器,支持标准AES-128-CBC解密
GNU Lesser General Public License v2.1
279 stars 67 forks source link

Pipe to ffmpeg for live stream? #3

Closed NH-Networks closed 2 years ago

NH-Networks commented 3 years ago

Can it decode mpeg-dash (clearkey) and pipe livestream to ffmpeg?

xhlove commented 3 years ago

not support now.

NH-Networks commented 3 years ago

The pipe to ffmpeg or mpeg-dash (clearkey)?

NH-Networks commented 3 years ago

what is wrong here?

python -m XstreamDL_CLI.cli --b64key MzA2MWYyM2Y3MjYyNGZkN2FmNXh4eHh4eHh4eHh4eHg6OGM1NzY4YTFjMzc2Y2U5NjJieHh4eHh4eHh4eA== --name test --save-dir /tmp https://example.com/manifest.mpd

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/cli.py", line 96, in <module>
    main()
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/cli.py", line 92, in main
    downloader.daemon()
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/downloader.py", line 65, in daemon
    self.download_stream()
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/downloader.py", line 72, in download_stream
    streams = extractor.fetch_metadata(self.args.URI[0])
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/extractor.py", line 26, in fetch_metadata
    return self.raw2streams('url', uri, loop.run_until_complete(self.fetch(uri)))
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/extractor.py", line 64, in raw2streams
    return self.parse_as_dash(uri, content)
  File "/opt/XstreamDL-CLI/XstreamDL_CLI/extractor.py", line 87, in parse_as_dash
    stream = Stream('dash')
TypeError: __init__() missing 3 required positional arguments: 'name', 'save_dir', and 'stream_type'
root@test:/opt/XstreamDL-CLI#
xhlove commented 3 years ago

Only m3u8 stream is supported now, dash will coming soon...

NH-Networks commented 3 years ago

great 👍 thank you, hope it will come soon

NH-Networks commented 3 years ago

any update on this ?

xhlove commented 3 years ago

can you provide live dash stream url for test ?

NH-Networks commented 3 years ago

sure, but can't give it in public

NH-Networks commented 3 years ago

Please try this one

Mpd link: https://cdxaws-ak.akamaized.net/out/v1/519ad01e459d4014a6a950fc3b20d2f4/0a4241a1284e400793532dde98bd59e2/f89741fa8a32481e98eb32f8731adb36/manifest.mpd keys: 0201c4f3901c53ed106a42c25a654da (KID=b5f5354661ff41dfa24a514e507c040b)

NH-Networks commented 3 years ago

any updates?

NH-Networks commented 3 years ago

it's working now but it's only processing one segment and then stops (live stream)

manifest_video_H264_1280x720_4000.00kbps download start. manifest_video_H264_1280x720_4000.00kbps -------------------------------- 100.00% • 15.8/15.8 MiB • 32.0 MB/s • 0:00:00 initm4s 0000.m4s 0001.m4s 0002.m4s 0003.m4s 0004.m4s 1 file(s) copied. 成功合并 D:/temp/HLS/Downloads/manifest_video_H264_1280x720_4000.00kbps.mp4 已删除 D:/temp/HLS/Downloads/manifest_video_H264_1280x720_4000.00kbps 开始解密

ghost commented 3 years ago

key extractor ??

xhlove commented 2 years ago

0201c4f3901c53ed106a42c25a654da

the length of key that you provide only 31, it should be 32

you can download this by follow command, it is non live.

python -m XstreamDL_CLI.cli --select --limit-per-host 100 --name nh_test https://cdxaws-ak.akamaized.net/out/v1/519ad01e459d4014a6a950fc3b20d2f4/0a4241a1284e400793532dde98bd59e2/f89741fa8a32481e98eb32f8731adb36/manifest.mpd
xhlove commented 2 years ago

it's working now but it's only processing one segment and then stops (live stream)

manifest_video_H264_1280x720_4000.00kbps download start. manifest_video_H264_1280x720_4000.00kbps -------------------------------- 100.00% • 15.8/15.8 MiB • 32.0 MB/s • 0:00:00 initm4s 0000.m4s 0001.m4s 0002.m4s 0003.m4s 0004.m4s 1 file(s) copied. 成功合并 D:/temp/HLS/Downloads/manifest_video_H264_1280x720_4000.00kbps.mp4 已删除 D:/temp/HLS/Downloads/manifest_video_H264_1280x720_4000.00kbps 开始解密

you can send its link(live stream) to my mail, mail address at my profile page.

xhlove commented 2 years ago

If you have new question, open new issue or contact via email, send me detail info with log.