Skip to content

高级设置 videotrans/set.ini

请勿随意调整,除非你知道将会发生什么



;####################
;#######################
;如果你不确定修改后将会带来什么影响,请勿随意修改,修改前请做好备份, 如果出问题请恢复
;If you are not sure of the impact of the modification, please do not modify it, please make a backup before modification, and restore it if something goes wrong.
;升级前请做好备份,升级后按照原备份重新修改。请勿直接用备份文件覆盖,因为新版本可能有新增配置
;Please make a backup before upgrading, and re-modify according to the original backup after upgrading. Please don't overwrite the backup file directly, because the new version may have added

;界面语言文字#############################
;The default interface follows the system and can also be specified manually here, zh=Chinese interface, en=English interface.
;默认界面跟随系统,也可以在此手动指定,zh=中文界面,en=英文界面
lang =

;视频质量############################
;Video processing quality, integer 0-51, 0 = lossless processing with large size is very slow, 51 = lowest quality with smallest size is the fastest processing speed
;视频处理质量,0-51的整数,0=无损处理尺寸较大速度很慢,51=质量最低尺寸最小处理速度最快
crf=13

;模型名字列表#################################
;chatGPT model list
;可供选择的chatGPT模型,以英文逗号分隔
chatgpt_model=gpt-3.5-turbo,gpt-4,gpt-4-turbo-preview,qwen,moonshot-v1-8k


;声画字幕对齐相关#################################
;音频最大加速倍数,默认1.8,即最大加速到 1.8倍速度,配音仍大于原时长,就进行视频慢速,需设置大于1-100的数字,比如1.5,代表最大加速1.5倍,注意如何设置了限制,则字幕声音将无法对齐
audio_rate=1.8
; 设为大于1的数,代表最大允许慢速多少倍,0或1代表不进行视频慢放
video_rate=100
;是否移除配音末尾空白,true=移除,false=不移除
remove_silence=true

;是否移除原始字幕时长大于配音时长 的静音,比如原时长5s,配音后3s,是否移除这2s静音,true=移除,false=不移除
remove_srt_silence=false

;移除2条字幕间的静音长度ms,比如100ms,即如果两条字幕间的间隔大于100ms时,将移除100ms
remove_white_ms=0


; 语句分割相关##################################
; For pre-split and overall , the minimum silence segment ms to be used as the basis for cutting, default 100ms, i.e., and max seconds.
;用于 预先分割 和 整体识别 时,作为切割依据的最小静音片段ms,默认200ms 以及最大句子时长
overall_silence=200
overall_maxsecs=3

; For  equal-division, the minimum silence segment ms to be used as the basis for cutting, default 500ms, i.e., only silence greater than or equal to 500ms will be segmented.
;用于   均等分割时,作为切割依据的最小静音片段ms,默认500ms,即只有大于等于500ms的静音处才分割
voice_silence=500

;Seconds per slice for equal-division, default 10s, i.e. each subtitle is approximately 10s long.
;用于均等分割时的每个切片时长 秒,默认 10s,即每个字幕时长大约都是10s
interval_split=10


;翻译配音速度#############################
;Number of simultaneous translations, 1-20, not too large, otherwise it may trigger the translation api frequency limitation
;同时翻译的数量,1-20,不要太大,否则可能触发翻译api频率限制
trans_thread=10

;Number of translation error retries
;翻译出错重试次数
retries=5

;The number of simultaneous voiceovers, 1-10, it is recommended not to be greater than 5, otherwise it is easy to fail
;同时配音的数量,1-10,建议不要大于5,否则容易失败
dubbing_thread=3


;The number of seconds to pause before subtitle recognition is completed and waiting for translation, and the number of seconds to pause after translation and waiting for dubbing.
;字幕识别完成等待翻译前的暂停秒数,和翻译完等待配音的暂停秒数
countdown_sec=15


;背景声音########################################
;背景声音音量降低或升高幅度,大于1升高,小于1降低
backaudio_volume=0.5

;When separating the background sound, cut the clip, too long audio will exhaust the memory, so cut it and separate it, unit s, default 1800s, i.e. half an hour.
;背景音分离时切分片段,太长的音频会耗尽显存,因此切分后分离,单位s,默认 600s
separate_sec=600




;GPU FFmpeg 相关#####################################
;Accelerator cuvid or cuda
;硬件编码设备,cuvid或cuda
hwaccel=cuvid

; Accelerator output format = cuda or nv12
;硬件输出格式,nv12或cuda
hwaccel_output_format=nv12

;not decode video before use -c:v h264_cuvid,false=use -c:v h264_cuvid, true=dont use
;Whether to disable hardware decoding, true=disable, good compatibility; false=enable, there may be compatibility errors on some hardware.
;是否禁用硬件解码,true=禁用,兼容性好;false=启用,可能某些硬件上有兼容错误
no_decode=true



; 字幕识别-GPU提高降低性能相关############################################
;cuda data type when recognizing subtitles from video, int8 = consumes fewer resources, faster, lower precision, float32 = consumes more resources, slower, higher precision, int8_float16 = device of choice
;从视频中识别字幕时的cuda数据类型,int8=消耗资源少,速度快,精度低,float32=消耗资源多,速度慢,精度高,int8_float16=设备自选
cuda_com_type=float32

;中文语言的视频时,用于识别的提示词,可解决简体识别为繁体问题。但注意,有可能直接会将提示词作为识别结果返回
initial_prompt_zh=

; whisper thread 0 is equal cpu core, 
;字幕识别时,cpu进程
whisper_threads=4

;whisper num_worker
;字幕识别时,同时工作进程
whisper_worker=1

;Subtitle recognition accuracy adjustment, 1-5, 1 = consume the lowest resources, 5 = consume the most, if the video memory is sufficient, can be set to 5, may achieve more accurate recognition results
;字幕识别时精度调整,1-5,1=消耗资源最低,5=消耗最多,如果显存充足,可以设为5,可能会取得更精确的识别结果
beam_size=5
best_of=5

;Enable custom mute segmentation when in subtitle overall recognition mode, true=enable, can be set to false to disable when video memory is insufficient.
;字幕整体识别模式时启用自定义静音分割片段,true=启用,显存不足时,可以设为false禁用
vad=true

;0 = less GPU resources but slightly worse results, 1 = more GPU resources and better results
;0=占用更少GPU资源但效果略差,1=占用更多GPU资源同时效果更好
temperature=1

;Same as temperature, true=better with more GPUs, false=slightly worse with fewer GPUs.
;同 temperature, true=占用更多GPU效果更好,false=占用更少GPU效果略差
condition_on_previous_text=false






; 字幕设置相关######################################
;Hard subtitles can be set here when the subtitle font size, fill in the integer numbers, such as 12, on behalf of the font size of 12px, 20 on behalf of the size of 20px, 0 is equal to the default size
;硬字幕时可在这里设置字幕字体大小,填写整数数字,比如12,代表字体12px大小,20代表20px大小,0等于默认大小
fontsize=14

;CJK subtitle number of characters in a line length, more than this will be line feed.
;中日韩字幕一行长度字符个数,多于这个将换行
cjk_len=30

;Other language line breaks, more than this number of characters will be a line break.
;其他语言换行长度,多于这个字符数量将换行
other_len=60

github.com/jianchang512