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

将正在录制的文件存放在单独的文件夹中 #520

Open
tio-plato opened this issue Sep 6, 2023 · 4 comments
Open

将正在录制的文件存放在单独的文件夹中 #520

tio-plato opened this issue Sep 6, 2023 · 4 comments
Labels
area: Core enhancement New feature or request

Comments

@tio-plato
Copy link

Problem

  1. 我使用rsync备份远程服务器上的录播目录,由于正在录制的文件在不断写入,会导致rsync备份后的hash校验失败。
  2. 多个直播流同时录制的时候会碎片化写入,尤其是在CoW文件系统上(如zfs)

Proposal

像qBittorrent一样增加一个将未完成的文件存放到单独目录中的选项,比如存放到 /incomplete/ 然后当文件关闭时将其移动回 /{room_id}/ 这样可以比较方便地从备份中排除。
同时还可以一定程度上的解决 #153 的问题,通过将 /incomplete// 映射到不同的分区,移动后就会分配连续的扇区。而且对于CoW文件系统(如zfs),还可以单独关闭 /incomplete/ 映射数据集的快照,来节约空间。

@Genteure Genteure added enhancement New feature or request area: Core labels Sep 7, 2023
@Genteure
Copy link
Member

Genteure commented Sep 7, 2023

需求合理,之后改的时候会考虑。

这个功能也可以通过 录播姬的 webhook 功能 实现。

@tio-plato
Copy link
Author

确实是可以通过webhook实现,但是这样还还要单独再跑一个webhook触发脚本的容器,感觉有点浪费资源了。BililiveRecorder内实现的话会方便得多。

@Genteure
Copy link
Member

Genteure commented Sep 8, 2023

如果加了这个功能,webhook 开始写入文件和关闭文件的时候的文件路径应该写移动前的还是移动后的呢?

@tio-plato
Copy link
Author

开始写入文件肯定是移动前的,关闭文件我认为可以是移动后的,但应当阻塞到文件移动完成后再发送,因为移动完成后才是真正“关闭”文件,不再对文件进行操作。或者单独设计一个文件移动完成的webhook触发器

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Core enhancement New feature or request
Development

No branches or pull requests

2 participants