Coder Social home page Coder Social logo

nilaoda / n_m3u8dl-re Goto Github PK

View Code? Open in Web Editor NEW
4.3K 4.3K 462.0 3.34 MB

Cross-Platform, modern and powerful stream downloader for MPD/M3U8/ISM. English/简体中文/繁體中文.

License: MIT License

C# 100.00%
dash ffmpeg hls ism live m3u8 m3u8-downloader mpd recorder

n_m3u8dl-re's Issues

貌似现在还不支持嵌套地址?

这是我的测试地址:https://new.qqaku.com/20220819/g63uLb7E/index.m3u8

它的内容里包含了另一个地址:https://new.qqaku.com/20220819/g63uLb7E/1100kb/hls/playlist_up.m3u8

这是控制台信息

./N_m3u8DL-RE https://new.qqaku.com/20220819/g63uLb7E/index.m3u8
07:20:30.059 INFO : 加载URL: https://new.qqaku.com/20220819/g63uLb7E/index.m3u8
07:20:31.111 INFO : 内容匹配: HTTP Live Streaming
07:20:31.111 INFO : 正在解析媒体信息...
07:20:31.111 WARN : 检测到Master列表,开始解析全部流信息
07:20:31.123 INFO : 已解析, 共计 1 条媒体流, 基本流 1 条, 可选音频流 0 条, 可选字幕流 0 条
07:20:31.123 INFO : Vid 960x540 | 1100 Kbps
07:20:31.138 ERROR : Object reference not set to an instance of an object.

ffmpeg合并问题

大佬为什么解密完ffmpeg不自动合并,环境变量添加了ffmpeg,N_m3u8DL-RE.exe同目录也有ffmpeg.exe

Geo Bypass

Hi bro .. is there any options like geo bypass country ??

建议:加入分片下载重试次数设置

环境:Debian+Arm64
问题:在下载视频文件时,会时常报错WARN : Response status code does not indicate success: 403 (Forbidden).
但由于重试次数不足,导致分片没有下载下来,合并失败

Bug:无法合并ts文件

17:30:01.505 INFO : Content Matched: HTTP Live Streaming
17:30:01.505 INFO : Parsing streams...
17:30:01.864 WARN : Writing meta json
17:30:01.898 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
17:30:01.899 INFO : Vid *AES_128 Kbps | 1771 Segments | ~01h58m05s
17:30:01.901 WARN : Writing meta json
17:30:01.939 INFO : Selected streams:
17:30:01.941 INFO : Vid *AES_128 Kbps | 1771 Segments | ~01h58m05s
17:30:01.944 INFO : Start downloading...Vid Kbps
17:30:04.678 WARN : Reading media info...
17:30:05.131 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1280x720, 97 fps
17:30:05.136 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 142 kb/s
17:34:04.784 INFO : ffmpeg merging...
17:34:05.257 INFO : Done
没有报错信息,没有合并,临时文件夹还在,里面的ts文件可以正常打开.
请问哪里可以看到日志嘛?
环境是Linux Debian arm64
试着下载另一个小视频 可以正常合并

反饋

測試版本:Build Latest #61
測試系統:Win 10

  1. 不確定是我理解錯誤還是「錄製直播時即時合併」有BUG
    在我預想中是把最新分片合併在之前下載的尾段,例如我之前下載2分鐘,最新分片是40秒,那就合併為2分40秒
    但根據我測試是把最新分片覆蓋掉之前下載的,例如我之前下載2分鐘,最新分片是40秒,那40秒就會把2分鐘覆蓋掉
    到錄製完成後合併片段只是最後一次下載的分片,之前下載的全都被覆蓋

  2. 錄製myTV SUPER的回放直播(我測試是翡翠台),不會錄製到當前最新的直播片段,而是會錄製到3小時前的片段(3小時是回放極限)
    實測是因為myTV SUPER網頁版的mpd連結上會附帶「&mode=admarker%2Cticks」(模式=廣告標記,刻度),把它刪除掉就可以錄製到當前最新的直播片段

  3. 以「點播」形式下載myTV SUPER的回放直播(我測試是翡翠台),由於混流時會提示「pts has no value」、「Application provided duration: 47528000000 / timestamp: 47528000000 is out of range for mov/mp4 format」,觀看混流字幕時發現字幕會提前很多顯示
    但導入沒刪除的外部字幕時發現,只需把字幕提前XX秒就能對應一整部錄製的直播…

  4. 由於錄製直播會「自動併發下載」且預設的「下載執行緒數」為8,當「auto-select」選擇的選項有點多時(1影+1音+3字幕),會提示「Response status code does not indicate success: 403 (Forbidden).」,有時候甚至會用盡重試次數,手動設置「下載執行緒數」為4後會比較少提示,就算提示也不會用盡重試次數

  5. 在繁體界面裡,「--use-shaka-packager」的解釋是「解密?使用shaka-packager替代mp4decrypt」,有個「?」在裡面

部分文件开始下载后报错: Padding is invalid and cannot be removed.

./N_m3u8DL-RE https://pri-cdn-tx.xiaoeknow.com/app1dfvej/private_index/.m3u8\?sign\=40571c6524fc7879d736846f\&t\=6357e5ac --base-url https://c-vod.hw-cdn.xiaoeknow.com///drm/ -H 'Referer: https://app1dfvejls1518.h5.xiaoeknow.com/' --custom-hls-key j0Q4f271tUX4OmAGmEdSA==

21:47:28.819 INFO : N_m3u8DL-RE (Beta version) 20221024
21:47:29.091 INFO : 加载URL: https://pri-cdn-tx.xiaoeknow.com/app1dfvejls1518...
21:47:29.437 INFO : 内容匹配: HTTP Live Streaming
21:47:29.440 INFO : 正在解析媒体信息...
21:47:29.579 INFO : 已解析, 共计 1 条媒体流, 基本流 1 条, 可选音频流 0 条, 可选字幕流 0 条
21:47:29.590 INFO : Vid *AES_128 Kbps | 3129 Segments | ~01h44m17s
21:47:29.591 INFO : 已选择的流:
21:47:29.592 INFO : Vid *AES_128 Kbps | 3129 Segments | ~01h44m17s
21:47:29.594 INFO : 保存文件名: 1662989967qV7GCK_2022-10-25_21-47-29
21:47:29.604 INFO : 开始下载...Vid Kbps
21:47:29.723 ERROR : Padding is invalid and cannot be removed.

下载视频无法播放

audio not in sync with video

Hello,

first of all, thank you for great application and efforts to maintain it!

I have some issues with running mpd url of live stream and merging the audio with video. The audio is not in sync with video.

./N_m3u8DL-RE-beta --save-name test "https://url/index.mpd" --mp4-real-time-decryption --live-real-time-merge --key 000000:000000000 --use-shaka-packager
ffmpeg -readrate 1 -i test.mp4 -i test.m4a -c:v copy -c:a copy test_merged.mp4

Also tried stopping the N_m3u8DL-RE and did merging without -readrate 1, like vod audio/video merge, but sound is still out of sync. Any suggestions what might be wrong?

Thank you!

图形化(GUI)版本

042442rfbebbcu6cgitegu

在恩山上看到您出了GUI版本,能不能早日更新在github上,顺便放个赞助码,可以支持下您的repo

实测使用此工具的问题

1.j a b l e . t v
此网站m3u8就在主页代码中提取出来下载在老版能下载,新版就会少文件,不断有超时重试

  1. 文件合并问题
    大于 1800分片 合并不了 命令过长

基于以上两点,我目前在ubuntu 20.04 上还无法正常使用

aes-ecb 及proxy 功能建议

个人的一些建议
Crypto.AESUtil.cs这个文件里可以加入

AES-ECB-Decrypt 方法,C#不太了解,不过应该是在CipherMode这里改成CipherMode.ECB,再去掉iv选项应该可以做到
在args 里可以加入--use-AES-ECB参数,实现手动使用AES-ECB解密

还有就是可以加入proxy参数,使一些下载可以走代理

Help with downloading from NBA League Pass

Operation is not supported on this platform.

00:35:49.550 INFO : 正在解析媒体信息...
00:35:49.551 WARN : 写出meta json
00:35:49.567 INFO : 已选择的流:
00:35:49.568 INFO : Vid *CENC 3840x2160 | 15000 Kbps | video_5 | hvc1.1.6.L150.90 | 1954 Segments | ~02h10m14s
00:35:49.568 INFO : Aud *CENC audio_aac_eng_6 | 56 Kbps | mp4a.40.2 | eng | 1954 Segments | ~02h10m14s
00:35:49.573 INFO : 开始下载...Vid 3840x2160 | 15000 Kbps | video_5 | hvc1.1.6.L150.90
00:35:49.573 WARN : 检测到CENC加密方式,自动开启二进制合并
00:35:50.605 ERROR : Operation is not supported on this platform.00:35:49.550 INFO : 正在解析媒体信息...
00:35:49.551 WARN : 写出meta json
00:35:49.567 INFO : 已选择的流:
00:35:49.568 INFO : Vid *CENC 3840x2160 | 15000 Kbps | video_5 | hvc1.1.6.L150.90 | 1954 Segments | ~02h10m14s
00:35:49.568 INFO : Aud *CENC audio_aac_eng_6 | 56 Kbps | mp4a.40.2 | eng | 1954 Segments | ~02h10m14s
00:35:49.573 INFO : 开始下载...Vid 3840x2160 | 15000 Kbps | video_5 | hvc1.1.6.L150.90
00:35:49.573 WARN : 检测到CENC加密方式,自动开启二进制合并
00:35:50.605 ERROR : Operation is not supported on this platform.

N_m3u8DL-RE_Beta_win-x64

mac 版本合并ts 文件

N_m3u8DL-RE_Beta_osx-x64
e1c89de
下载完成后没有合并成MP4 就算指定参数 -M format=mp4 也没有合并需要手动用ffmpeg 合并
是现在暂时不支持吗 ?

[Bug] 无法下载得到的音频

感谢开发者。老版本可以正常下载dedao.cn的音频,但是新版本会卡住,然后就没有然后了。我即便设置了--log-level debug 也没拿到什么有效错误信息。
示例地址:https://m.igetget.com/ddmedia/public/v1/m3u8/3403820841304864/52/m.m3u8
卡住的位置:

17:15:04.338 DEBUG : 7E E9 09 0A B0 00 42 05 C7 2B 06 8E AE 94 80 1C
17:15:04.363 INFO  : 已解析, 共计 1 条媒体流, 基本流 1 条, 可选音频流 0 条, 可选字幕流 0 条
17:15:04.409 INFO  : Vid *AES_128 Kbps | 48 Segments | ~11m54s
17:15:04.415 INFO  : 已选择的流:
17:15:04.416 INFO  : Vid *AES_128 Kbps | 48 Segments | ~11m54s

SSL解析问题

06:52:48.591 INFO : Loading URL: https://.com/videos/202204/18//0g2b90/index.m3u8
06:52:49.052 ERROR : AggregateException_ctor_DefaultMessage (net_http_ssl_connection_failed)
06:52:52.066 INFO : Loading URL: https://****.com/videos/202204/18/
***/index.m3u8
06:52:52.532 ERROR : AggregateException_ctor_DefaultMessage (net_http_ssl_connection_failed)

报如上错误。

[Test] Run N_m3u8DL-RE on Android-arm64 with Termux

Install Termux

Termux Get Storage Access

termux-setup-storage

Allow prompt, then restart Termux.

Config Ubuntu

pkg up -y
pkg install proot-distro
proot-distro install ubuntu
proot-distro login ubuntu

Get Apps

On Ubuntu:

  • mkdir
mkdir /RE
cd /RE
  • requirements
apt update
apt install wget
apt install unzip
apt-get install libicu-dev
  • ffmpeg
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz
tar -xvf ffmpeg-release-arm64-static.tar.xz --wildcards '*/ffmpeg' -O > ./ffmpeg
chmod +x ./ffmpeg
  • RE
wget https://nightly.link/nilaoda/N_m3u8DL-RE/actions/runs/2905367163/N_m3u8DL-RE_Beta_linux-arm64.zip
unzip N_m3u8DL-RE_Beta_linux-arm64.zip
chmod +x ./N_m3u8DL-RE

Note: replace 2905367163 with latest id (Actions)

Test

./N_m3u8DL-RE --tmp-dir /sdcard/Download --save-dir /sdcard/Download --save-name TEST "http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8"

ZVJRK)VM(TGE6Z1PF G12(A

flv 可以下载吗,视频号解析地址是flv

Remove media type on the save name

The saved name of the downloaded media contain the type of the media. Would like to remove it by default.

Command and flag used:
~/m3u8/bin/./N_m3u8DL-RE "URL" --save-name "KL.Gangster.Underworld.S01E01" --ffmpeg-binary-path /usr/bin/ffmpeg --write-meta-json false --sub-format SRT --binary-merge

Saved filename:
KL.Gangster.Underwold.S01E01.VIDEO.ts
KL.Gangster.Underworld.S01E01.SUBTITLE.en.srt

Can the media type like VIDEO and SUBTITLE be removed by default?

Ability to auto select video by how many segments it has

Common links I use have two primary formats both exactly the same except one has 1 segment and the other has multiple, if I have it auto select it will go for the one with multiple and end up downloading the same thing multiple times. This happens with both Video and Audio, is there a command that I can have it automatically choose the audio and video with 1 segment and the best quality otherwise?

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.