Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 允许配置视频下载文件拓展名 #4449

Merged
merged 1 commit into from
Sep 23, 2023
Merged

feat: 允许配置视频下载文件拓展名 #4449

merged 1 commit into from
Sep 23, 2023

Conversation

xfoxfu
Copy link
Contributor

@xfoxfu xfoxfu commented Sep 22, 2023

允许配置 DASH 下载的文件拓展名。

设置的屏幕截图

效果演示

主要的目的是如果用户希望下载后使用 ffmpeg 合并下载后的视频和音频并生成 MP4 封装文件时,可以将视频下载为 .m4v 文件,从而避免文件命名的拓展名冲突。

现在下载后的文件:

DemoFoobar_哔哩哔哩bilibili_APEX英雄.m4a
DemoFoobar_哔哩哔哩bilibili_APEX英雄.mp4

用户需要使用命令

ffmpeg -i DemoFoobar_哔哩哔哩bilibili_APEX英雄.m4a \
       -i DemoFoobar_哔哩哔哩bilibili_APEX英雄.mp4 \
       -codec copy \
       DemoFoobar_哔哩哔哩bilibili_APEX英雄.full.mp4
rm -rf DemoFoobar_哔哩哔哩bilibili_APEX英雄.m4a
rm -rf DemoFoobar_哔哩哔哩bilibili_APEX英雄.mp4
mv DemoFoobar_哔哩哔哩bilibili_APEX英雄.full.mp4 DemoFoobar_哔哩哔哩bilibili_APEX英雄.mp4

如果允许用户自定义拓展名,则用户可以设置视频文件下载拓展名为 .m4v,将文件下载为

DemoFoobar_哔哩哔哩bilibili_APEX英雄.m4a
DemoFoobar_哔哩哔哩bilibili_APEX英雄.m4v

这样合并文件后只需要删除 .m4a.m4v 即可,生成的 .mp4 文件的文件名则可以和原来的 .m4v/.m4a 文件保持一致。

@the1812 the1812 merged commit 6777f62 into the1812:preview-features Sep 23, 2023
1 check passed
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.

2 participants