iOS, how to play multi- videos on the same view? - ios

I want to play four videos on the same view within a small rectangular area, is that possible ?

I think you can do this with AVPlayer and using AVMutableComposition.
With AVMutableComposition you can combine multiple sources into one combined playback source - I'm currently working on an Application where i use this to combine different audio and video sources and play it back as a single track even though they come from seperate files.

Related

Playing still images as a video in AVQueuePlayer

I want to play a sequence of videos and images (like Snapchat does). By playing an image I mean having it show on the screen for a certain amount of time. I am using AVFoundation for media capture and playback, and I am using swift to develop this application.
I have .mp4 videos and .jpg images, and I was trying to think of the easiest way to convert the .jpg images to videos such that I could simply add everything to the array of assets that will be passed in as a parameter to the AVQueuePlayer initializer.
Does anybody have any insight on how to do this?

Effect to audio and video file

In my app I want to give effect to audio and video file like it is given to Pheed Application. I want to mix audio recorded sound with predefine clips. And also want to give sound different effect like echo , surrounding Normal , And with video file I want to add different effects like sepia,.. I don't know which class library I have to use to implement6 this . Can any one suggest me any library for that or any way how to do that?
Here are a pair of libraries you can try:
For audio filters and effects you can try with The Amazing Audio Engine. It is build on top of Core Audio.
For video effects try GPUImage. I haven't tried it but it is supposed to work better than Core Image when handling videos.

With html5 audio limitations on iOS, is it possible to play background music and sound effects at the same time?

I've been reading about the limitations of html5 on iOS.
Currently, all devices running iOS are limited to playback of a single audio or video stream at any time. Playing more than one video—side by side, partly overlapping, or completely overlaid—is not currently supported on iOS devices. Playing multiple simultaneous audio streams is also not supported. You can change the audio or video source dynamically, however. See “Replacing a Media Source Sequentially” for details.
Apparently I can only play one file at a time. A common technique is to have one file, but combine all of the sounds you need into this one file and seek to the parts you want to play. This is called an audio sprite.
But here's what's not clear to me: If I use an audio sprite, can I overlap it with itself? For example, can I have the sound of a bullet while I'm playing background music? Or, can I have the sound of two bullets firing simultaneously?
Recent versions of Mobile Safari (http://caniuse.com/audio-api) support the Web Audio API, which supports simultaneous playback.
Check this demo on an iOS device: https://webaudiodemos.appspot.com/TouchPad/index.html
Shameless plug for a simple wrapper: https://github.com/endemic/sona

Play segmented, archived video with Microsoft Smooth Streaming

I'm new to Smooth Streaming. I am able to use Microsoft Smooth Streaming player to play live video that spans across multiple segments. The manifest seems to have information about all segments.
But for playback from archive, I am able to point the URL in the HTML to the ISM in one of the segments and I can play back that particular segment fine, but I don't know how to play back the entire video with abilities to rewind, forward, etc.
Is it possible to do such across multiple segments?
For playing back across multiple segments, I ended up adding the archived segments to the player's playlist and used player.GoToPlaylistItem() and player.SeekToPosition() to forward, rewind and play across multiple segments in an archive.

How to display and control full-screen video in an XBOX game

I would like to create a game for XBox360 which is mostly full-screen HD videos. The player will be given choices during the game to determine which video is to be played.
I need very fine-grained control over the video such as controlling playback speed, seeking to video frames and possibly applying simple effects to the videos.
I also want to be able to use augmented reality to add elements to the videos so I need to be able to render 3d objects over the video.
It would be great if this could be done in XNA however there is only basic video playback functionality there. What other options do I have?
Your options for decoding videos are limited. The VideoPlayer class provides functionality for playing videos from the start, pausing and resuming them, looping them, and setting their audio volume.
As far as displaying videos goes - you have a huge degree of freedom. You basically get each frame of the video as a texture that you can draw as a sprite, or apply to any 3D object. This includes using it as an input to a pixel shader, allowing you to apply all kinds of effects to the video.
The only alternative to the built-in player is to create your own. If you want to target the Xbox 360 this will limit you to managed code only. I am not aware of any suitable video decoder libraries.
For Windows, a little Googling revealed this library, which may be a good starting point.

Resources