gpt4 book ai didi

amazon-web-services - ffmpeg硬编码字幕,无字幕但无输出错误

转载 作者:行者123 更新时间:2023-12-04 23:33:22 24 4
gpt4 key购买 nike

我正在尝试使用外部 SRT 字幕文件对 mp4 文件的字幕进行硬编码。
尽管获得了成功的输出结果:

video:3923kB audio:975kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.344595%
[libx264 @ 0x63b08c0] frame I:9 Avg QP:15.65 size: 31298
[libx264 @ 0x63b08c0] frame P:609 Avg QP:20.37 size: 4283
[libx264 @ 0x63b08c0] frame B:1242 Avg QP:23.74 size: 907
[libx264 @ 0x63b08c0] consecutive B-frames: 3.3% 15.4% 23.1% 58.3%
[libx264 @ 0x63b08c0] mb I I16..4: 21.5% 54.0% 24.5%
[libx264 @ 0x63b08c0] mb P I16..4: 1.2% 2.7% 0.3% P16..4: 18.7% 4.2% 1.6% 0.0% 0.0% skip:71.4%
[libx264 @ 0x63b08c0] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 13.9% 0.6% 0.0% direct: 0.1% skip:85.2% L0:41.5% L1:56.8% BI: 1.7%
[libx264 @ 0x63b08c0] 8x8 transform intra:62.4% inter:86.2%
[libx264 @ 0x63b08c0] coded y,uvDC,uvAC intra: 36.7% 53.0% 15.0% inter: 2.2% 3.1% 0.1%
[libx264 @ 0x63b08c0] i16 v,h,dc,p: 42% 20% 13% 25%
[libx264 @ 0x63b08c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 15% 28% 3% 4% 6% 4% 5% 3%
[libx264 @ 0x63b08c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 23% 14% 4% 6% 7% 5% 4% 2%
[libx264 @ 0x63b08c0] i8c dc,h,v,p: 51% 17% 26% 6%
[libx264 @ 0x63b08c0] Weighted P-Frames: Y:0.2% UV:0.2%
[libx264 @ 0x63b08c0] ref P L0: 69.1% 9.6% 15.1% 6.1%
[libx264 @ 0x63b08c0] ref B L0: 87.2% 10.7% 2.1%
[libx264 @ 0x63b08c0] ref B L1: 97.9% 2.1%
[libx264 @ 0x63b08c0] kb/s:517.69
[aac @ 0x63b3600] Qavg: 257.742
但是,一旦我用任何播放器播放视频,字幕就不存在了。
这是我用于任务的命令
ffmpeg -i https://some-bucket.s3.region.amazonaws.com/my-video.mp4 -f mp4 -vf subtitles=sub.srt subtitled-video.mp4

最佳答案

此代码用于添加字幕,然后您必须选择选项字幕(如流#0:2(und):字幕:mov_text)

ffmpeg -i input.mp4 -i sub.srt -map 0 -map 1 -c copy -c:s mov_text  subtitled-video.mp4
这个选项为同一个视频添加字幕,并且将永远有字幕,但首先你必须在 .ass (手动图形编辑)中更改 .srt (文本字幕),你知道,文本到图形:
ffmpeg -i sub.srt sub.ass
然后您可以创建带有内部字幕的视频
ffmpeg -i input.mp4 -vf "ass=sub.ass" out.mp4
堆栈问候

关于amazon-web-services - ffmpeg硬编码字幕,无字幕但无输出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68073559/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com