Repository: nilaoda/N_m3u8DL-RE Branch: main Commit: a441ea83f8e7 Files: 114 Total size: 614.5 KB Directory structure: gitextract_dnlao_8d/ ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ └── build_latest.yml ├── .gitignore ├── LICENSE ├── README.en.md ├── README.md ├── TestStreams.md └── src/ ├── N_m3u8DL-RE/ │ ├── Column/ │ │ ├── DownloadSpeedColumn.cs │ │ ├── DownloadStatusColumn.cs │ │ ├── MyPercentageColumn.cs │ │ ├── RecordingDurationColumn.cs │ │ ├── RecordingSizeColumn.cs │ │ └── RecordingStatusColumn.cs │ ├── CommandLine/ │ │ ├── CommandInvoker.cs │ │ ├── ComplexParamParser.cs │ │ └── MyOption.cs │ ├── Config/ │ │ ├── DownloaderConfig.cs │ │ └── EnvConfigKey.cs │ ├── Crypto/ │ │ ├── AESUtil.cs │ │ ├── CSChaCha20.cs │ │ └── ChaCha20Util.cs │ ├── Directory.Build.props │ ├── DownloadManager/ │ │ ├── HTTPLiveRecordManager.cs │ │ ├── SimpleDownloadManager.cs │ │ └── SimpleLiveRecordManager2.cs │ ├── Downloader/ │ │ ├── IDownloader.cs │ │ └── SimpleDownloader.cs │ ├── Entity/ │ │ ├── CustomRange.cs │ │ ├── DownloadResult.cs │ │ ├── Mediainfo.cs │ │ ├── MuxOptions.cs │ │ ├── OutputFile.cs │ │ ├── SpeedContainer.cs │ │ └── StreamFilter.cs │ ├── Enum/ │ │ ├── DecryptEngine.cs │ │ ├── MuxFormat.cs │ │ └── SubtitleFormat.cs │ ├── N_m3u8DL-RE.csproj │ ├── Processor/ │ │ ├── DemoProcessor.cs │ │ ├── DemoProcessor2.cs │ │ └── NowehoryzontyUrlProcessor.cs │ ├── Program.cs │ └── Util/ │ ├── CultureUtil.cs │ ├── DownloadUtil.cs │ ├── FilterUtil.cs │ ├── ImageHeaderUtil.cs │ ├── LanguageCodeUtil.cs │ ├── LargeSingleFileSplitUtil.cs │ ├── MP4DecryptUtil.cs │ ├── MediainfoUtil.cs │ ├── MergeUtil.cs │ ├── OtherUtil.cs │ ├── PipeUtil.cs │ └── SubtitleUtil.cs ├── N_m3u8DL-RE.Common/ │ ├── Entity/ │ │ ├── EncryptInfo.cs │ │ ├── MSSData.cs │ │ ├── MediaPart.cs │ │ ├── MediaSegment.cs │ │ ├── Playlist.cs │ │ ├── StreamSpec.cs │ │ ├── SubCue.cs │ │ └── WebVttSub.cs │ ├── Enum/ │ │ ├── Choise.cs │ │ ├── EncryptMethod.cs │ │ ├── ExtractorType.cs │ │ ├── MediaType.cs │ │ └── RoleType.cs │ ├── JsonContext/ │ │ └── JsonContext.cs │ ├── JsonConverter/ │ │ └── BytesBase64Converter.cs │ ├── Log/ │ │ ├── CustomAnsiConsole.cs │ │ ├── LogLevel.cs │ │ └── Logger.cs │ ├── N_m3u8DL-RE.Common.csproj │ ├── Resource/ │ │ ├── ResString.cs │ │ ├── StaticText.cs │ │ └── TextContainer.cs │ └── Util/ │ ├── BinaryContentCheckUtil.cs │ ├── GlobalUtil.cs │ ├── HTTPUtil.cs │ ├── HexUtil.cs │ └── RetryUtil.cs ├── N_m3u8DL-RE.Parser/ │ ├── Config/ │ │ └── ParserConfig.cs │ ├── Constants/ │ │ ├── DASHTags.cs │ │ ├── HLSTags.cs │ │ └── MSSTags.cs │ ├── Extractor/ │ │ ├── DASHExtractor2.cs │ │ ├── HLSExtractor.cs │ │ ├── IExtractor.cs │ │ ├── LiveTSExtractor.cs │ │ └── MSSExtractor.cs │ ├── InternalsVisibleTo.cs │ ├── Mp4/ │ │ ├── BinaryReader2.cs │ │ ├── BinaryWriter2.cs │ │ ├── MP4InitUtil.cs │ │ ├── MP4Parser.cs │ │ ├── MP4TtmlUtil.cs │ │ ├── MP4VttUtil.cs │ │ └── MSSMoovProcessor.cs │ ├── N_m3u8DL-RE.Parser.csproj │ ├── Processor/ │ │ ├── ContentProcessor.cs │ │ ├── DASH/ │ │ │ └── DefaultDASHContentProcessor.cs │ │ ├── DefaultUrlProcessor.cs │ │ ├── HLS/ │ │ │ ├── DefaultHLSContentProcessor.cs │ │ │ └── DefaultHLSKeyProcessor.cs │ │ ├── KeyProcessor.cs │ │ └── UrlProcessor.cs │ ├── StreamExtractor.cs │ └── Util/ │ └── ParserUtil.cs ├── N_m3u8DL-RE.Tests/ │ ├── Common/ │ │ └── Util/ │ │ └── HexUtilTests.cs │ ├── N_m3u8DL-RE.Tests.csproj │ ├── Parser/ │ │ └── Extractor/ │ │ └── DASHExtractor2Tests.cs │ ├── ResourceHelper.cs │ └── Resources/ │ └── Dash/ │ └── Manifest_1080p.mpd └── N_m3u8DL-RE.sln ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry custom: ['https://nilaoda.github.io/N_m3u8DL-CLI/source/images/alipay.png','https://www.buymeacoffee.com/nilaoda'] ================================================ FILE: .github/workflows/build_latest.yml ================================================ name: Build Latest on: workflow_dispatch: inputs: doRelease: description: 'Publish new release' type: boolean default: false required: false tag: type: string description: 'Release version tag (e.g. v0.2.1-beta)' required: true ref: type: string description: 'Git ref from which to release' required: true default: 'main' env: DOTNET_SDK_VERSION: "10.0.101" ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: set-date: runs-on: ubuntu-latest outputs: date: ${{ steps.get_date.outputs.date }} tag: ${{ steps.format_tag.outputs.tag }} steps: - name: Get Date in UTC+8 id: get_date run: | DATE=$(date -u -d '8 hours' +'%Y%m%d') echo "date=${DATE}" >> "$GITHUB_OUTPUT" - name: Determine Tag id: format_tag run: | if [ "${{ github.event.inputs.doRelease }}" == "true" ]; then TAG="${{ github.event.inputs.tag }}" else TAG="actions-$GITHUB_RUN_ID" fi echo "tag=${TAG}" >> "$GITHUB_OUTPUT" build-win-nt6_0-x86: runs-on: windows-latest needs: set-date steps: - uses: actions/checkout@v1 with: ref: ${{ github.event.inputs.ref }} - name: Install zip run: choco install zip --no-progress --yes - name: Set up dotnet uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - run: powershell -Command "(Get-Content src/N_m3u8DL-RE/N_m3u8DL-RE.csproj) -replace '.*', 'net10.0-windows' | Set-Content src/N_m3u8DL-RE/N_m3u8DL-RE.csproj" - run: dotnet add src/N_m3u8DL-RE/N_m3u8DL-RE.csproj package YY-Thunks --version 1.1.4 - run: dotnet add src/N_m3u8DL-RE/N_m3u8DL-RE.csproj package VC-LTL --version 5.1.1 - run: dotnet publish src/N_m3u8DL-RE -p:TargetPlatformMinVersion=6.0 -r win-x86 -c Release -o artifact-x86 - name: Package [win-x86] run: | cd artifact-x86 zip ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-NT6.0-x86_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe - name: Upload Artifact[win-x86] uses: actions/upload-artifact@v4 with: name: win-NT6.0-x86 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-NT6.0-x86_${{ needs.set-date.outputs.date }}.zip build-win-x64-arm64: runs-on: windows-latest needs: set-date steps: - uses: actions/checkout@v1 with: ref: ${{ github.event.inputs.ref }} - name: Install zip run: choco install zip --no-progress --yes - name: Set up dotnet uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - run: dotnet publish src/N_m3u8DL-RE -r win-x64 -c Release -o artifact-x64 - run: dotnet publish src/N_m3u8DL-RE -r win-arm64 -c Release -o artifact-arm64 - name: Package [win] run: | cd artifact-x64 zip ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-x64_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe cd ../artifact-arm64 zip ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-arm64_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe - name: Upload Artifact [win-x64] uses: actions/upload-artifact@v4 with: name: win-x64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-x64_${{ needs.set-date.outputs.date }}.zip - name: Upload Artifact [win-arm64] uses: actions/upload-artifact@v4 with: name: win-arm64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-arm64_${{ needs.set-date.outputs.date }}.zip build-android-bionic-x64-arm64: runs-on: windows-latest needs: set-date steps: - uses: actions/checkout@v1 with: ref: ${{ github.event.inputs.ref }} - name: Set up NDK shell: pwsh run: | Invoke-WebRequest -Uri "https://dl.google.com/android/repository/android-ndk-r27c-windows.zip" -OutFile "android-ndk.zip" Expand-Archive -Path "android-ndk.zip" -DestinationPath "./android-ndk" Get-ChildItem -Path "./android-ndk" $ndkRoot = "${{ github.workspace }}\android-ndk\android-ndk-r27c" echo "NDK_ROOT=$ndkRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 $ndkBinPath = "$ndkRoot\toolchains\llvm\prebuilt\windows-x86_64\bin" echo $ndkBinPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - name: Set up dotnet uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - run: dotnet publish src/N_m3u8DL-RE -r linux-bionic-x64 -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true -o artifact - run: dotnet publish src/N_m3u8DL-RE -r linux-bionic-arm64 -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true -o artifact-arm64 - name: Package [linux-bionic] run: | cd artifact tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE cd ../artifact-arm64 tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE - name: Upload Artifact [linux-bionic-x64] uses: actions/upload-artifact@v4 with: name: android-bionic-x64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-x64_${{ needs.set-date.outputs.date }}.tar.gz - name: Upload Artifact[linux-bionic-arm64] uses: actions/upload-artifact@v4 with: name: android-bionic-arm64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-arm64_${{ needs.set-date.outputs.date }}.tar.gz build-linux-x64: runs-on: ubuntu-latest needs: set-date steps: - uses: actions/checkout@v1 with: ref: ${{ github.event.inputs.ref }} - name: Build x64 in alpine container run: | # 在 alpine 容器中执行完整构建流程 docker run --rm \ -v "$PWD:/workspace" \ -w /workspace \ alpine:3.21 \ sh -c " set -e # 安装编译和运行依赖 apk add --no-cache bash wget tar clang build-base cmake icu-dev icu-data-full zlib-static openssl-dev openssl-libs-static # 下载并安装 .NET SDK DOTNET_SDK_VERSION='${{ env.DOTNET_SDK_VERSION }}' DOTNET_SDK_URL=\"https://builds.dotnet.microsoft.com/dotnet/Sdk/\${DOTNET_SDK_VERSION}/dotnet-sdk-\${DOTNET_SDK_VERSION}-linux-musl-x64.tar.gz\" wget -nv \"\$DOTNET_SDK_URL\" -O dotnet-sdk.tar.gz mkdir -p /opt/dotnet tar -xzf dotnet-sdk.tar.gz -C /opt/dotnet export PATH=\"/opt/dotnet:\$PATH\" # 编译 Native AOT 输出到挂载的 artifact 目录 dotnet publish src/N_m3u8DL-RE -r linux-musl-x64 -c Release -o /workspace/artifact " - name: Package [linux-x64] run: | cd artifact tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE - name: Upload Artifact [linux-x64] uses: actions/upload-artifact@v4 with: name: linux-x64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-x64_${{ needs.set-date.outputs.date }}.tar.gz build-linux-arm64: runs-on: ubuntu-latest needs: set-date steps: - uses: actions/checkout@v1 with: ref: ${{ github.event.inputs.ref }} - name: Build arm64 in alpine container run: | # 在交叉编译环境容器中执行完整构建流程 docker run --rm \ -v "$PWD:/workspace" \ -w /workspace \ mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm64-alpine \ bash -c " set -e # 确保 Ubuntu 宿主环境有所有依赖 apt-get update && apt-get install -y build-essential clang binutils-aarch64-linux-gnu # 动态获取 Alpine 最新 OpenSSL 版本号 ALPINE_REPO='https://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64' echo \"Fetching latest OpenSSL version from Alpine...\" # 自动抓取 openssl-dev 的完整文件名并解析版本号 SSL_APK_NAME=\$(wget -qO- \$ALPINE_REPO/ | grep -o 'openssl-dev-[0-9.]\+-r[0-9]\+.apk' | head -n 1) SSL_VER=\$(echo \$SSL_APK_NAME | sed 's/openssl-dev-//;s/.apk//') echo \"Detected OpenSSL Version: \$SSL_VER\" # 下载并提取 ARM64 的 OpenSSL 静态库到 SysRoot mkdir -p /tmp/ssl_setup && cd /tmp/ssl_setup wget -q \$ALPINE_REPO/openssl-libs-static-\$SSL_VER.apk wget -q \$ALPINE_REPO/openssl-dev-\$SSL_VER.apk # 解压到交叉编译系统的根目录 for f in *.apk; do tar -xf \$f -C /crossrootfs/arm64; done cd /workspace # 设置交叉编译环境变量 (强制 CMake 和编译器使用正确路径) export CROSS_COMPILE_PREFIX=\"aarch64-alpine-linux-musl-\" export CC=\"\${CROSS_COMPILE_PREFIX}clang\" export CXX=\"\${CROSS_COMPILE_PREFIX}clang++\" # 告知 .NET 本地脚本去哪里找 OpenSSL 静态库 export OPENSSL_ROOT_DIR=\"/crossrootfs/arm64/usr\" export OPENSSL_USE_STATIC_LIBS=TRUE # 额外保险:设置 CFLAGS 让 CMake 内部探测更准确 export CFLAGS=\"--sysroot=/crossrootfs/arm64 --target=aarch64-alpine-linux-musl\" # 下载并安装 .NET SDK DOTNET_SDK_VERSION='${{ env.DOTNET_SDK_VERSION }}' DOTNET_SDK_URL=\"https://builds.dotnet.microsoft.com/dotnet/Sdk/\${DOTNET_SDK_VERSION}/dotnet-sdk-\${DOTNET_SDK_VERSION}-linux-x64.tar.gz\" wget -nv \"\$DOTNET_SDK_URL\" -O dotnet-sdk.tar.gz mkdir -p /opt/dotnet tar -xzf dotnet-sdk.tar.gz -C /opt/dotnet export PATH=\"/opt/dotnet:\$PATH\" # 交叉编译 dotnet publish src/N_m3u8DL-RE -r linux-musl-arm64 -c Release \ -p:SysRoot=/crossrootfs/arm64 \ -p:CppCompilerAndLinker=clang \ -p:StripSymbols=true \ -o /workspace/artifact " - name: Package [linux-arm64] run: | cd artifact tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE - name: Upload Artifact [linux-x64] uses: actions/upload-artifact@v4 with: name: linux-arm64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-arm64_${{ needs.set-date.outputs.date }}.tar.gz build-mac-x64-arm64: runs-on: macos-latest needs: set-date steps: - uses: actions/checkout@v1 with: ref: ${{ github.event.inputs.ref }} - name: Set up dotnet uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - run: dotnet publish src/N_m3u8DL-RE -r osx-arm64 -c Release -o artifact-arm64 - run: dotnet publish src/N_m3u8DL-RE -r osx-x64 -c Release -o artifact-x64 - name: Package [osx] run: | cd artifact-x64 tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE cd ../artifact-arm64 tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE - name: Upload Artifact [osx-x64] uses: actions/upload-artifact@v4 with: name: osx-x64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-x64_${{ needs.set-date.outputs.date }}.tar.gz - name: Upload Artifact[osx-arm64] uses: actions/upload-artifact@v4 with: name: osx-arm64 path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-arm64_${{ needs.set-date.outputs.date }}.tar.gz create_release: name: Create release runs-on: ubuntu-latest permissions: contents: write if: ${{ github.event.inputs.doRelease == 'true' }} needs: [set-date,build-win-nt6_0-x86,build-win-x64-arm64,build-android-bionic-x64-arm64,build-linux-x64,build-linux-arm64,build-mac-x64-arm64] steps: - name: Fetch artifacts uses: actions/download-artifact@v4 - name: Create GitHub Release uses: ncipollo/release-action@v1 with: tag: ${{ github.event.inputs.tag }} name: N_m3u8DL-RE_${{ github.event.inputs.tag }} artifacts: "android-bionic-x64/*,android-bionic-arm64/*,linux-x64/*,linux-arm64/*,linux-musl-x64/*,linux-musl-arm64/*,osx-x64/*,osx-arm64/*,win-x64/*,win-arm64/*,win-NT6.0-x86/*" draft: false allowUpdates: true generateReleaseNotes: true discussionCategory: 'Announcements' ================================================ FILE: .gitignore ================================================ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Properties Properties/ # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ #[Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Rider .idea # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd # macOS shit .DS_Store ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2022 nilaoda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.en.md ================================================ # N_m3u8DL-RE [EN] Cross-platform DASH/HLS/MSS download tool. Supports on-demand and live streaming (DASH/HLS). [![img](https://img.shields.io/github/stars/nilaoda/N_m3u8DL-RE?label=%E7%82%B9%E8%B5%9E)](https://github.com/nilaoda/N_m3u8DL-RE) [![img](https://img.shields.io/github/last-commit/nilaoda/N_m3u8DL-RE?label=%E6%9C%80%E8%BF%91%E6%8F%90%E4%BA%A4)](https://github.com/nilaoda/N_m3u8DL-RE) [![img](https://img.shields.io/github/release/nilaoda/N_m3u8DL-RE?label=%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC)](https://github.com/nilaoda/N_m3u8DL-RE/releases) [![img](https://img.shields.io/github/license/nilaoda/N_m3u8DL-RE?label=%E8%AE%B8%E5%8F%AF%E8%AF%81)](https://github.com/nilaoda/N_m3u8DL-RE) [![img](https://img.shields.io/github/downloads/nilaoda/N_m3u8DL-RE/total?label=%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://github.com/nilaoda/N_m3u8DL-RE/releases) If you encounter a bug, please first confirm whether you are using the latest version of the software. (If you are using a release version, it is recommended to go to the [Actions](https://github.com/nilaoda/N_m3u8DL-RE/actions) page to download the latest automatically built version and check if the issue has already been fixed.) If you are using the latest version and the issue still exists, you can check the [Issues](https://github.com/nilaoda/N_m3u8DL-RE/issues) section to see if someone else has encountered a similar problem. If not, feel free to open a new issue. --- The built-in terminal in older versions of Windows may not support this program. As an alternative, try running it in [cmder](https://github.com/cmderdev/cmder). Arch Linux users can install from AUR: [n-m3u8dl-re-bin](https://aur.archlinux.org/packages/n-m3u8dl-re-bin), [n-m3u8dl-re-git](https://aur.archlinux.org/packages/n-m3u8dl-re-git) ```bash # Install N_m3u8DL-RE release version on Arch Linux and its derivatives (not maintained by the author) yay -Syu n-m3u8dl-re-bin # Install N_m3u8DL-RE development version on Arch Linux and its derivatives (not maintained by the author) yay -Syu n-m3u8dl-re-git ``` --- ## Command line parameters ``` Description: N_m3u8DL-RE (Beta version) 20241203 Usage: N_m3u8DL-RE [options] Arguments: Input Url or File Options: --tmp-dir Set temporary file directory --save-dir Set output directory --save-name Set output filename --base-url Set BaseURL --thread-count Set download thread count [default: based on the number of CPU cores] --download-retry-count The number of retries when download segment error [default: 3] --http-request-timeout Timeout duration for HTTP requests (in seconds) [default: 100] --force-ansi-console Force assuming the terminal is ANSI-compatible and interactive --no-ansi-color Remove ANSI colors --auto-select Automatically selects the best tracks of all types [default: False] --skip-merge Skip segments merge [default: False] --skip-download Skip download [default: False] --check-segments-count Check if the actual number of segments downloaded matches the expected number [default: True] --binary-merge Binary merge [default: False] --use-ffmpeg-concat-demuxer When merging with ffmpeg, use the concat demuxer instead of the concat protocol [default: False] --del-after-done Delete temporary files when done [default: True] --no-date-info Date information is not written during muxing [default: False] --no-log Disable log file output [default: False] --write-meta-json Write meta json after parsed [default: True] --append-url-params Add Params of input Url to segments, useful for some websites, such as kakao.com [default: False] -mt, --concurrent-download Concurrently download the selected audio, video and subtitles [default: False] -H, --header
Pass custom header(s) to server, Example: -H "Cookie: mycookie" -H "User-Agent: iOS" --sub-only Select only subtitle tracks [default: False] --sub-format Subtitle output format [default: SRT] --auto-subtitle-fix Automatically fix subtitles [default: True] --ffmpeg-binary-path Full path to the ffmpeg binary, like C:\Tools\ffmpeg.exe --log-level Set log level [default: INFO] --ui-language Set UI language --urlprocessor-args Give these arguments to the URL Processors. --key Set decryption key(s) to mp4decrypt/shaka-packager/ffmpeg. format: --key KID1:KEY1 --key KID2:KEY2 or use --key KEY if all tracks share the same key. --key-text-file Set the kid-key file, the program will search the KEY with KID from the file.(Very large file are not recommended) --decryption-engine Set the third-party program used for decryption [default: MP4DECRYPT] --decryption-binary-path Full path to the tool used for MP4 decryption, like C:\Tools\mp4decrypt.exe --mp4-real-time-decryption Decrypt MP4 segments in real time [default: False] -R, --max-speed Set speed limit, Mbps or Kbps, for example: 15M 100K. -M, --mux-after-done When all works is done, try to mux the downloaded streams. Use "--morehelp mux-after-done" for more details --custom-hls-method Set HLS encryption method (AES_128|AES_128_ECB|CENC|CHACHA20|NONE|SAMPLE_AES|SAMPLE_AES_ CTR|UNKNOWN) --custom-hls-key Set the HLS decryption key. Can be file, HEX or Base64 --custom-hls-iv Set the HLS decryption iv. Can be file, HEX or Base64 --use-system-proxy Use system default proxy [default: True] --custom-proxy Set web request proxy, like http://127.0.0.1:8888 --custom-range Download only part of the segments. Use "--morehelp custom-range" for more details --task-start-at Task execution will not start before this time --live-perform-as-vod Download live streams as vod [default: False] --live-real-time-merge Real-time merge into file when recording live [default: False] --live-keep-segments Keep segments when recording a live (liveRealTimeMerge enabled) [default: True] --live-pipe-mux Real-time muxing to TS file through pipeline + ffmpeg (liveRealTimeMerge enabled) [default: False] --live-fix-vtt-by-audio Correct VTT sub by reading the start time of the audio file [default: False] --live-record-limit Recording time limit when recording live --live-wait-time Manually set the live playlist refresh interval --live-take-count Manually set the number of segments downloaded for the first time when recording live [default: 16] --mux-import When MuxAfterDone enabled, allow to import local media files. Use "--morehelp mux-import" for more details -sv, --select-video Select video streams by regular expressions. Use "--morehelp select-video" for more details -sa, --select-audio Select audio streams by regular expressions. Use "--morehelp select-audio" for more details -ss, --select-subtitle Select subtitle streams by regular expressions. Use "--morehelp select-subtitle" for more details -dv, --drop-video Drop video streams by regular expressions. -da, --drop-audio Drop audio streams by regular expressions. -ds, --drop-subtitle Drop subtitle streams by regular expressions. --ad-keyword Set URL keywords (regular expressions) for AD segments --disable-update-check Disable version update check [default: False] --allow-hls-multi-ext-map Allow multiple #EXT-X-MAP in HLS (experimental) [default: False] --morehelp