subtitle

Play video with subtitles in JavaFX 2

99封情书 提交于 2020-01-21 09:13:42
问题 I notice that JavaFX 1 has a SubtitleTrack class for extracting subtitles from video files, but I can't find equivalent functionality in JavaFX 2 (a similarly named class in javafx.scene.media doesn't appear to exist. Is this functionality implemented at all in which case where has it moved to? Or is it planned for a future release? 回答1: I don't think video subtitle support was implemented for JavaFX 2.2. I think the Public API changes to media Tracks feature implements the functionality you

Play video with subtitles in JavaFX 2

喜欢而已 提交于 2020-01-21 09:13:26
问题 I notice that JavaFX 1 has a SubtitleTrack class for extracting subtitles from video files, but I can't find equivalent functionality in JavaFX 2 (a similarly named class in javafx.scene.media doesn't appear to exist. Is this functionality implemented at all in which case where has it moved to? Or is it planned for a future release? 回答1: I don't think video subtitle support was implemented for JavaFX 2.2. I think the Public API changes to media Tracks feature implements the functionality you

用Python抓取小破站视频字幕

半腔热情 提交于 2020-01-04 23:32:53
因为某大户要得到某个B站视频的 「 字幕 」,自己手动记录字幕实在过于繁琐,每几秒都会有字幕不断地更新,一个1小时的视频字幕的收集便是一个浩大的工程~ 因此我再次召唤我的好帮手 网络爬虫 ,来帮我采集字幕并且以 srt 文件的格式保存。这个 srt 的全称是SubRip Text,这是一种非常流行的文本字幕,包含一行时间,一行字幕,制作规范非常简单。 如上图所示,这个字幕是CC字幕,CC是Closed Caption的简称,所谓CC字幕,就是隐藏式字幕。 CC 是把文字加入NTSC电视信号的一种标准化编码方法。 电视机的内置解码器或独立解码器能显示文字。 Caption 和我们常见的一般字幕(subtitle)的用法是有区别的,它是在无音状态下通过进行一些解释性的语言来描述当前画面中所发生的事情的字幕,例如画面中出现了背景的声音的时候,Caption都会通过字幕进行提示。 这个CC字幕我们可以再视频中拖放至任意位置,十分便捷,经过观察发现,该字幕显式地放在一个json之中,而这个json又可以通过Network找到。 上图中的 subtitle_url 便给出了字幕json的链接,而访问该链接可以得到该视频的所有字幕信息。其中对我生成srt文件最为重要的数据便是 from、to以及content,这些单词对应的数据分别代表某一条字幕的出现时间,消失时间以及字幕的内容。

Convert .avi to .gif with ffmpeg with good quality AND subtitles

╄→尐↘猪︶ㄣ 提交于 2020-01-02 12:16:22
问题 I want to use ffmpeg to convert .avi to .gif with good quality and subtitles. Now, I use this script to convert from .avi to .gif with good quality : ffmpeg -v warning -ss 10:00 -t 5 -i input.avi -vf "fps=15,scale=420:-1:flags=lanczos,palettegen" -y palette.png ffmpeg -v warning -ss 10:00 -t 5 -i input.avi -i palette.png -lavfi "fps=15,scale=420:-1:flags=lanczos [x]; [x][1:v] paletteuse" -y output.gif I generate a palette and then using it to output the gif. Then I am using this script to add

Is it possible to extract SubRip (SRT) subtitles from an MP4 video with ffmpeg?

拥有回忆 提交于 2020-01-02 01:07:53
问题 I have checked the FFMpeg documentation and many forums and figured out the correct command-line to extract subtitles from an .MP4 video should look like so: ffmpeg -i video.mp4 -vn -an -codec:s:0 srt out.srt However, I get the following error, which lends me to question whether this is feasible at all: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Using ffmpeg -codecs , I can confirm that ffmpeg should be able to

Subtitles for AVPlayer/MPMoviePlayerController

三世轮回 提交于 2019-12-29 02:52:47
问题 I am using m3u8 video format for streaming the video and now I need to display subtitles for the same. I searched in Apple Documentation and found that I can achieve this by using the closedCaptionDisplayEnabled property of AVPlayer . I am interested to know what should be the format of subtitles? Will the .srt format do? Also can I achieve the same using MPMoviePlayerController ? Any help is appreciated. 回答1: Update 10/30/2018: It's worth checking this answer by an Apple engineer (Thanks to

ffmpeg所有的解码器(decoders)

老子叫甜甜 提交于 2019-12-25 07:36:53
FFMPEG解码器 Decoders : V . . . . . = Video ( 视频流) A . . . . . = Audio(音频流) S . . . . . = Subtitle(字幕流) . F . . . . = Frame - level multithreading . . S . . . = Slice - level multithreading . . . X . . = Codec is experimental . . . . B . = Supports draw_horiz_band . . . . . D = Supports direct rendering method 1 -- -- -- V . . . . D 012 v Uncompressed 4 : 2 : 2 10 - bit V . . . . D 4 xm 4 X Movie V . . . . D 8 bps QuickTime 8 BPS video V . . . . D aasc Autodesk RLE VF . . . D aic Apple Intermediate Codec V . . . . D alias_pix Alias / Wavefront PIX image V . . . . D amv AMV Video V . . . . D anm

How to add subtitles from a SRT file on a video and play it with Gstreamer in a c program

拈花ヽ惹草 提交于 2019-12-21 19:57:46
问题 I want to play a video with a C program using Gstreamer and adding subtitles from a SRT file. I'm new to gstreamer and I somehow figured out who to make it work in command-line : gst-launch filesrc location=video.srt ! subparse ! \ overlay. filesrc location=video.ogv ! oggdemux name=demux \ demux. ! queue ! vorbisdec ! audioconvert ! autoaudiosink \ demux. ! queue ! theoradec ! ffmpegcolorspace ! subtitleoverlay name=overlay ! autovideosink; The problem is that I can play the video from a C

ios Title and Subtitle in Navigation Bar centered

孤街醉人 提交于 2019-12-21 05:01:07
问题 I'm trying to have two UILabels in my navigation bar instead of just one. I followed this link to have informations on how to do that: iPhone Title and Subtitle in Navigation Bar It works well, but I can't get my texts to be centered properly. It is centered between the buttons, but the default title behaviour is to center itself right under the time. I had a look here, same question, but no answer: UINavigationBar TitleView with subtitle What am I missing? Here is my code: CGRect

Android Native Video player with subtitles

人走茶凉 提交于 2019-12-20 14:41:48
问题 I'm currently developing a video player for android. I've created a simple textview that shows the current subtitle. The problem is: MediaPlayer getCurrentPosition() method only gives me time in seconds. And I need that value in milliseconds to correctly synchronize the subtitle with the movie. The getCurrentPosition is supposed to give me the time in milliseconds, but it gives the time in seconds*1000 (every number ends with "000"). Do you know a better way of doing this? How do I get the