Recording RTSP stream using MobileVLCKit iOS

This forum is about all development around libVLC.
jb42
New Cone
New Cone
Posts: 1
Joined: 09 Apr 2019 12:47

Recording RTSP stream using MobileVLCKit iOS

Postby jb42 » 09 Apr 2019 12:51

I am using MobileVLCKit to stream from an RTSP source. I need to capture this stream, so far I have tried to use `startRecording(atPath:) to save the stream to the iOS documents directory but I cannot see any file being generated in the documents directory. Here is the code I am trying:

Code: Select all

import Foundation class ViewController: UIViewController, VLCMediaPlayerDelegate { @IBOutlet weak var videoView: UIView! @IBOutlet weak var playbackView: UIView! var player: VLCMediaPlayer = VLCMediaPlayer() let url = URL(string: "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov") let documents = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as! String override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. let media = VLCMedia(url: url!) player.media = media player.delegate = self player.drawable = videoView player.startRecording(atPath: documents) player.play() } @IBAction func stopButtonPressed(_ sender: UIButton) { player.stop() player.stopRecording() } }

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Recording RTSP stream using MobileVLCKit iOS

Postby Jean-Baptiste Kempf » 10 Apr 2019 08:51

Look at the logs.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests