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

Recording of synchronous filtered streams #4557

Closed
fabiox23 opened this issue Nov 11, 2022 · 6 comments
Closed

Recording of synchronous filtered streams #4557

fabiox23 opened this issue Nov 11, 2022 · 6 comments

Comments

@fabiox23
Copy link

When applying a text filter of "synchronous" type on an input stream (and using the same stream id for the output stream), the recording function seems to apply to the original (input) stream, not the filtered (output) one. I would expect the filtered stream to be recorded instead.

Ant Media Server version: Enterprise 2.5.1 on an AWS-EC2 Ubuntu 20.04 server

@fabiox23
Copy link
Author

Hi, the issue with the inability of recording asynchronous filtered streams has become quite urgent. Is there a quick fix that I can possibly apply? Thanks again, Fabio

@mekya
Copy link
Contributor

mekya commented Nov 21, 2022

I've increased the priority. I hope we can schedule it today.

@burak-58
Copy link
Contributor

Hi @fabiox23 ,
Thanks for your report.
You should execute this scenario:

  1. Enable adaptive streaming
  2. Create a stream
  3. Apply filter in sync mode by setting type to synchronous and setting outputStrems same with the inputStreams in the Rest method like the following:

curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "http://localhost:5080/WebRTCAppEE/rest/v2/filters/create" -d '{"filterId":"filter1","inputStreams":["stream1"],"outputStreams":["stream1"],"videoFilter":"[in0]vflip[out0]","audioFilter":"[in0]acopy[out0]","videoEnabled":"true","audioEnabled":"true","type":"synchronous"}'

  1. start recording
    ....
  2. stop recording
  3. delete filter
  4. stop stream

At the end you will have 2 records like {stream_id}.mp4 and {stream_id}_{resolution}p{bitrate}kbps.mp4
The first record has original stream and the second has the filtered stream.

PS: There is still a video duration issue in this scenario. I have sent the PR above to fix this.

@mekya
Copy link
Contributor

mekya commented Nov 28, 2022

I've merged the PR @burak-58. Thank you

Shall we need a test code to not encounter the same problem again?

@fabiox23
Copy link
Author

fabiox23 commented Dec 1, 2022 via email

@burak-58
Copy link
Contributor

I have created this issue for the last message.
#4640

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

No branches or pull requests

3 participants