Skip to content

feat: embed subs (.vtt) to mp4 - #2009

Open
emre-tiryaki wants to merge 4 commits into
pystardust:masterfrom
emre-tiryaki:feat/embed-subs
Open

emre-tiryaki wants to merge 4 commits into
pystardust:masterfrom
emre-tiryaki:feat/embed-subs

Conversation

@emre-tiryaki

Copy link
Copy Markdown
Contributor

Pull Request Template

Type of change

  • Bug fix
  • Feature
  • Documentation update

Description

Fixes #1977, follow-up to #1991 as requested there: retargeted at v5.2 .

After the download, ffmpeg muxes the .vtt into the .mp4 as a mov_text track (-c copy, no re-encode) and the .vtt is deleted. Without ffmpeg, or if muxing fails, the .vtt is moved next to the video as before, so nothing is lost.

The .vtt is now downloaded into tmp_dir instead of download_dir. It's only an intermediate file, and keeping it there means less writing to the download dir (useful when ANI_CLI_TMP_DIR is on a different disk). If you'd rather keep it in download_dir, it's a one-line change.

Re-running an interrupted download works: the .vtt is fetched again, the half-written temp mp4 is overwritten, and -map -0:s drops any subtitle already embedded, so you don't end up with duplicate tracks.

Checklist

  • any anime playing
  • bumped version

  • next, prev, replay and select work
  • -c history and continue work
  • -d downloads work
  • -e (select episode) aka -r (range selection) works
  • -S select index works
  • -q quality works
  • -s syncplay works
  • -v vlc works
  • --dub and regular (sub) mode both work
  • --nextep-countdown countdown to next ep works

  • -h help info is up to date
  • Readme is up to date
  • Man page is up to date

Additional Testcases

  • --skip ani-skip works
  • --no-detach no detach works
  • --exit-after-play auto exit after playing works

Copilot AI balanced review requested due to automatic review settings November 26, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@emre-tiryaki emre-tiryaki changed the title Feat/embed subs Feat: embed subs (.vtt) to mp4 Nov 26, 2026
@emre-tiryaki emre-tiryaki changed the title Feat: embed subs (.vtt) to mp4 feat: embed subs (.vtt) to mp4 Nov 26, 2026
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.

Downloaded media no longer merged with dialogue text

2 participants