In Corona, I am trying to write a Jigsaw puzzle like game, but the pieces are part of a video, so is there a way to run a video sequence and represent clipped segments of that video in the display objects?
Any samples would be great....
Regards
If by clipped you mean create a display object that plays a snippet of the video rather than the whole thing then yes - if you mean cut out a shape from the video the size/shape of a jigsaw puzzle piece then no.
If it's the lesser take a look at the native.newVideo() API.
Related
I'm writing a game in lua and am looking for an efficient solution to determine what area a player has captured like Hexar.io
I can't post images, here's an example picture from hexar.io
https://ibb.co/iw5fdF
I managed to make a blocky grid system, with movement for the players. But I'm having trouble determining what area to capture based off the first capture point, and the end point for the drawing.
Any help is appreciated - Ryan
I want to experiment with 360° videos and I have a little idea, but I don't know how I can solve this. I want to embed a video from a streed and want to display the street-names and want to draw colored lines on the roads. When I move the view of the video (I turn 45° as example) I want that the lines and street-names go with the video and always stay on their places.
Do you have a solution approach for me?
I understand that you want a 360 video with street names? It will be easiest to just render everything on top of that video. You will need to render the AR layer as a equirectangular 360x180 video in some software like Blender and then merge it with the video you have with something like Adobe After Effects.
An alternative would be to do the AR layer in a 3d engine like Unity and put the video in the background.
It's hard to suggest you anything as what you're asking is very broad.
I am looking for a way to slice the middle part of the video and remove it , and merge the other two parts and render a new track. Is there any way in AVFoundation to perform this?
For eg:- please see the below illustration, if the full video height is from 1 to 4, I need to crop a slice from 2 to 3 and combine that [1-2] and [3-4] parts into a new video track. (Following is an illustration of ONE frame not the whole clip)
1----------------------------------
2----------------------------------
3----------------------------------
4----------------------------------
I think you should try to overlay a cropped video in the middle of your background video instead of trying to "make a whole".
Take a look at GPUImage's blend filters and then use a movie writer.
I'm working on an iPad app that records and plays videos using AVFoundation classes. I have all of the code for basic record/playback in place and now I would like to add a feature that allows the user to draw and make annotations on the video—something I believe will not be too difficult. The harder part, and something that I have not been able to find any examples of, will be to combine the drawing and annotations into the video file itself. I suspect this is part is accomplished with AVComposition but have no idea exactly how. Your help would be greatly appreciated.
Mark
I do not think that you can actually save a drawing into a video file in iOS. You could however consider using a separate view to save the drawing and synchronize the overlay onto the video using a transparent view. In other words, the user circled something at time 3 mins 42 secs in the video. Then when the video is played back you overlay the saved drawing onto the video at the 3:42 mark. It's not what you want but I think it is as close as you can get right now.
EDIT: Actually there might be a way after all. Take a look at this tutorial. I have not read the whole thing but it seems to incorporate the overlay function you need.
http://www.raywenderlich.com/30200/avfoundation-tutorial-adding-overlays-and-animations-to-videos
I have some device which streams h264 video in following format: top half of picture is even lines of video, and bottom half of picture is odd lines of video. So the question is - how can I play this video in normal visibility, using standart players, ffplay for example.
I know about "tinterlace:merge" plugin in ffmpeg, but it combines video from two pictures following one by one. So my task is make a correct video from single frame.
Regards,
Alexey.
I recently had to deal with the exact same problem.
there are many different methods and the optimum solution completely depends on your situation,
the simplest fastest method is weaving two fields together which is perfect for immobile parts but create comb effect in moving object.
more complicated methods use motion detection methods.
what I did was merging two fields then applying Edge-Line averaging (ELA) for moving segments to reduce comb effect.
check this link for a detailed explanation of the problem
It would be good if you could provide a sample video file. You describe very well what the picture looks like, but the file may contain other information that is helpful for playback.
Furthermore, the format you describe doesn't sound like a standard format, so it's unlikely you will get a regular player to play it the way you want, out-of-the-box. If you're using ffplay, it's likely that you will have to write your own plugin to re-order the scanlines prior to displaying them.
Alternatively, you could re-encode the video into a standard format (interlaced or deinterlaced) using ffmpeg. You could then play it back in any regular player, like ffplay or VLC.
Finally, I recommend asking your question on the ffmpeg mailing list.