Error pulling RTSP streams using EvoStream 2.0

Error pulling RTSP streams using EvoStream 2.0

Support ForumCategory: Integration and CustomizationError pulling RTSP streams using EvoStream 2.0
thachhoang asked 2 years ago
We are using EvoStream 2.0 to pull RTSP streams (only video, no audio). I have a .vod file in the media folder that looks like this: uri=rtsp://example.com/name.stream When I try to play it from the VOD page of the EMS Web UI, the stream fails to load, and I see these errors in the logs: ..\..\..\sources\thelib\src\netio\iocp\tcpcarrier.cpp:78 Unable to read data from connection: (Far: 127.0.0.1:4000; Near: 127.0.0.1:64831) CTCP(476) <-> [TCP(157)] <-> OHTT2(158) <-> ORPC(159). EOF encountered and ..\..\..\sources\thelib\src\protocols\rtp\sdp.cpp:151 Audio track index high not found and ..\..\..\sources\thelib\src\protocols\rtp\streaming\innetrtpstream.cpp:97 Sampling rate: 90000.000000 At the same time, the HTML5 player repeatedly prints these debugging messages:

    1518726213286: No stream data. Restarting player...
    1518726205434: VIDEO stalled event triggered.
    1518726205434: VIDEO stalled event triggered.
    1518726202289: Media source is now ready.
    1518726202287: VIDEO loadstart event triggered.
    1518726202287: VIDEO loadstart event triggered.
    1518726202281: Initializing player...
For comparison, this is what a DESCRIBE for the stream looks like:

    DESCRIBE rtsp://example.com/name.stream RTSP/1.0


    RTSP/1.0 200 OK
    CSeq: 0
    Server: Wowza Streaming Engine 4.7.4 build21380
    Cache-Control: no-cache
    Expires: Thu, 15 Feb 2018 15:20:25 EST
    Content-Length: 365
    Content-Base: rtsp://example.com/name.stream/
    Date: Thu, 15 Feb 2018 15:20:25 EST
    Content-Type: application/sdp
    Session: 732878497;timeout=60
     
    v=0
    o=- 732878497 732878497 IN IP4 127.0.0.1
    s=name.stream
    c=IN IP4 0.0.0.0
    t=0 0
    a=sdplang:en
    a=range:npt=now-
    a=control:*
    m=video 0 RTP/AVP 97
    a=rtpmap:97 H264/90000
    a=fmtp:97 packetization-mode=1;profile-level-id=4D0029;sprop-parameter-sets=Z00AKeKQPBH9YC3AQEB4eJEV,aO48gA==
    a=cliprect:0,0,270,480
    a=framesize:97 480-270
    a=control:trackID=1
How should I configure this stream for successful pulling and playback? Thank you for your time.

Question Tags:


6 Answers
erika Staff answered 2 years ago

Hello thachhoang,   Let me assist you with your concerns,
Q1: Are you pulling the .vod file in the media folder? If yes, what is the API command you sent to EMS?
Q2: Do you want just to play the VOD file in your media and its not streaming? As what you described in your issue, you are just playing the VOD file and not the pulled RTSP stream.  
 
Recommendations:

  1. Please try to check if the VOD file is playable using VLC, if yes, this should be played in the WebUI’s VOD page. Please make sure that Flash is allowed in the browser.
  2. Pull the stream in the media folder using this uri: rtsp://EMS_IP:5544/vod/NameOfFile.mp4
    If the pull is successful, the stream will be found under Active in UI’s Streams page

For more information please see VOD documentation here.  

thachhoang answered 2 years ago
I’m playing the VOD file through the UI at http://localhost:4100/streams#/vod/, which I thought would pull the stream URI specified inside that file. I found a simpler setup to show the error I’m having: I sent this command to EMS:
pullStream uri=rtsp://example.com/name.stream  keepAlive=1  localStreamName=test
and got a SUCCESS message:
{
"data": {
"data": {
"audioCodecBytes": "",
"configId": 1,
"emulateUserAgent": "EvoStream Media Server (www.evostream.com) player",
"forceTcp": false,
"httpProxy": "",
"httpStreamType": "ts",
"isAudio": true,
"keepAlive": true,
"localStreamName": "test",
"operationType": 1,
"pageUrl": "",
"ppsBytes": "",
"rangeEnd": -1,
"rangeStart": -2,
"rtcpDetectionInterval": 10,
"saveToConfig": true,
"sendDummyPayload": false,
"sendRenewStream": false,
"spsBytes": "",
"ssmIp": "",
"swfUrl": "",
"tcUrl": "",
"tos": 256,
"ttl": 256,
"uri": {
"document": "name.stream",
"documentPath": "/",
"documentWithFullParameters": "name.stream",
"fullDocumentPath": "/name.stream",
"fullDocumentPathWithParameters": "/name.stream",
"fullParameters": "",
"fullUri": "rtsp://example.com/name.stream",
"fullUriWithAuth": "rtsp://example.com/name.stream",
"generatedPort": 0,
"host": "example.com",
"ip": "xxx.xxx.xxx.xxx",
"originalUri": "rtsp://example.com/name.stream",
"parameters": {},
"password": "",
"port": 80,
"portSpecified": true,
"scheme": "rtsp",
"userName": ""
},
"videoSourceIndex": "high"
},
"description": "Stream rtsp://example.com/name.stream enqueued for pulling",
"status": "SUCCESS"
}
}
Under the “Active” tab at http://localhost:4100/streams#/active I can see:
5 PULL test rtsp://example.com/name.stream AUNK VH264
When I clicked “Play” under Actions, however, I see these messages in the logs:
..\..\..\sources\thelib\src\netio\iocp\tcpcarrier.cpp:78 Unable to read data from connection: (Far: 127.0.0.1:4000; Near: 127.0.0.1:54418) CTCP(476) <-> [TCP(2311)] <-> OHTT2(2312) <-> ORPC(2313). EOF encountered
and the EvoStream HTML5 Player prints these debug messages, repeatedly:
1519060359262: No stream data. Restarting player...
1519060351415: VIDEO stalled event triggered.
1519060348265: Media source is now ready.
1519060348265: VIDEO loadstart event triggered.
1519060348262: Initializing player...
The stream rtsp://example.com/name.stream is playable through VLC. Would it be helpful for you to inspect the actual stream?
erika Staff answered 2 years ago
Hi thachhoang, Can you paste the actual pullStream command here?  According to logs, the stream is not found. Maybe there is something wrong with the pull command. It will return success but still if the source is not found, it will just continuously look for the source. 

Remember, if you want to pull a VOD, do this: 
pullStream uri=rtsp://EMS_IP:5544/vod/NameOfFile.ext localStreamName=someLocalStreamName
   
thachhoang answered 2 years ago
erika, The pullStream command I used is:
pullStream uri=rtsp://example.com/name.stream  keepAlive=1  localStreamName=test
I’ve sent the command with the actual URI to sales@evostream.com.
rjimenez answered 2 years ago
Let’s refer from erika’s suggestions here..
  1. Please try to check if the VOD file is playable using VLC, if yes, this should be played in the WebUI’s VOD page. Please make sure that Flash is allowed in the browser.
  2. Pull the stream in the media folder using this uri: rtsp://EMS_IP:5544/vod/NameOfFile.mp4
    If the pull is successful, the stream will be found under Active in UI’s Streams page
Since this is the pullstream command you are using.. pullStream uri=rtsp://example.com/name.stream keepAlive=1 localStreamName=test You should be able to play in VLC your uri -> rtsp://example.com/name.stream. That’s just one way of verifying if your source stream is valid. In your case, it seems that your source stream rtsp://example.com/name.stream is not valid at all. Kindly check first if it is playable via VLC. If you are pulling a file from the media folder.. kindly use the format which erika suggested. rtsp://EMS_IP:5544/vod/NameOfFile.mp4 In your example, you should have included the port 5544 too. Your example rtsp://example.com/name.stream is not a valid of a file pulled as vod from the media folder because .stream is not included in our valid file type extensions. Also if you are pulling an rtsp vod file from the media folder, use port 5544 too. and take note of the “/vod/” part of the uri too.      

Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.