Play 360 live video stream

1.1k views Asked by At

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 enter image description here

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.

1

There are 1 answers

0
Mick On

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.: