AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://airensoft.com/ome.html
GNU Affero General Public License v3.0
2.6k stars 1.06k forks source link

Lagged stream using DJI Drone (either mini 3 Pro or 300 RTK) or even ffmpeg #1690

Closed antonymarion closed 2 months ago

antonymarion commented 2 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. default server.xml configuration
  2. See error in logs image

Expected behavior The stream is very laggy and I have no idea why

Logs cf above

Server (please complete the following information):

Player (please complete the following information):

Additional context tested with stream sent over ffmpeg, seeing very lagged video too, was ok before. After few seconds over ffmpeg it seems better. Logs are like these on server side with ffmpeg stream (not red any more) image

cmd used to send over ffmpeg: ffmpeg -d -stream_loop -1 -re -i ./my_video.mp4 -c copy -f flv -y rtmp://ome.stationdrone.net:1935/app/test

N.B.: testing with SRS does not show the PB. SRS is running inside docker in a Portainer too.

antonymarion commented 2 months ago

Just to be sure, I tested sending my test stream using ffmpeg on the demo space, and I reproduced the same laggy effect as in our portainer over OVH:

image

antonymarion commented 2 months ago

Examples of video files sent using ffmpeg and showing lags:

https://github.com/user-attachments/assets/43a77448-8055-4a15-b4f1-be0483f09201

For the above video, I remember that previous tests before showed better results compared to SRS (since SRS does not handle b-frames), but now it does not show better results

https://we.tl/t-tRi3pYwx2P

getroot commented 2 months ago

What protocol are you playing with? WebRTC or llhls?

antonymarion commented 2 months ago

Webrtc.

I then disabled llhls on server side in the xml

getroot commented 2 months ago

Does your sample video have b-frames? Browsers do not support b-frames in WebRTC streams. It is a limitation of the browser, not a limitation of OME. OME provides a transcoder, so if you encode the stream, it can be played normally. On the other hand, LLHLS supports b-frames.