subtitle

Subtitles for AVPlayer/MPMoviePlayerController

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 17:20:16
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. Update 10/30/2018: It's worth checking this answer by an Apple engineer (Thanks to @allenlini for pointing it out ). He suggests a solution involving AVAssetResourceLoaderDelegate . I haven't

iPhone Title and Subtitle in Navigation Bar

半腔热情 提交于 2019-11-28 17:10:46
问题 In my application, I'd like to have the navigation bar display a title and subtitle. To that extent, I added the following code to my view controller: // Replace titleView CGRect headerTitleSubtitleFrame = CGRectMake(0, 0, 200, 44); UIView* _headerTitleSubtitleView = [[[UILabel alloc] initWithFrame:headerTitleSubtitleFrame] autorelease]; _headerTitleSubtitleView.backgroundColor = [UIColor clearColor]; _headerTitleSubtitleView.autoresizesSubviews = YES; CGRect titleFrame = CGRectMake(0, 2, 200

displaying subtitles for a video in a WPF MediaElement

那年仲夏 提交于 2019-11-28 06:41:07
问题 I'm working on a WPF application that displays video clips as part of the workflow. I'm doing this by using MediaElement to play locally hosted (not streamed) AVI files. Works great. However, I was just handed a new requirement to allow the display of subtitles while the clip is playing. I have no idea of the best way to go about this. I'm vaguely aware that WMP has the ability to display separate subtitle files when a clip is playing, but I don't know if WPF supports this? Can I do this

Customize subtitle position - JFreeChart

雨燕双飞 提交于 2019-11-28 06:10:37
问题 I want to know if it is possible to put a JFreeChart subtitle in the bottom of the chart, under the chart, and not under the Title. What I want to do is illustrated on these images: http://i.stack.imgur.com/AmPJ8.jpg and http://i.stack.imgur.com/VBfvL.jpg. I just tried almost everything and cannot do this. I am using subtitle insted of legend, because legend is presented with a red square, indicating the color of the series shown on the graphics. Thanks in advance! Joey 回答1: In this example,

Flutter学习笔记(20)--FloatingActionButton、PopupMenuButton、SimpleDialog、AlertDialog、SnackBar

 ̄綄美尐妖づ 提交于 2019-11-28 01:56:37
如需转载,请注明出处: Flutter学习笔记(20)--FloatingActionButton、PopupMenuButton、SimpleDialog、AlertDialog、SnackBar FloatingActionButton FloatingActionButton对应一个圆形图标按钮,悬停在内容之上,以展示对应程序中的主要动作,所以非常醒目,类似于iOS系统里的小白点按钮。 FloatingActionButton组件属性及描述如下: child:child一般为icon,不推荐使用文字 tooltip:按钮提示文字 foregroundColor:前景色 backgroundColor:背景色 elevation:未点击时阴影值,默认6.0 hignlightElevation:点击时阴影值 onPressed:点击事件回调 shape:定义按钮的shape,设置shape时,默认的elevation将会失效,默认为CircleBorder import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; void main() => runApp(DemoApp()); class DemoApp extends StatelessWidget{

Use ffmpeg to add text subtitles

本小妞迷上赌 提交于 2019-11-27 16:38:38
I am trying to add text subtitles to an .mp4 container using ffmpeg: ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mp4 When I am trying to run this line, it gives me an error : Nmber of stream maps must match number of output streams. If I try to change the mp4 to mkv (although mp4 supports text subtitles), like this: ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mkv It correctly maps the streams, but gives an error : Encoder (codec id 94210) not found for output stream #0.2 When I launch ffmpeg -codecs I can see that srt codec is supported as decoder

How to give subtitles for subplot in plot_ly using R

99封情书 提交于 2019-11-27 05:45:36
问题 I am wondering how to give difference subtitles for the subplots using plot_ly. Any hint please. I got one title BB in this case. Thanks. p <- subplot( plot_ly(economics, x = date, y = uempmed)%>%layout(showlegend = FALSE, title="AA"), plot_ly(economics, x = date, y = unemploy)%>%layout(showlegend = FALSE, title="BB"), margin = 0.05 ) 回答1: The title attribute in layout refers to the title for the entire plotting surface, so there can only be one. However, we can use text annotations to create

ffmpeg: add subtitles to mp4 with out creating a new file

房东的猫 提交于 2019-11-26 22:07:37
问题 ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4 adds subtitles to mp4 video but it creates a new file instead just adding few blocks of data to existing file. Is there a way to modify existing video instead of creating a new one? subler does it great with in a second, so should ffmpeg . 回答1: FFmpeg does not do in-place editing. 来源: https://stackoverflow.com/questions/45308561/ffmpeg-add-subtitles-to-mp4-with-out-creating-a-new-file

How to add title to subplots in Matplotlib?

让人想犯罪 __ 提交于 2019-11-26 18:28:12
I have one figure which contains many subplots. fig = plt.figure(num=None, figsize=(26, 12), dpi=80, facecolor='w', edgecolor='k') fig.canvas.set_window_title('Window Title') # Returns the Axes instance ax = fig.add_subplot(311) ax2 = fig.add_subplot(312) ax3 = fig.add_subplot(313) How do I add titles to the subplots? fig.suptitle adds a title to all graphs and although ax.set_title() exists, the latter does not add any title to my subplots. Thank you for your help. Edit: Corrected typo about set_title() . Thanks Rutger Kassies ax.title.set_text('My Plot Title') seems to work too. fig = plt

How to add a ggplot2 subtitle with different size and colour?

这一生的挚爱 提交于 2019-11-26 18:24:30
I'm using ggplot2 to improve precipitation barplots. Here's a reproducible example of what I want to achieve: library(ggplot2) library(gridExtra) secu <- seq(1, 16, by=2) melt.d <- data.frame(y=secu, x=LETTERS[1:8]) m <- ggplot(melt.d, aes(x=x, y=y)) + geom_bar(fill="darkblue") + labs(x="Weather stations", y="Accumulated Rainfall [mm]") + opts(axis.text.x=theme_text(angle=-45, hjust=0, vjust=1), title=expression("Rainfall"), plot.margin = unit(c(1.5, 1, 1, 1), "cm"), plot.title = theme_text(size = 25, face = "bold", colour = "black", vjust = 5)) z <- arrangeGrob(m, sub = textGrob("Location", x