auto-bilibili-recorder icon indicating copy to clipboard operation
auto-bilibili-recorder copied to clipboard

使用 `mp4` 文件显著提升压制速度

Open lengyanyu258 opened this issue 1 year ago • 3 comments

https://github.com/valkjsaaa/auto-bilibili-recorder/blob/108312a20cce6dac06ecd09cb403dd27dd5a3f22/session.py#L268-L270

好像使用整理后(-c copy)的单个 mp4 文件能显著提升压制速度(FFmpeg 能跑满显卡):

input_video = (
    f" -i \"{self.output_paths()['early_video']}\""
    if os.path.exists(self.output_paths()["early_video"])
    else f"-f concat -safe 0 -i \"{self.output_paths()['concat_file']}\""
)

不知道这里是否需要改成 .mp4(没试过):

https://github.com/valkjsaaa/auto-bilibili-recorder/blob/108312a20cce6dac06ecd09cb403dd27dd5a3f22/session.py#L134


可能也与这个有关:

https://github.com/valkjsaaa/auto-bilibili-recorder/blob/108312a20cce6dac06ecd09cb403dd27dd5a3f22/session.py#L292

-b:a 320K -ar 44100 改为 -c:a copy

lengyanyu258 avatar Oct 19 '23 13:10 lengyanyu258

也许只是错觉。

lengyanyu258 avatar Oct 19 '23 14:10 lengyanyu258

有人试试吗😏(貌似有作用🤔)

lengyanyu258 avatar Oct 22 '23 15:10 lengyanyu258

音频我特意设置的一个固定编码率,是因为有的时候主播中间切换了音频编码。理论上来讲视频压缩应该工作量远远大于音频。你自己使用的时候有明显区别吗?

valkjsaaa avatar Jan 16 '24 02:01 valkjsaaa