忽略错误“解码的字幕文本中的 UTF-8 无效;”是否安全?可能缺少 -sub_charenc 选项“解码流时出错”?

发布于 2025-01-19 14:41:32 字数 434 浏览 3 评论 0原文

我正在编码一个带有字幕的视频,然后遇到了错误,“在解码字幕文本中无效的UTF -8;也许丢失-sub_charenc选项。解码流时错误”,但无论如何,视频还是编码了。忽略此错误的后果是什么? Google搜索显示了一个人说它跳过sub的结果,因此由此产生的视频将缺少潜艇。有人可以确认吗?

我知道如何修复它,但是我已经用字幕转换了50多个视频,而且我可以肯定的是,其中一些人有这个错误。我只想让某人告诉我可以忽略,所以我不必看200个小时的视频。

解决字幕错误的解决方案:

创建一个批处理文件并使用以下内容进行编辑:

for %%a in ("*.srt") do ffmpeg -v 9 -loglevel 99 -sub_charenc CP1252 -i "%%a" "newfiles\%%~na.srt"
pause

I was encoding a video with subtitles and I got the error, "Invalid UTF-8 in decoded subtitles text; maybe missing -sub_charenc option. Error while decoding stream" but the video encoded anyway. What are the consequences of ignoring this error? A google search showed a result of one guy saying it skips that sub so the resulting video will have missing subs. Can someone confirm this?

I know how to fix it but I have already converted 50+ videos with subtitles and I'm fairly certain that a few of them had this error. I just want someone to tell me that it's okay to ignore so I don't have to watch 200 hours of videos.

Solution for fixing subtitle errors:

Create a batch file and edit with the following:

for %%a in ("*.srt") do ffmpeg -v 9 -loglevel 99 -sub_charenc CP1252 -i "%%a" "newfiles\%%~na.srt"
pause

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

俏︾媚 2025-01-26 14:41:32

恐怕您可能会有带有字幕线条的视频。但是,为了减轻您的痛苦,您可以尝试仅“转编码” subs:

ffmpeg -i input.srt -c:s ass -f null -

这将很快运行。运行所有已经处理过的SRT文件,并查找哪些文件会产生文本编码错误。然后重新将具有正确设置的错误的错误重新传输。

I'm afraid you are likely having videos with missing subtitle lines. But, to relieve your pain, you can try to "transcode" only the subs:

ffmpeg -i input.srt -c:s ass -f null -

This will run really fast. Run all the already-processed srt files, and look for which files produces the text encoding error. Then re-transcode those with the errors with the right setting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文