Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blur when publish streams via UDP #38

Closed
CNchence opened this issue Jul 16, 2020 · 10 comments
Closed

Blur when publish streams via UDP #38

CNchence opened this issue Jul 16, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@CNchence
Copy link

I use ffmpeg to grab the screen and use rtsp to push the stream. When I use TCP, the video is normal, but when using UDP, the received picture will have mosaic and blur

@gustavobsch
Copy link

I have the same issue. I first thought it was the network camera but when using VLC the frames look fine no corruption.

@Hyperopic
Copy link

Same here, output is significantly better when using a TCP stream. This is over loopback and then out over gigabit LAN.
ffmpeg (looping MP4 file) ---> 127.0.0.1:8554 ---> rtsp-simple-server ---> :8554 gigabit LAN ---> Hikvision NVR (RTSP client)
Running Ubuntu 18.04.04
It may be coincidental, but rtsp-simple-server has replaced an install of chriswiggins/rtsp-streaming-server typescript module which stopped working with issues regarding UDP port binding. It had been working fine, then after an update of various (haven't dug into what yet) it stopped working.
TCP is much better, but still seeing some odd artefacts with moving backgrounds and text overlays (in original video file, not added by me) and particularly noticeable where the original video has transition effects.

@aler9 aler9 added the bug Something isn't working label Jul 17, 2020
@aler9
Copy link
Member

aler9 commented Jul 17, 2020

Hello, i'm unable to replicate the issue.
I'm doing the following (v0.9.1):

  • pc 1 is running the server and streaming the screen with UDP

    ./rtsp-simple-server &
    ffmpeg -video_size 1280x720 -framerate 25 -f x11grab -i :0 -c:v libx264 -preset ultrafast -b:v 500k -g 100 -keyint_min 100 -f rtsp rtsp://localhost:8554/mystream
    
  • pc 2 is receiving with UDP

    vlc rtsp://192.168.x.x:8554/mystream
    

The stream is received correctly with both UDP and TCP (by adding the --rtsp-tcp flag to VLC).
Please provide more details (like a set of replicable commands).

@gustavobsch
Copy link

In my case it was an opencv+ffmpeg issue. After switching to opencv+gstreamer I don't get corrupted frames using UDP

@smallnetbuilder
Copy link

smallnetbuilder commented Jul 30, 2020

I am also experiencing this. using version 0.9.1 running on Windows 10 or on Ubuntu.
Here's the ffmpeg publish. Using Big Buck Bunny file, publishing video and only mp3 audio

ffmpeg.exe -re -stream_loop -1 -i c:\users\octoscope\testfolder\bbb_sunflower_1080p_30fps_normal.mp4 -map 0:0 -map 0:1 -c copy -f rtsp rtsp://localhost:8554/testfile

Using MPV or ffplay as player results in very distorted video

@smallnetbuilder
Copy link

Setting the player to read either UDP or TCP RTSP stream makes no difference.

@Liroy2003
Copy link

I have the same issue, when using tcp the stream is clear but when using udp i get mosaic or blur. I watch the stream via internet so the client is in another network then the server. Maybe it has something to do with the MTU when using UDP?

@smallnetbuilder
Copy link

I do not have the experience of TCP fixing the problem. I can find the problem when I run ffmpeg, rtsp-simple-server and mpv ad player on the same system.

As far as I can tell, the problem is likely due to something in ffmpeg and depends on the bitrate of the file being streamed. I can get up to around 20 Mbps H.264, video only without smear. Above that, I get smear. At any rate I don't think it is a problem with rtsp-simple-server. So I think this bug should be closed.

@aler9
Copy link
Member

aler9 commented Nov 29, 2020

The issue is still present, it depends on the server; discussion has been moved here: #125

@aler9 aler9 closed this as completed Nov 29, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2023

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants