Record already playing stream

This forum is about all development around libVLC.
RustyKnight
New Cone
New Cone
Posts: 4
Joined: 26 Mar 2020 04:26

Record already playing stream

Postby RustyKnight » 26 Mar 2020 04:42

I'm working on an App that streams audio and video from RTSP sources in iOS/Swift using MobileVLCKit

As part of the workflow, I need to be able to, record the video while it's stream, at the request of the user (they tap start, the App records, the tap stop, the App stops recording, what ever is playing).

I've been playing around with this and can't seem to get it to work (recording always fails with "false")

The basic work flow is...

* Create VLCMedia object with the URL of stream
* With an instance of VLCMediaPlayer, set the VLCMedia reference and play
* At some point in time, call startRecording(atPath) (I usually use something like URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true).path to generate a path reference)

I've seen some attempts to "duplicate" the stream, but this isn't really want I want (nor have I been able to get it to really work)

Is this even possible?

I'm currently using ~> 3.3.0

RustyKnight
New Cone
New Cone
Posts: 4
Joined: 26 Mar 2020 04:26

Re: Record already playing stream

Postby RustyKnight » 26 Mar 2020 04:56

:shock: Ok, I was inspecting the return result of both startRecording(atPath) and stopRecording which return BOOL.

Both these return "false" during my test.

I then hooked into the logging service and set it to debug and found that it was actually generating something. So, going forward, I'll be ignoring the results of these calls and "hoping" for the best


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests