How to show subtitles outside of Youtube player? - youtube

I have SRT file for embeded youtube video on my website and I want to have a table under player container with 2 columns: one for English subtitles and second is for translated subtitles.
I need to hightlight subtitles in both columns, but for this I need to catch event when new subtitle starts.
Is there a way to feed youtube player with SRT file and then catch events every time player starts new subtitle ?

Related

How to get subtitle for embeded youtube video

I want to get the automated subtitles from a video at youtube for embeding into a website.
I have tried with:
hl=de&cc_lang_pref=de&cc=1&cc_load_policy=1
But no subtitle shown ...
How can i show subtitles now (in 2022)?

Time Skipping in VLC media player

I want something in VLC media player like subtitles file we add if we want to use it. But instead of subtitles i want to add time.
jump from-jump to
Example
2:00-3:00
5:00-7:80
Etc
If we add into video just like subtitles VLC media player jump from those times.
I really need this for children while watching movies. I can put time of some adult scenes to skip them.
I really appreciate for your help.

Is there a way to show custom subtitles track name in AVPlayerViewController

AVPlayerViewController can perform a lot of work like switching audio/subtitles tracks, draw progress bar, retrieving thumbnails etc. On tvOS it automatically display builtin tracks in top bar and accept event from remote control.
It recognize WebVTT subtitles and can display user selected track. But it doesn't work with SMPT-ETT/TTML subtitles. There is a way to manually decode and display subtitles of these formats. But is there a way to add a button with track language to a "Subtitles" chapter?
If you create a new AVMediaSelectionOption of type AVMediaCharacteristicLegible and add it to AVAsset's mediaSelectionGroup(AVMediaSelectionGroup) and provide that asset to the AVPlayer it should show up in that list above the player.

How do I change the YouTube player on my web site

How do I change the YouTube player on my web site. Like http://vidsshare.com/
Use the IFrame API for the embed video. The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript.
Using the API's JavaScript functions, you can queue videos for playback; play, pause, or stop those videos; adjust the player volume; or retrieve information about the video being played. You can also add event listeners that will execute in response to certain player events, such as a player state change or a video playback quality change
Just check the link above to know more about it.
For more information, check this YouTube Player Demo. This demo demonstrates the YouTube Player API's functions. Embedded players must have a viewport that is at least 200px by 200px. If the player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size.

Creating video from scratch in iOS

I've got an app where the user shoots some video, enters a title for it, and picks a music track. I've got the music dubbing working with AVMutableComposition, but the titling is a bad hack -- just a view overlaid on the MPMoviePlayerViewController. And while the user can upload the dubbed video to YouTube, the title of course isn't included.
Are there iOS APIs that will let me access or create raw video frames, so I can either overlay the title on the video, or splice in new frames with the title before the start of the video proper?
For anyone coming along later: see, e.g., How do I export UIImage array as a movie?

Resources