This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 hours ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
MP4 容器不支持 SubRip 字幕,仅支持特殊的
mov_text
格式。选项 1:将字幕转换为
mov_text
选项 2:使用 MKV 容器
iPod 不支持此功能,但在 iPod touch 上,您可以安装第三方软件来播放 MKV 文件。
选项 3:将字幕刻录到视频中
可能需要执行其他步骤才能工作,特别是如果您使用的是 Windows。有关详细信息,请参阅 https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo。
The MP4 container does not support SubRip subtitles, only a special
mov_text
format.Option 1: Convert subtitles to
mov_text
Option 2: Use an MKV container
iPod will not support this, however on iPod touch you can install third party software to play MKV files.
Option 3: Burn in the subtitles to the video
May require additional steps to work, especially if you're on Windows. See https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo for more information.
这是在 Windows 环境中使用 FFmpeg 将 srt 文件添加到视频的命令
Here is the command to Add srt file to video using FFmpeg in Windows Environment
似乎正在尝试添加两个字幕轨道,其中之一没有编解码器。最新版本的 ffmpeg 不使用
-newsubtitle
,因此这可能是您的问题。尝试去掉
-newsubtitle
。It appears that two subtitle tracks are trying to be added, one of which has no codec. More recent versions of ffmpeg do not use
-newsubtitle
, so that might be your problem.Try leaving off
-newsubtitle
.首先在你的 Linux 中安装“libass”库。之后使用以下命令配置 ffmpeg
然后将 srt 复制到 ffmpeg 目录中然后使用这些命令
very first install 'libass' library in your linux. after that configure ffmpeg with the command
after that copy your srt in the ffmpeg directory then use these command
批处理文件。
只需同时放入 2 个文件 - .mp4 和 .srt 即可获得带有嵌入字幕的 .mkv 视频。
如果您想要原始/低视频质量,只需注释/取消注释代码中的相应行即可。
除此之外,我还对 msgBox 进行了异步调用。谁需要它 - 将其复制到您的来源。
由于某种原因,它不接受文件名中的括号 ()。我没有检查其余的字符。
Batch file.
Just drop 2 files on it at the same time - .mp4 and .srt to get a .mkv video with embedded subtitles.
If you want the original/low video quality, just comment/uncomment the appropriate line in the code.
Among all other things, I made an asynchronous call of msgBox. Who needs it - copy it to your sources.
For some reason, it doesn't accept parentheses () in file names. I did not check the rest of the characters.
更好的
Better