ffmpeg提取视频字幕

2020年08月11日

在对一些视频进行编辑的时候,例如mkv格式的视频,我们有时候需要提取它内置的字幕,可以用下面的这个方法,先将字幕提取出来,然后保存为srt或ass文件。

提取字幕流
1)原始文本输出
ffmpeg -i test.mkv -an -vn -bsf:s mov2textsub -scodec copy -f rawvideo sub.txt
ffmpeg -i test.mkv -an -vn -c:s copy -f rawvideo -map 0:s sub2.txt
ffmpeg -i test.mkv -map 0:s:0 sub1.srt
2)ass格式输出
ffmpeg -i test.mkv -an -vn -scodec copy sub3.ass

 


sicnature ---------------------------------------------------------------------
Your current IP address is: 54.167.52.238
Your IP address location: 美国弗吉尼亚阿什本
Your IP address country and region: 美国 美国
Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source http://www.myzhenai.com.cn/post/3546.html

没有评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注