修复在gui界面选中多个分辨率不同的视频的时候字幕位置偏差甚至报错的问题 #393
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bug描述:当我在图形化界面用ctrl选中多个视频的时候,发现处理的时候会弹框报错wrong "be" command line value
bug查找:直接导致这个bug的代码是main.py的第449行
其中cmd中输入的值我打印了一下,如下
可以看到导致bug的原因是-be输入的值是负数,然后经过一番查找
计算be的时候使用的方法是
frame_height是当前正在处理的视频的分辨率
而sub_area是通过main.py中的
算出来的,但是ymin和ymax和xmin和xmax都是可视化界面的视频的分辨率,而不是当前正在处理的视频的分辨率
bug解决:在传进去开启每个视频的时候,额外根据当前的视频做一次换算,算出正确的比率