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

Unable to see video stream at Client #5

Closed
lchunleo opened this issue Feb 27, 2019 · 11 comments
Closed

Unable to see video stream at Client #5

lchunleo opened this issue Feb 27, 2019 · 11 comments

Comments

@lchunleo
Copy link

lchunleo commented Feb 27, 2019

Hi

My current setup is in a VM for ubuntu 18.04

i had installed and try the demo to publish the video file and then have the client to receive and display. However i have a black screen and unable to show despite the video shows received values for kB/s at the Client(chrome browser) end and not showing blue screen.

I had read the instructions on the "black" screen and think i have eliminate most of the possible issues:

  1. disable firewall
  2. use my chrome browser to see the video to prove that it can play which it does.

And can i able to stream using ffmpeg to the server to stream out to the client?

pls advise. thanks

@michaelfig
Copy link
Owner

Hi,

Sorry you had to discover this. I had known about this issue with Chrome's new video policy, but hadn't published a fix yet.

The latest release (v1.2.9) provides a fix. You can test it by specifying ?sub=1 to your mediasoup-broadcast-example subscriber.

Basically, the new video tag policy prevents video autoplay on page load unless the video tag contains the muted attribute (Safari needed the playsinline attribute). Then, after autoplay starts, your app can provide an unmute button to allow the user to toggle off the video's muted attribute, and everything will work.

Have a look at the last commit for the details of how you can implement autoplay on your own subscriber.

I'm pretty sure this is the cause, but please let me know either way if that solves the problem for you.

Good luck,
Michael.

@michaelfig
Copy link
Owner

As for this,

And can i able to stream using ffmpeg to the server to stream out to the client?

I don't know. LMK in a new issue if you have some suggestions for how this can be done, and I will happily help debug it with you if you have problems.

Thanks,
Michael.

@lchunleo
Copy link
Author

Hi,

Sorry you had to discover this. I had known about this issue with Chrome's new video policy, but hadn't published a fix yet.

The latest release (v1.2.9) provides a fix. You can test it by specifying ?sub=1 to your mediasoup-broadcast-example subscriber.

Basically, the new video tag policy prevents video autoplay on page load unless the video tag contains the muted attribute (Safari needed the playsinline attribute). Then, after autoplay starts, your app can provide an unmute button to allow the user to toggle off the video's muted attribute, and everything will work.

Have a look at the last commit for the details of how you can implement autoplay on your own subscriber.

I'm pretty sure this is the cause, but please let me know either way if that solves the problem for you.

Good luck,
Michael.

Thank you for your solution and response. Let me try out tonight thanks.

@lchunleo
Copy link
Author

LMK

Thank you. :)

@lchunleo
Copy link
Author

lchunleo commented Mar 1, 2019

Hi,

Sorry you had to discover this. I had known about this issue with Chrome's new video policy, but hadn't published a fix yet.

The latest release (v1.2.9) provides a fix. You can test it by specifying ?sub=1 to your mediasoup-broadcast-example subscriber.

Basically, the new video tag policy prevents video autoplay on page load unless the video tag contains the muted attribute (Safari needed the playsinline attribute). Then, after autoplay starts, your app can provide an unmute button to allow the user to toggle off the video's muted attribute, and everything will work.

Have a look at the last commit for the details of how you can implement autoplay on your own subscriber.

I'm pretty sure this is the cause, but please let me know either way if that solves the problem for you.

Good luck,
Michael.

Hi Michael,

i have tried but it does not seem to work. Am using in Ubuntu, Chrome browser (version 72.0.3626.119) to test. I also ensure my chrome settings is either set with "Default" or "No user gesture required". but it still unable to play despite incoming data.

@michaelfig
Copy link
Owner

Okay, then it wasn't that issue.

Have you set the RTC_ANNOUNCED_IPV4 environment variable to an IP address that the client can use to contact the mediasoup server, before running the broadcast example?

If you are running in a VM, you may have special routing requirements.

Also, you can look at chrome://webrtc-internals to see the actual connections. The byte counts are sent to you from the broadcast example WebSocket connection, so they may not reflect what your client is actually receiving, just what Mediasoup is sending you.

Michael.

@eekpie
Copy link

eekpie commented Apr 5, 2019

Second this: Worked fine on MS 2.2x? but not working on 2.6.12. It shows I am receiving data but no video. Audio is untested.

Hope that helps. If I have time to dig I'll help too

Edit: Possibly the mediasoup-client.js is outdated

@eekpie
Copy link

eekpie commented Apr 5, 2019

Solved by replacing mediasoup-client v2.4.10:
https://raw.githubusercontent.com/versatica/mediasoup-client/v2/dist/mediasoup-client.js
-sorry not setup here to git fiddle

@michaelfig
Copy link
Owner

Thanks for the diagnosis! I've changed the npm install to automatically upgrade app/mediasoup-client.js as well.

@savsofts
Copy link

Hi
I have same issue in android 10 google chrome browser (chrome v81).
Audio is coming but no video. i checked console log video bits are receiving..
Issue with some devices (say 2 out of 10). No firewall in network.
using mediasoup-client v2.4.10
Any idea please?

@savsofts
Copy link

I fixed issue by changing H.264 into VP8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants