stop recording using rest api

Gabriel T

Member
Hello
is it possible to stop recording using the rest api ? the thing is if we want to transfert the recording from wcs server to another server (for conversion or whatsoever) while the stream is publishing, the file wont close properly and will be corrupted...and its not very convenient to stop the publishing to have to transfert the recordings...or i missed something. thx for your help
 

Max

Administrator
Staff member
Hello

Recording management over REST will work in version WCS 5.1.
We plan to release this soon. I will report here once it is done.

Currently you can try to re-publish to localhost to get this working.
Example:
1. You publish a stream i.e. stream1.
2. You re-publish to localhost
/rest-api/push/startup {rtmpUrl:"rtmp://localhost:1935/live", streamName:"stream1"}
3. Stream rtmp_stream1 is being re-published and recorded to localhost.
4. You stop re-publishing and recording.
/rest-api/push/terminate {"mediaSessionId": "6dk1l0m3cm17c68232bccm52f1"}

Here you may need 3 settings in flashphoner.properties
Code:
record_flash_published_streams=true
to record all RTMP streams
Code:
rtmp_transponder_full_url=true
to use full RTMP urls ignoring stream name, i.e. rtmp://localhost:1935/live/my-custom-stream-name
Code:
rtmp_transponder_stream_name_prefix=rtmp_
All RTMP stream names will be prefixed with rtmp_ to avoid conflicts in names when you publish to localhost
 

Gabriel T

Member
ok thanks, i will wait 5.1 then. by the way, if i can make a feature request: i talked about this point few months ago i think, to have the equivalent of sharedObjects so we can maintain values on the server that can be shared accross participants in a same room. currently im doing this using a php websocket module, but to have this feature integrated in wcs would allow to get rid of this additionnal connection :) thanks
 

Max

Administrator
Staff member
to have the equivalent of sharedObjects so we can maintain values on the server
1. You can use REST API /rest-api/data/send
To send arbitrary data to each participant.

2. You can also use Web SDK
Code:
session.sendData();
To send arbitrary data to server.

Therefore server can receive arbitrary data and can broadcast arbitrary data across connected users.
That's how Room API is built.

So our API already operates similarly as Shared Object.
Please describe in detail what API would you need and why existing API is not convenient for use.
 

Gabriel T

Member
thanks for this is not exactly what im talking about, i got this point already. the idea is to STORE some values server side, so users WHO ARE NOT CONNECTED YET can access these values when they connect to the room. example in a conference where a slide is presented, store on the server the current slide, chat history, so users connecting after the conference started can be "up to date" with other users when they get connected, if you see what i mean. it would be like attaching properties to the room object (so we can access them in js like "room.myProperty" or room.getProperty('propertyName')
and like in shared objects, these properties are reset when the room dies (ie when all connected users are gone)
 

Max

Administrator
Staff member
Thanks for details.
We have created internal feature request WCS-1231.
We will let you know about any progress.
 

Gabriel T

Member
if you link me the source of the room class, i will be happy to help...i guess its just about adding 3 methods: setProperty, getPropertyn deleteProperty, just as getParticipants for example (okay maybe a bit more complicated as it sounds but the idea is here :)
thanks anyway, wcs is almost perfect :)
 
Top