Play 360 live video stream - ios

I'm using MobileVLCKit for playing the live streamings for a while now, but now I've been tasked to play 360 live video streams I've tried to stream the video normally but it shows rectangular view for overall video what I want is play like 360 videos so the user can interact with the video. The current playback for video is like
Code for playback from MobileVLCKit is below
let url = URL(string: "rtmp://\(streamurl)/LiveApp/022036535502121746572694")
player.media = VLCMedia(url: url!)
player.drawable = self.videoView
player.play()
If anybody has streamed 360 videos please let me know How can I do that?
TIA Any links or suggestions will also be much appreciated.

The latest version of VLC player does support 360 video playback but ti may be that the MobileVLCKit is a subset that does not include this yet - certainly it is not obvious in the documentation that it does.
There is a way you can use the full VLC player from your app, if that works for you as a workaround, by using an 'x-callback-url'.
The iOS VLC documentation contains some instructions for this at the time of writing (https://wiki.videolan.org/Documentation:IOS/) including the specific format below:
vlc-x-callback://x-callback-url/ACTION?url=...&PARAMETER=...
Actions:
stream: VLC plays the stream provided by the URL parameter
download: VLC will download the file provided by the URL parameter
Optional Parameters:
filename: VLC will store the file under the given filename when using the download action.
x-success: VLC will open another x-callback-url once playback is done.
x-error: VLC will open another x-callback-url if playback fails. Requires version >2.5.0 or later
Its also worth noting that the player has to know the video is 360 - the video may indicate this somehow, in its header info typically, or you may find you need to tell the player itself to play the video as 360. It may be worth playing with some online or downloadable demo VR players to get a feel - e.g.:
https://bitmovin.com/demos/vr-360
https://www.jwplayer.com/developers/web-player-demos/360-video/
http://demo.theoplayer.com/vr-and-360

Related

Extract CMSampleBuffer from HLS video stream on iOS

How can I save what AVPlayer is currently playing (both video and audio) from Live HLS stream?
I know how to load and play m3u8 video file using AVPlayer.
Please note that the HLS stream is live and not Video on demand so cannot use AVAggregateAssetDownloadTask In the perfect scenario will get CMSampleBuffer objects which can save to file easily. Also AVPlayerItemOutput is not entirely an option because I am unable to see how will get the audio channel.
Seems not possible with the current SDK. I've implemented it using ffmpeg

Unable to play firebase video on my iOS device

I have one simple application which is loading videos list from firebase and by click on any of the video I will load that video through AVPlayer.
But I am unable to play any video uploaded at Firebase storage.
Player Code :
func displayVideo(_ videoURL:URL){
let player = AVPlayer(url: videoURL as URL)
self.playerController.player = player
self.addChildViewController(self.playerController)
self.view.addSubview(self.playerController.view)
self.playerController.view.frame = self.view.frame
player.play()
}
Also, I tried another alternate solution by download this video locally and play it from local but that one also not working.
let me know if I am doing any mistake in the video player.
Guys no problem in my player code as I have test another video like test.mov file and its working in both solution.
Live streaming
Local file
So I found one answer here which help me to test my video formate.
Answer by Mike McDonald:
I have a feeling that the issue here is that the video is not in the
correct format (needs to be H.264 or MPEG-4 in .mp4, .m4v, .mov [or an
HLS video for live streaming]), and the content type should be set
appropriately (video/mp4, video/x-m4v, video/quicktime). Can you
confirm these?
Still for my satisfaction I have tried this video on Mac quick time player and got below error.
Than I realised that some time due to video formate we unable to play or stream video.
Thanks every one who helped here.
This answer is for whom who is facing same issue like me.

How to play video and audio extracted from mkv file in metro app

I have managed to read matroska container and able to extract video and audio streams from a mkv file in my metro app. Now, I don't know how to feed the streams for playing. I want to know the concept of throwing media data on display. I have another option to repack the video and audio(s) with subtitles into MP4 container which will be played by MediaElement by default but that will not look like having a matroska codec in my metro app.
So, basically my question is: How to use MediaElement or any display graph to read the video and audio pulled out from any video container.
Please guide me. Thanks.

How to play an in downloading progress video file in IOS

I'm assigned to implement a iphone app that can download video files from a server, and to play that video while the video file is written to the disk; something likes
(Movie player)<--read--[###### iphone flaskdisk ######]<--write---(Downloader)
I know that I would use HTTP video streaming play a remote video stream, but what i need is the video file is saved in flask mem after playing.
Any suggestion?
Thanks
If you know how to play a video from a URL, you can easily play the video while simultaneously download the video on another thread (if you are short on time)...
Alternatively, you can create your own video player that handles this function. Application sin the App Store do already do this (check out any video downloader application)
Thanks!

Using MPMoivePlayerController to play Youtube Video, but it doesn't work

It is obvious that MPMoivePlayerController not support 3gp video, but the document said it supports.
Also does the RTSP protocol.
How to play Youtube Video, and when one movie finish, it will notify us to play next.
There is some example that play's Youtube by using UIWebView, but it can't catch the finished notification.
I use Xcode 4.3, meanwhile, the moiveplayer seems do well below xcode 4.2.

Resources