Closed the-real-rusty-shackleford closed 7 months ago
The below script creates two instances of OME and starts a push from one instance to the other. Then it queries the pushes
API with an invalid ID. The result is that the push is returned anyway.
It certainly seems like PushApplication::GetPushes
in application.cpp
is trying to filter. I'm not sure why it's failing.
Server.xml
and run.sh
) into the same directory. run.sh
. <?xml version="1.0" encoding="UTF-8" ?>
<Server version="8">
<Name>OvenMediaEngine</Name>
<!-- Host type (origin/edge) -->
<Type>origin</Type>
<!-- Specify IP address to bind (* means all IPs) -->
<IP>*</IP>
<PrivacyProtection>false</PrivacyProtection>
<!--
To get the public IP address(mapped address of stun) of the local server.
This is useful when OME cannot obtain a public IP from an interface, such as AWS or docker environment.
If this is successful, you can use ${PublicIP} in your settings.
-->
<StunServer>stun.ovenmediaengine.com:13478</StunServer>
<Modules>
<LLHLS>
<Enable>true</Enable>
</LLHLS>
</Modules>
<!-- Settings for the ports to bind -->
<Bind>
<!-- Enable this configuration if you want to use API Server -->
<Managers>
<API>
<Port>8081</Port>
<WorkerCount>1</WorkerCount>
</API>
</Managers>
<Providers>
<!-- Push providers -->
<RTMP>
<Port>1935</Port>
<WorkerCount>1</WorkerCount>
</RTMP>
</Providers>
<Publishers>
<LLHLS>
<Port>3333</Port>
<WorkerCount>1</WorkerCount>
</LLHLS>
</Publishers>
</Bind>
<Managers>
<Host>
<Names>
<Name>*</Name>
</Names>
</Host>
<API>
<AccessToken>test:test</AccessToken>
<CrossDomains>
<Url>localhost</Url>
</CrossDomains>
</API>
</Managers>
<VirtualHosts>
<VirtualHost>
<Name>default</Name>
<Host>
<Names>
<Name>*</Name>
</Names>
</Host>
<!-- Settings for applications -->
<Applications>
<Application>
<Name>app</Name>
<!-- Application type (live/vod) -->
<Type>live</Type>
<OutputProfiles>
<OutputProfile>
<Name>bypass_stream</Name>
<OutputStreamName>${OriginStreamName}</OutputStreamName>
<Encodes>
<Video>
<Name>bypass_video</Name>
<Bypass>true</Bypass>
</Video>
<Audio>
<Name>bypass_audio</Name>
<Bypass>true</Bypass>
</Audio>
</Encodes>
</OutputProfile>
</OutputProfiles>
<Providers>
<RTMP />
</Providers>
<Publishers>
<AppWorkerCount>1</AppWorkerCount>
<StreamWorkerCount>1</StreamWorkerCount>
<RTMPPush></RTMPPush>
</Publishers>
</Application>
</Applications>
</VirtualHost>
</VirtualHosts>
</Server>
OME_TAG=${1:-0.16.3}
docker image pull airensoft/ovenmediaengine:$OME_TAG
docker container rm ome-test-1 --force
docker container rm ome-test-2 --force
echo "Starting OME Instance 1..."
docker run --rm -d \
--name ome-test-1 \
-p 1935:1935 \
-p 8081:8081 \
-v ./Server.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml \
airensoft/ovenmediaengine:$OME_TAG
echo "Starting OME Instance 2..."
docker run --rm -d \
--name ome-test-2 \
-p 2935:1935 \
-p 8181:8081 \
-v ./Server.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml \
airensoft/ovenmediaengine:$OME_TAG
echo "Trying to start push..."
curl \
-s \
-X POST \
-H "Content-Type: application/json" \
-d @- \
http://test:test@localhost:8081/v1/vhosts/default/apps/app:startPush > /dev/null << EOF
{
"id": "stream1",
"stream": {
"name": "test",
"variantNames": []
},
"protocol": "rtmp",
"url": "rtmp://host.docker.internal:2935/app",
"streamKey": "test"
}
EOF
echo "Push started."
curl \
-s \
-X POST \
-H "Content-Type: application/json" \
-d @- \
http://test:test@localhost:8081/v1/vhosts/default/apps/app:pushes << EOF
{
"id": "not-a-real-id"
}
EOF
https://github.com/AirenSoft/OvenMediaEngine/compare/0f3e09b8ed48...9627d4e731cd
@the-real-rusty-shackleford You've waited a long time. Last year I was so busy that I couldn't solve it. I finally solved the problem. The patch has been applied to the master branch. It will be reflected in the next release version.
Thank you so much for reporting the issue. happy new year :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bump. I'm not sure this has been released yet, so I haven't been able to test it.
Oops, my mistake. I just tested this in 0.16.4 and it is working. Thanks!
Describe the bug The API documentation for the
Get Push Publishing State
endpoint states that ifid
is passed in the body, only the push with that ID will be returned. See below.When I pass an
id
, all pushes are always returned, even if I put in a junk ID that doesn't match any ID.To Reproduce Steps to reproduce the behavior:
POST /v1/vhosts/{vhost}/apps/{app}:startPush
. Usestream1
as the ID./v1/vhosts/{vhost}/apps/{app}:pushes
with a body ofExpected behavior The result should be filtered by ID.
Server (please complete the following information):