Page 1 of 1

Record already playing stream

Posted: 26 Mar 2020 04:42
by RustyKnight
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

Re: Record already playing stream

Posted: 26 Mar 2020 04:56
by RustyKnight
: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