Jump to content
  • 0

Plugin black image


robertosamayoa
 Share

Question

Hello, i was testing 

 

2. Overlay Filter:

You can use an overlay filter to add a stream over another one as an overlay.

curl command:

curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "http://localhost:5080/WebRTCAppEE/rest/v2/filters/create" -d '{"filterId":"overlaydemo","inputStreams":["stream1","stream2"],"outputStreams":["test"],"videoFilter":"[in0]scale=240:160[s0];[in1][s0]overlay[out0]","audioFilter":"[in0][in1]amix=inputs=2[out0]","videoEnabled":"true","audioEnabled":"true","type":"asynchronous"}'

Input streams: stream1 and stream2

Output streams: test

Video Filter Text:
[in0]scale=240:160[s0];[in1][s0]overlay[out0]","audioFilter":"[in0][in1]amix=inputs=2[out0]

Explanation: We scale stream1(in0) to 240×160 and obtain a hidden stream(s0). The we apply it to the stream2(in1) and obtain the output stream test(out0).

Output:

 

but not working for me version 2.4.1

i get stream black.

 

So question is:

 

here say we have to inputs Stream 1 and stream 2 and the output stream name test

{"filterId":"overlaydemo","inputStreams":["stream1","stream2"],"outputStreams":["test"]

 

So the output here we create or should be existing one.

input streams are i guess from where we get the video to insert in the output , or not?

 

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
6 minutes ago, robertosamayoa said:

Hello, i was testing 

 

2. Overlay Filter:

You can use an overlay filter to add a stream over another one as an overlay.

curl command:

curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "http://localhost:5080/WebRTCAppEE/rest/v2/filters/create" -d '{"filterId":"overlaydemo","inputStreams":["stream1","stream2"],"outputStreams":["test"],"videoFilter":"[in0]scale=240:160[s0];[in1][s0]overlay[out0]","audioFilter":"[in0][in1]amix=inputs=2[out0]","videoEnabled":"true","audioEnabled":"true","type":"asynchronous"}'

Input streams: stream1 and stream2

Output streams: test

Video Filter Text:
[in0]scale=240:160[s0];[in1][s0]overlay[out0]","audioFilter":"[in0][in1]amix=inputs=2[out0]

Explanation: We scale stream1(in0) to 240×160 and obtain a hidden stream(s0). The we apply it to the stream2(in1) and obtain the output stream test(out0).

Output:

 

but not working for me version 2.4.1

i get stream black.

 

So question is:

 

here say we have to inputs Stream 1 and stream 2 and the output stream name test

{"filterId":"overlaydemo","inputStreams":["stream1","stream2"],"outputStreams":["test"]

 

So the output here we create or should be existing one.

input streams are i guess from where we get the video to insert in the output , or not?

Also if i want to rewrite means

i already create output test then i want to add another filter on same output test? without loosing transmition.

6 minutes ago, robertosamayoa said:

 

 

Link to comment
Share on other sites

  • 0
16 minutes ago, robertosamayoa said:

Also if i want to rewrite means

i already create output test then i want to add another filter on same output test? without loosing transmition.

 

ERROR i.antmedia.filter.utils.FilterGraph - error avfilter_graph_parse 2022-10-20 17:59:52,565 [http-nio2-0.0.0.0-5080-exec-2] ERROR io.antmedia.filter.FilterAdaptor - Video filter graph can not be initiated

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...