licode icon indicating copy to clipboard operation
licode copied to clipboard

RTSP Issues

Open sebastianfelipe opened this issue 4 years ago • 1 comments

Description Hi! Well, I have dedicated a lot of hours trying to streaming a RTSP local connection, but It couldn't be possible. I tried with licode-v7 (I think this is impossible, because some bugs that were fixed later on the code). Also tried with the latest version (I think this have a lot of bugs, it cannot be possible almost any) But, with version 8, I think I was closed. But I think there are some bugs or maybe a lack of documentation about it. I'm gonna describe the issue.

Steps to reproduce the issue:

  1. Install licode v8
  2. Using any Erizo client (the example, or something you have developed), try to configure it to stream RTSP. My config was:
        localStream = Erizo.Stream({
          audio: false,
          video: true,
          url: 'rtsp://<username>:<password>@<local IP>:<port>',
          attributes: {user: <user info>}
        });
  1. You can do the previous step modifying the basic example too. It doesn't matter.
  2. Run the code and read the logs

Describe the results you received: The logs in licode described very well what happened:

2020-07-16 07:45:17.452  - DEBUG: ErizoController - Channel - message: socket disconnected, code: 1000
2020-07-16 07:45:17.452  - DEBUG: ErizoController - Client - message: Removing listeners to socket events, client.id: 4e30886c-5fa7-4c17-bcf2-62fd70c0213c
2020-07-16 07:45:17.452  - INFO: ErizoController - Client - message: Channel disconnect, clientId: 4e30886c-5fa7-4c17-bcf2-62fd70c0213c , channelId: b5851330-ab20-42ca-8814-4b9cb3e4b7d5
2020-07-16 07:45:17.453  - INFO: ErizoController - Client - message: removeSubscriptions, clientId: 4e30886c-5fa7-4c17-bcf2-62fd70c0213c
2020-07-16 07:45:17.453  - INFO: RoomController - message: removeClient clientId 4e30886c-5fa7-4c17-bcf2-62fd70c0213c
2020-07-16 07:45:17.453  - DEBUG: ErizoController - Room - message: deleting empty room, roomId: 5f0a41470021da0217af384b
2020-07-16 07:45:18.170  - ERROR: UserResource - message: getUser user not found, userId: student@5f0928bb3f2f840013fadc75
2020-07-16 07:45:18.196  - INFO: ErizoController - message: socket connected, socketId: FztTqrmFwvFaA9NAAAAO
2020-07-16 07:45:18.214  - DEBUG: ErizoController - Channel - message: token received
2020-07-16 07:45:18.221  - INFO: RPCPublic - message: consumed token, tokenId: 5f10058ea2db7b0209bf3f07, roomId: 5f0a41470021da0217af384b, serviceId: 5f092d61f181ca04b8d64192
2020-07-16 07:45:18.223  - INFO: ErizoController - message: getting singlePC configuration, singlePc: undefined, global: true
2020-07-16 07:45:18.226  - DEBUG: ErizoController - Client - message: Adding listeners to socket events, client.id: 6ce988a8-8792-46fc-96e0-1f3548e6031e
2020-07-16 07:45:18.227  - INFO: ErizoController - message: client connected, clientId: 6ce988a8-8792-46fc-96e0-1f3548e6031e, singlePC: false
2020-07-16 07:45:18.236  - INFO: RoomController - message: addExternalInput, clientId 6ce988a8-8792-46fc-96e0-1f3548e6031e, streamId: 735408879140300800, url:rtsp://<username>:<password>@<local IP>:<port>
2020-07-16 07:45:18.237  - INFO: EcCloudHandler - message: createErizoJS, agentId: ErizoAgent
2020-07-16 07:45:18.243  - INFO: EcCloudHandler - message: createErizoJS success, erizoId: e88d498f-2969-a9b5-2b4a-4a0d2d596c7a, agentId: 2deedf57-57c4-7ccc-6b42-ed3dfbd7aade, internalId: 0
[erizo-e88d498f-2969-a9b5-2b4a-4a0d2d596c7a] 2020-07-16 07:45:18.248  - INFO: ErizoJSController - Start checking uptime, interval 1800
[erizo-e88d498f-2969-a9b5-2b4a-4a0d2d596c7a] 2020-07-16 07:45:18.250  - INFO: Client - Constructor Client rtsp://<username>:<password>@<local IP>:<port>
2020-07-16 07:45:18.251  - WARN: Publisher - message: Adding ExternalInput, id: 735408879140300800_rtsp://<username>:<password>@<local IP>:<port>, url: rtsp://<username>:<password>@<local IP>:<port>
[erizo-0e7ddcf7-680b-580f-2462-4b5727dbc19e] [rtsp @ 0x3ef0a00] UDP timeout, retrying with TCP
[erizo-0e7ddcf7-680b-580f-2462-4b5727dbc19e] [rtsp @ 0x3ef0a00] method PAUSE failed: 455 Method Not Valid In This State
[rtsp @ 0x3ef0a00] Could not find codec parameters (Video: h264)
[rtsp @ 0x3ef0a00] Estimating duration from bitrate, this may be inaccurate
[erizo-0e7ddcf7-680b-580f-2462-4b5727dbc19e] [libvpx @ 0x3d8fd00] v1.5.0
[libvpx @ 0x3d8fd00] Failed to initialize encoder: Invalid parameter
[libvpx @ 0x3d8fd00]   Additional information: g_w out of range [1..16383]

Describe the results you expected: I expected to stream a h264 video, from my local camera.

Additional information you deem important (e.g. issue happens only occasionally):

Licode commit/release where the issue is happening I tried it from version 7 and on

Additional environment details (Local, AWS, Docker, etc.): I used Docker environment and also installed in a VM. Same thing, I have dedicated a lot of hours in this.

I'd really appreciate your help. If I'm doing something wrong, I really appreciate a clarification, but I think there is issues related and I'm not sure why. It would be helpful if you can provide an example about streaming RTSP or a file, because it is not as easy as in the documentation.

Thanks, Sebastián.

sebastianfelipe avatar Jul 16 '20 07:07 sebastianfelipe

I think it has bug when it use tcp. I think udp is ok.

fengmao31 avatar Jul 27 '22 03:07 fengmao31