Repository navigation
feat(download): embed subtitles into the mp4 instead of a sidecar .vtt - #1991
emre-tiryaki wants to merge 2 commits into
Conversation
|
First impressions, since I don't have time for a detailed review rn. |
…nd mux_subs functions.
|
I wanted to give the user a choice to embed the subs or not, I don't know for sure but I thought maybe some people liked this behaviour. I removed it now, it only keeps the seperate file if ffmpeg is not on the system. now the download function is embedding the subtitles with The function steps after downloading the video:
|
|
We're moving providers again for v5.2, with early work already being under way by a contributor. |
|
Is this feature blocking changing the providers? this PR removes the seperate subtitle files, why is it not important?? I'm just curious, if you want to close this PR it is you're choice. |
|
Yeah it's not too important because the next provider will have hardsubs / merged by default. I also suspect this doesn't affect all downloads, in which case there would have been drastically more issues / requests in discords support channel. This PR still provides value by being a stopgap solution for the few that are affected and care enough for a patch |
Pull Request Template
Type of change
Description
Fixes #1977
Downloads currently produce a video file plus a separate
.vttsubtitle file, so the user has to keep both together and load the subtitles manually in the player.This PR muxes the subtitles into the downloaded
.mp4as amov_texttrack (default disposition, languageeng), so the result is a single self-contained file.Changes:
download(): the existing yt-dlp/ffmpeg download logic moved unchanged intofetch_media().mux_subs()function because it was too long.<name>.tmp.mp4, remuxed with-c copy(no re-encoding) together with the.vtt, and the temporary files are removed on success..vttnext to it on mux failure). Nothing is lost in any failure path.ANI_CLI_EMBED_SUBS(default1). Set it to0to restore the previous sidecar.vttbehavior.Checklist
-chistory and continue work-ddownloads work-e(select episode) aka-r(range selection) works-Sselect index works-qquality works-ssyncplay works-vvlc works--duband regular (sub) mode both work--nextep-countdowncountdown to next ep works-hhelp info is up to dateAdditional Testcases
--skipani-skip works--no-detachno detach works--exit-after-playauto exit after playing works