Skip to content

Dev#9

Merged
jim60105 merged 6 commits into
masterfrom
dev
Dec 15, 2025
Merged

Dev#9
jim60105 merged 6 commits into
masterfrom
dev

Conversation

@jim60105
Copy link
Copy Markdown
Member

No description provided.

Copilot AI and others added 6 commits December 15, 2025 11:57
…t integration, update yt-dlp to 2025.12.08

Co-authored-by: jim60105 <16995691+jim60105@users.noreply.github.com>
…pot-provider for YouTube POToken support (#7)

Integrate bgutil-ytdlp-pot-provider to enable YouTube POToken
authentication, avoiding bot detection. This requires deno runtime,
necessitating a base image change.

## Changes

- **Base image**: `alpine:3` → `docker.io/denoland/deno:alpine` for deno
runtime support
- **yt-dlp version**: `2025.08.22` → `2025.12.08`
- **POToken integration**:
  - Copy bgutil-pot server binary to `/usr/bin/`
- Copy bgutil-ytdlp-pot-provider plugin to
`/etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider`
  - Create plugin directory with proper permissions

## Verification

Running `yt-dlp -v` in the built image confirms:
- deno runtime available and used by yt-dlp
- bgutil-pot found in PATH
- POToken providers registered (bgutil:cli, bgutil:http)
- Plugin directory correctly detected

```
[debug] JS runtimes: deno-2.6.0
[debug] [youtube] [pot:bgutil:cli] Found bgutil-pot in PATH
[debug] [youtube] [pot] PO Token Providers: bgutil:cli-1.2.2 (external), bgutil:http-1.2.2 (external)
```

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Our `Dockerfile` currently uses `alpine:3` as the base image in the
final stage. Your task is to change the final stage's base image to
`docker.io/denoland/deno:alpine` and integrate both the client and
server of `jim60105/bgutil-ytdlp-pot-provider-rs` into this Dockerfile.
And also, change yt-dlp ARG to version 2025.12.08
> 
> To add bgutil-ytdlp-pot-provider-rs, use:
> 
> ```Dockerfile
> # Copy POToken server (bgutil-pot)
> COPY --link --chown=$APP_UID:0 --chmod=775
--from=ghcr.io/jim60105/bgutil-pot:latest /bgutil-pot /usr/bin/
> 
> # Copy POToken client plugin
> COPY --link --chown=$APP_UID:0 --chmod=775
--from=ghcr.io/jim60105/bgutil-pot:latest /client
/etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider
> ```
> 
> How to verify:
> 
> Run the built image temporarily with entrypoint="/usr/bin/yt-dlp" and
cmd="-v IgYHzexgMJg". The output must indicate that it is using the
bgutil POT provider bin and deno as the JS backend. If you see "deno not
found" or it does not mention using bgutil POT provider bin, then this
setup has failed and must be fixed. Note that these temporary changes to
entrypoint and cmd are only for testing; do not include them in your
Dockerfile.
> 
> You cannot run LivestreamRecorderService because your development
environment is not properly configured. Do not spend time trying to run
LivestreamRecorderService program.


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/Recorder-moe/LivestreamRecorderService/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
Signed-off-by: 陳鈞 Jim <jimc@cht.com.tw>
…l POT provider and Deno

Signed-off-by: 陳鈞 Jim <jimc@cht.com.tw>
…l POT provider (#8)

- [x] Reset to dev branch Dockerfile
- [x] Update Dockerfile to switch from Alpine to Debian base images
- [x] Change debug stage from
`mcr.microsoft.com/dotnet/runtime:8.0-alpine` to
`mcr.microsoft.com/dotnet/runtime:8.0`
- [x] Change build stage from `mcr.microsoft.com/dotnet/sdk:8.0-alpine`
to `mcr.microsoft.com/dotnet/sdk:8.0`
- [x] Change final stage from `docker.io/denoland/deno:alpine` to
`mcr.microsoft.com/dotnet/runtime-deps:8.0`
- [x] Add Deno binary from `docker.io/denoland/deno:bin` (instead of
using full alpine image)
- [x] Add Deno environment variables (`DENO_USE_CGROUPS`, `DENO_DIR`,
`DENO_INSTALL_ROOT`)
- [x] Remove Alpine-specific `apk` package installation (Debian base
includes required deps)
  - [x] Add bgutil POT provider to debug stage
- [x] Verify the changes by building the Docker image
- [x] Test the image with yt-dlp to confirm bgutil POT provider and deno
are working
  - Verified: `[debug] JS runtimes: deno-2.6.0`
- Verified: `[debug] [youtube] [pot:bgutil:cli] Found bgutil-pot in
PATH`
- Verified: `[debug] [youtube] [pot] PO Token Providers:
bgutil:cli-1.2.2 (external), bgutil:http-1.2.2 (external)`
  - Verified: No "deno not found" error, no libgcc_s.so.1 symbol errors
- [x] Run code review (passed)
- [x] Run CodeQL security check (passed)

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Encounter this issue in Dockerfile:
> 
> ```
> Error relocating /usr/local/lib/libgcc_s.so.1: _dl_find_object: symbol
not foundError relocating /usr/local/lib/libgcc_s.so.1:
__cpu_indicator_init: symbol not foundError relocating
/usr/local/lib/libgcc_s.so.1: __cpu_model: symbol not found
> ```
> 
> It's related to the last Dockerfile base image changes. Consider
switch it from alpine base image into debian base image. You should
research what's deno's debian image and change to use yt-dlp not musl
version.
> This is what I do in another project for your reference:
https://github.com/jim60105/backup-dl/raw/refs/heads/master/Dockerfile
> 
> How to verify:
> 
> Run the built image temporarily with entrypoint="/usr/bin/yt-dlp" and
cmd="-v fAiEdT5vULU". The output must indicate that it is using the
bgutil POT provider bin and deno as the JS backend. If you see "deno not
found" or it does not mention using bgutil POT provider bin, then this
setup has failed and must be fixed. Note that these temporary changes to
entrypoint and cmd are only for testing; do not include them in your
Dockerfile.
> 
> You cannot run LivestreamRecorderService because your development
environment is not properly configured. Do not spend time trying to run
LivestreamRecorderService program.


</details>
@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented Dec 15, 2025

Here's the code health analysis summary for commits ab8c677..17e6609. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource C# LogoC#✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@jim60105 jim60105 merged commit af28d05 into master Dec 15, 2025
5 checks passed
@jim60105 jim60105 deleted the dev branch December 15, 2025 06:47
@jim60105 jim60105 restored the dev branch December 17, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants