Embedding subtitles to a video file in iOS - ios

I'm relatively new to iOS development and there is something I'm trying to achieve but I'm out of luck finding good resources. I would like to embed subtitles to a video file for a project. The user records a video, after recording he inputs some sentences, and the text he input gets embedded into the video as a subtitle, one word at a time. I think this is achieved through AVFoundation but to my surprise there is relatively little information on AVFoundation except Apple's documentation (which is not of much use when you want to embed subtitles.)
How might one go about doing this? How do I need to format the text input so that it becomes a subtitle track? How do I embed that subtitle track to the video file and export it so that the video always has the subtitles on it? I hope someone here knows about these things..
Thanks in advance.

If you are looking to create a QuickTime video with embedded subtitles (AKA soft subtitles) in it, see avsubtitleswriterOSX sample code from WWDC 2013.
If you prefer to burn subtitles into a video, you can use AVVideoCompositionCoreAnimationTool, as described in this tutorial

Related

Attaching youtube video player into textview

I've been struggling to find a library in which it support my need, and that is to embed a yt video player into a text view. So, what I'm basically trying to do is to create something similar to Reddit in which it have a yt vide inside the thread details.
Currently, i am using NSAttributedString to store the yt thumbnail image and add it into the textView, and in order to play the video, it'll navigate to another view that loads the yt video. It's an okay solution but not the solution that I want
Therefore, are there any solution on how to overcome this problem? Thank you
What i want. :
ps: the image is currently using image attachment aka NSAttributedString, not an UIview with youtube player

How to implement iMovie Trimming View?

I need to merge multiple videos before that I want to trim Videos and place Text overlay over Videos. I want to create simply another iMovie app with all functionality. Could you please suggest any library is available in GitHub or please share your ideas on this, I will be grateful for you

How to remove video controls from YouTube videos?

I'm trying to create an app and have embedded YouTube videos, but I need to remove the on-screen controls from the player (play/back/forward/volume, etc.). Does anyone have any suggestions on how to do this? Is it possible to have my own custom buttons instead (for example, "forward 60 seconds") I've looked at MPMoviePlayerController but research has me under the impression this is not what is called when UIWebView fires up a YouTube video.
I've also looked at the YouTube API but can't seem to find any good tutorials or examples on how to actually use it for iOS development.
Can someone point me in the right direction? I've been trying to figure this out for a couple of days and I just seem to be spinning my wheels.
Any help would be greatly appreciated!
you have multiple options
1. use youtube data api. you can edit the video controls if you use it.
2. you can use 3 rd party frame work youtubekit visit https://github.com/rinov/YoutubeKit
if you want to watch a tutorial got to youtube there is a channel called "codewithchris". here is the link https://www.youtube.com/playlist?list=PLMRqhzcHGw1aLoz4pM_Mg2TewmJcMg9ua
UIWebView is very limited. You cannot put video controls there. Because what UIWebView do is just shows another website as a frame. If there must be some controls, that controls should be in the website. So you cannot add any further controls.
If you want to use control buttons for your videos, instead of youtube, put the video in webpage with control buttons as like. Then put it in UIWebView. Or you can use the media player.

iOS create video from array of images

I have an array of images that I am passing to this class:
https://github.com/jberlana/iOSKenBurns
This basically takes all of the images and builds a slideshow from them and then adds an automatic and random ken burns effect.
Everything works awesome; however, I am now trying to add the ability to export the slide show to a movie file. There will be just a simple button to accomplish this, but I have no idea where to start for turning this into a video.
I have found this: QTMovie Class Reference which is EXACTLY what I'm looking for (compile array of images into a movie file), but I need to retain the ken burns effect the class has added, and I don't know if this applied to iOS either.
Not really sure if this is even possible, or what to do with it. Any help would be great, at least a point in the right direction! Thanks in advance!
The QTMovie class does not function under iOS. You can take a look at an example Xcode project I created to show off this sort of movie composition logic in my library, the Xcode project is at AVRender. This example creates a lossless output file that basically contains all the images as frames of video. If you want to actually convert that to h.264 when finished, there is another example on that same page named AVDecodeEncode that shows how to do that and play the results with AVPlayer. You could also roll your own code to do all this using the AVAssets API under iOS, but be warned that those APIs are not simple to use.

is it possible to play an interactive swf file inside an xna 4.0 windows project

Hi Ive been trying to find an answer to this question, but all i can find are people talking about converting the swf file to play on an x-box. I dont want to convert it i just want ot play it, I'm trying to make a full flash menu that can be played when the xna game is paused. the menu does not have any control over any xna parameters.
Thanks..VilkaS
You might want to take a look at Robin Debreuil's blog. He shows how to use Swf files in XNA.

Resources