您好,欢迎来到榕意旅游网。
搜索
您的当前位置:首页How to burn in DVB subtitles

How to burn in DVB subtitles

来源:榕意旅游网

 

 

 

Btw, by "How can I burn in this subtitles to the out file.", do you mean:
1) Produce the output video that has the subtitles drawn/merged/encoded together with the video (burn-in)
2) Produce the output video stream + subtitle stream (2 streams), so that media player can decide whether or not to display the subtitles
Also, 3) do you intend to edit/correct spelling in the subtitles or you just want to copy/paste it?

If 1) then you would probably end up using something like this:

Code:
ffmpeg -i video.mpg -vf subtitles=subs.srt output.mpg


That will burn the subtitles into the video, so you won't be able to extract those later from that output file (encoded in the video images frames)

If you want 2) then you should use something like this:

Code:
ffmpeg -i video.mpg -i subs.srt -c copy -map 0 -map 1 output.mpg


That will take two inputs (0=video.mpg and 1=subs.srt) and copy them to the output (-c copy). Options "-map 0 -map 1" just tell ffmpeg to use both inputs to create the output.

The 3) is important to know because the subtitles in your source are "dvb_subtitle" which means they are bitmap images, so if you want to edit that thing, you'll probably need some tool for doing OCR or something. If you don't need to edit them, you could just copy/paste them into your new output, with a command like this:

Code:
ffmpeg -i myvideo.mpg -i "http://.../Mittagsmagazin.ts" -c copy -map 0 -map 1:7 output.mpg


That will take the first input (0) from myvideo.mpg (some of your files that you want to attach subtitles to) and it will take the second input (1) from your http url, then it will tell ffmpeg that you don't want any re-encoding, just copy/pasting stuff, and then you'll tell ffmpeg that you want a complete first input (0) and just the stream number 7 from the input number 1 (if you take a look at your log, you'll see that your subtitles are located as #0:7, which means it's the stream number 7).

Now, try doing some tests on your own, to see if you can make it work and also consult our, because it contains a lot of usage examples for ffmpeg.

 
Posts: 732
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

 


by » Sun Feb 03, 2013 11:01 pm

Thanks a lot. Now I have something to start with. Will come back with the results. 
 
Posts: 12
Joined: Fri Jan 25, 2013 2:29 pm

 


by » Tue Feb 05, 2013 11:03 am

No I found out how to do it:
Code:
-i in_file.ts -filter_complex '[0:v][0:s:1]overlay[v]' -map [v] -map 0:a -strict -2  out_file.mp4


This line works perfectly for me.

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- nryq.cn 版权所有 赣ICP备2024042798号-6

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务