Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return VodId in Recording endpoint #4062

Closed
KenzoIkeizume opened this issue Mar 16, 2022 · 18 comments
Closed

Return VodId in Recording endpoint #4062

KenzoIkeizume opened this issue Mar 16, 2022 · 18 comments
Assignees

Comments

@KenzoIkeizume
Copy link

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
After request this endpoint I'd like to have the VodId
[PUT] /v2/broadcasts/{id}/recording/{recording-status}

The dataId field could return the VodId, because today is always null

{
    "success": true,
    "message": "1647442263069",
    "dataId": [SOMETHING IN HERE {VODID}],
    "errorId": 0
}

Describe alternatives you've considered
N/A

Additional context
N/A

@Mohit-3196
Copy link
Contributor

Hi @KenzoIkeizume ,
Thank you for the issue.

You can use webhook calls to get the VoD Id. Ant Media Server calls vodReady hook when the recording of the live stream is ended.

You can refer to this stack overflow answer

I hope I was able to help.

Thank you

@mekya
Copy link
Contributor

mekya commented Mar 21, 2022

Thank you for the issue @KenzoIkeizume and work around solution @Mohit-3196

I think we can also add vod id to the response of the REST call. It makes life easy.

@shibupanda
Copy link

Hi @mekya
Can we add vodId in the rest APIs which is fit for our usecase.

@shibupanda
Copy link

@mustafaboleken is there any update on this?

@mustafaboleken
Copy link
Contributor

@mustafaboleken is there any update on this?

It's almost done. I will open a pull request today.

@danavramescu
Copy link

Hi! Any update on when we can expect this? In our workflow we also require vodId in the start/stop recording responses.

@mekya
Copy link
Contributor

mekya commented Sep 28, 2022

Hey @danavramescu ,

I'm trying to merge today.

@mekya
Copy link
Contributor

mekya commented Sep 29, 2022

Hey Guys,
It's merged @danavramescu @shibupanda @KenzoIkeizume @Mohit-3196 @mustafaboleken

FYI
A. Oguz

@danavramescu
Copy link

Hi ! Thanks!

What do we need to do from our end?
We're still not receiving the vodId on response on either start or stop
2022/09/30 10:23:36 [info] [ams] Start REC: '{"success":true,"message":"1664533416874","dataId":null,"errorId":0}'
2022/09/30 10:23:47 [info] [ams] Stop REC: '{"success":true,"message":"1664533427192","dataId":null,"errorId":0}'

@mekya
Copy link
Contributor

mekya commented Oct 1, 2022

Hi @danavramescu,

Thank you for your question. It's a good point.

VodId is returned in dataId field if the stream is broadcasting at that time. If the stream is not broadcasting, it just returns with the old way because there is no VoD recording at that time and we want to make things simple in the server side.

If you enable recording when the stream is not broadcasting yet, I can just recommend two things to get the vod Id

  1. You can listen the vodReady webhook -> https://resources.antmedia.io/docs/using-webhooks
  2. You can get the vods by filtering with streamId via REST API -> https://antmedia.io/rest/#/VoD%20Rest%20Service/getVodList

@danavramescu
Copy link

danavramescu commented Oct 1, 2022 via email

@mekya
Copy link
Contributor

mekya commented Oct 1, 2022

Hey @danavramescu,

Thank you for follow up. Then just let me tell what is working for me and find the difference in our tests

  1. The latest snapshot(Enterprise Edition 2.4.4-SNAPSHOT 20221001_0736
    ) is deployed to here -> ovh36.antmedia.io
  2. I've created just a sample app for testing with name testVodId
  3. I've published stream with WebRTC with stream1
  4. I've executed the following command to start streaming
curl -X 'PUT'   'https://ovh36.antmedia.io:5443/testVodId/rest/v2/broadcasts/stream1/recording/true'   -H 'accept: application/json'

the incoming response as expected

{"success":true,"message":"1664620260843","dataId":"FeGReCzBm2DWs9Xe2YA8BT4J","errorId":0}
  1. I've executed the following command to stop streaming
curl -X 'PUT'   'https://ovh36.antmedia.io:5443/testVodId/rest/v2/broadcasts/stream1/recording/false'   -H 'accept: application/json'

and the incoming response as follows

{"success":true,"message":null,"dataId":"FeGReCzBm2DWs9Xe2YA8BT4J","errorId":0}
  1. I last checked that VoD is recorded with the correct VodId

Screenshot 2022-10-01 at 13 35 15

What's the difference in your scenario?

@danavramescu
Copy link

Sorry, didn't pay attention, was still using enterprise edition version 2.4.3. upgraded to 2.4.4 and all good now! Thanks! This update is really useful and makes working with remote recs much easier! Good job!

@mekya
Copy link
Contributor

mekya commented Oct 5, 2022

No worries, it's great to hear that it's working for you and it helps you :)

@shibupanda
Copy link

Hi @mekya not yet tested but I have a query.

curl -X 'PUT' 'https://ovh36.antmedia.io:5443/testVodId/rest/v2/broadcasts/stream1/recording/true' -H 'accept: application/json'

is the testVodId is the custom one which user can generate ?

@mekya
Copy link
Contributor

mekya commented Oct 10, 2022

Hi @shibupanda ,

testVodId is the application for Ant Media Server and you can generate applications with anyname on the web panel.
War File is optional in the form below. You can keep it empty and create application by just clicking the Create button in the screenshot

Screenshot 2022-10-10 at 20 26 54

.

@shibupanda
Copy link

Once I upgrade server with latest snapshot getting some exception.
https://gist.github.com/shibupanda/d305d3e21a9fd0a6d78f82cb85b6f155

@mekya
Copy link
Contributor

mekya commented Oct 19, 2022

Hi @shibupanda ,

Shall we proceed through support channel? Because your problem is not directly related to this issue.

BTW, this improvement is available on version 2.5.0

@mekya mekya closed this as completed Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants