Edward-Wu / srt-live-server

srt live server for low latency
Other
645 stars 192 forks source link

Can't play srt stream through media source on OBS 25.0.8 (Ubuntu Server 20.04). #41

Open Muldfox opened 4 years ago

Muldfox commented 4 years ago

OS: Ubuntu Server 20.04 SLS version: 1.4.6 SRT version: 1.4.1 OBS Linux version: 25.0.8

Not sure what I am doing wrong here! The server is running smoothly. I can even add the server as media source in OBS on Windows, and it plays really nicely with low latency and all.

But the second I add the same information into media source on Linux, it will not run. I have compiled ffmpeg with libsrt and everything needed. I can play the stream through ffplay on the same Linux system I have the server running on. So the server is up and running, and I can play it with ffplay on Linux and it works on Windows OBS - but it just refuses to start the media in OBS on Linux.

Windows OBS (working, using internal IP):

Linux OBS (not working, tried using internal IP and external IP): No need to link image. It's the same settings, but with a black screen. It's not picking up the stream.

Linux FFPLAY (ffplay via terminal):

I have tried changing/forcing input formats like hevc and mpegts in OBS on Linux, but there is no stream coming through. I have tried unchecking and checking all the settings in media source, nothing really changes.

I have tried mode=listener as well, didn't work. srt://127.0.0.1:port?mode=listener

I mean, it's quite clear that libsrt is enabled and working, since I'm using the protocol through ffplay. And the stream is working perfectly in OBS on Windows. I guess one weird thing, is that I cant watch the stream on VLC by adding the srt url, I have to use ffplay to get the srt stream to work through VLC.

Anyway! What am I missing here? I have tried re-installing OBS on Linux, with no luck. I have yet to compile one from source though. I will try that as a next step.

Muldfox commented 4 years ago

Probably because I built ffmpeg as portable, outside of /usr/bin. OBS probably can't find ffmpeg, which would explain this exact behavior. Ugh, I'm still a rookie at Linux, so I'm not 100% sure how to go about this. I made a symlink for ffmpeg, ffplay and ffprobe into /usr/bin. So I can use all of those without specify the binary location, it just responds when called in terminal now. I though that would be enough? But nothing changed on OBS.. still not showing the stream.

Gonna try to build OBS from source, see if that changes anything.

Muldfox commented 4 years ago

I have now compiled ffmpeg with these enabled:

  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree \
  --enable-libsrt \
  --enable-ffplay \
  --enable-pic \
  --enable-shared && \

ffmpeg is running perfectly with srt, I can use ffplay and see the srt stream from my srt server without any problems - super stable. After building ffmpeg, I made sure that the proper symlinks for ffmpeg is working - and they do. I put ffplay, ffmpeg and ffprobe symlinks in /usr/bin, so I can start ffmpeg, ffplay etc from terminal now, on command.

I compiled obs-studio from source, without any problems during the build. I have googled for dependencies, and I just can figure out what I'm missing here.

Again, I installed ffmpeg as portable.. isn't symlinks for ffmpeg in /usr/bin enough for obs to "find" ffmpeg and use it? I'm so confused.

Please help. I know this is touching on more of a OBS and ffmpeg issue, more so than sls. But I'm lost, I really need help.

Thanks guys!

Edward-Wu commented 4 years ago

please refer to : https://github.com/Edward-Wu/srt-live-server/issues/31