How to insert background and top image in screen - Video API - opentok

I'm using Video API to live streaming events, but I found a problem and didn't find the answer in documentation.
For custom layouts: https://tokbox.com/developer/guides/broadcast/live-streaming/#custom-layouts
How can I insert background image and top images? Like this one: https://d.pr/free/i/DkIplo
Thanks!

Related

How to get image frames from video in Flutter in Windows?

In my flutter desktop application I am playing video using dart_vlc package. I want to take image frames (like screenshot) from video file of different video positions. At first I tried with screenshot package where I found two problems.
It takes screenshot of the NativeVideo (A widget for showing video) widget only, but not includes the image frame inside the widget.
And video control buttons (play, pause, volume) comes up in the screenshot which I don't want.
There's some other packages for exporting image frames from video such as export_video_frame or video_thumbnail but both of them are not supported in Windows. I want to do the same thing they do in Windows.
So how to get image frames from a video file playing in a video player in Windows?
dart_vlc package itself provides a function to take snapshots from a video file currently paying in the video player. The general structure is
videoPlayer.takeSnapshot(file, width, height)
Eaxmple:
videoPlayer.takeSnapshot(File('C:/snapshots/snapshot1.png'), 600, 400)
This function call captures the video player's current position as an image and saves it in the mentioned file.

Dynamically change overlay images to a streaming video using ffmpeg

I am stuck in a situation where I need to dynamically change overlays for a streaming video. I am able to change overlay images specifying a time but I dont know on hand when I need to change the overlay image.
I need to keep changing the image overlay dynamically when a overlay image is created without interrupting the streaming. How can this be achieved.
Any suggestion.

How can I overlay an image onto a video

How can I overlay an image onto a video without changing the video file?
I have many videos and I want to be able to open them and overlay a ruler onto them and then measure the distance an individual moved visually. All I want is to play a video and then to open up an image with some transparency and position the image over the video. This way i would be able to look at the video and see how far the individual moved.
I would like to do this without having to embed the image like a watermark, because that is computationally expensive. I would need to copy the video, embed it with the ruler and then watch the video, then delete that video file. This seems unnecessary. I would like to just watch the video and have a transparent image over it while I a watching.
Is there a program that does this all together?
Alternatively, is there a program which I can use to open an image and make it transparent and then move it over the video that is playing?
Note: I am using Windows.
It sounds form your requirements that simply overlaying a separate image layer over the video will meet your needs.
Implementing this approach will depend on the video player client you are using, but you could implement an HTML5 based solution and play the videos locally with this (or even from a URL on the web if you have them there).
There is a nice answer with a working fiddle which shows how to do this with HTML5 here: https://stackoverflow.com/a/31175193/334402
One thing to note - you have not mentioned scale in your question. If you need to measure how far the person has moved in real distance, rather than in just cm's across the video screen, then you will need to somehow work out the scale of the video. This makes things considerably harder as the video may zoom in and out during the sequence you want to measure, so you would need some reference to calculate the scale for each frame. One approach would be to use the individual as a reference, assuming they are in all the frames you are interested in.
What about using good old VLC for that?
Open VLC go to Tools→Effects and Filters→Video Effects→Overlay and select Add logo checkbox:
Then, add your transparent overlay image and play any video with VLC. The output looks like this:

Url of large image of a YouTube video

I'm interested in getting a preview image of a youtube video for my application
I'm using the url to the previews:
http://img.youtube.com/vi/EqWRZrupLrI/0.jpg
but this has little two black rows, up and down, and I wish it were bigger.
I have read that the 0 is the bigger picture.
anyone know if it is possible to obtain a url with a better image?, for my project, I need the image is on a url
I appreciate the help
Regards :)
0.jpg is the full-size 480p thumbnail and there is no bigger thumbnail except for full HD videos (maxresdefault.jpg).
But why do you expect a bigger thumbnail for such a video ? Your video example has a resolution of 240p, the thumbnail is already much bigger than the video resolution.
Each of every image has 4 category like
https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
Also you can get more image size by this
-- For default
https://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
-- For high quality
https://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
-- For medium quality
https://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg
-- For max size
https://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
Please check the following SO post:
How do I get a YouTube video thumbnail from the YouTube API?
YouTube thumbnail link doesn't work in all cases
It will surely solve your problem. I recommend to query the youtube api to get the thumbnail with max resolution.

Image and video fullscreen?

)
I have a application to show some videos and images.. like a presentation.. The images have different resolution's and the videos to. I want to put the images and the videos in full screen mode but without lose quality.. The rotation of screen is fine, but the media content does not appear like they should..
Basically i want to show the images centered in vertical and horizontal without lose quality..
Suggestions?
For the video I would recommend using a MediaElement with the Stretch attribute set to 'Uniform'. 'Uniform' takes up all the space that you give the control but it ensures that the video maintains its aspect ratio. You should still have all the qaulity possible because the stretching happens on the GPU and it does a great job. You can see an example here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.aspx
Now, if you want the video to only scale up to it's orignial size but not get blown up any larger, then just set the Stretch property to 'None'.
The Image control works the same way and also has the same Stretch property. See the Image class documentation and sample here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.image(v=VS.95).aspx
Did you try the MediaElement API and the NaturalVideoHeight and NaturalVideoWidth properties?

Resources