Live stream: intermittent disconnects when using Blackmagic devices

Hi,

I’m testing out Cloudflare Stream with a Blackmagic Web Presenter HD, however it doesn’t seem able to keep the connection up.

The upload speed of the connection is good and when I stream to another endpoint (for example Twitch) with the same device there is no problem. I did a MTR to live.cloudflare.com which shows some packet loss at one hop.

I’m unsure how to proceed with debugging. Any tips? Thanks!

|------------------------------------------------------------------------------------------|
|                                      WinMTR statistics                                   |
|                       Host              -   %  | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|                             192.168.1.1 -    0 |  101 |  101 |    0 |    0 |    0 |    0 |
|                              37.152.8.1 -    0 |  101 |  101 |    8 |    9 |   21 |    8 |
|                           178.238.96.89 -    0 |  101 |  101 |    8 |    9 |   38 |    8 |
|redhosting-globsw.telecity2.openpeering.nl -  0 |  101 |  101 |    8 |   10 |   23 |    9 |
|         telehouse-north2.openpeering.nl -    0 |  101 |  101 |   14 |   17 |   69 |   15 |
|                   linx-lon1.as13335.net -   60 |   30 |   12 |    0 |   50 |  153 |   18 |
|                            172.70.160.2 -    0 |  101 |  101 |   15 |   19 |   46 |   15 |
|                           172.65.29.121 -    0 |  101 |  101 |   15 |   16 |   28 |   15 |
|________________________________________________|______|______|______|______|______|______|
   WinMTR v0.92 GPL V2

Hey! We can setup peering on AMS-IX and NL-IX which would relieve the issue here. This would make it so you get routed to our Amsterdam datacenter rather than the one in London. We just emailed the internet exchanges.

1 Like

That’s great! Thanks for the quick reply and keep us posted :slight_smile:

1 Like

Hey @renan, how long does it usually take to switch the routing? I just did a traceroute again and saw the traffic still going trough London.

This is going to take some long time it seems like. I’ve pinged the team internally on it.

Just to make sure; are you sure the routing is the issue? Network packet loss should not be consistently there. Is there a chance you’re having authentication issues?

Are you able to go live from OBS using the same connection? Perhaps the issue has to do with the Blackmagic device, which we can try to figure out internally as well by buying a test unit.

Ok i tried a little more. On the same connection ffmpeg doesn’t seem to have any problem keeping the stream up for 10 minutes and counting. I assumed it was the routing, but it might actually be the Blackmagic Web Presenter. The same Web Presenter doesn’t have any problem streaming to an nginx-rtmp server.

Ok got it. I was just looking at the docs and are you sure the Blackmagic Web Presenter supports RTMPS? I will also try to buy one to try for myself.

It supports streaming to Facebook and YouTube, which is also RTMPS. So that should work.
EDIT: It’s not. That’s plain RTMP.

You have to add custom service via a custom XML file in the Web Presenter. For the record this is my XML file.

<?xml version=”1.0” encoding=”UTF-8”?>
<streaming>
	<service>
		<name>Nginx</name>
		<servers>
			<server>
				<name>Main</name>
				<url>rtmp://xxxxx/stream</url>
			</server>
		</servers>
		<profiles>
			<profile>
				<name>Streaming High</name>
				<config resolution="1080p" fps="60">
					<bitrate>9000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
				<config resolution="1080p" fps="30">
					<bitrate>6000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
			</profile>
			<profile>
				<name>Streaming Medium</name>
				<config resolution="1080p" fps="60">
					<bitrate>7000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
				<config resolution="1080p" fps="30">
					<bitrate>5000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
			</profile>
			<profile>
				<name>Streaming Low</name>
				<config resolution="1080p" fps="60">
					<bitrate>5000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
				<config resolution="1080p" fps="30">
					<bitrate>3000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
			</profile>
		</profiles>
	</service>
	<service>
		<name>Cloudflare</name>
		<servers>
			<server>
				<name>Main</name>
				<url>rtmps://live.cloudflare.com:443/live/</url>
			</server>
		</servers>
		<profiles>
			<profile>
				<name>Streaming High</name>
				<config resolution="1080p" fps="60">
					<bitrate>9000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
				<config resolution="1080p" fps="30">
					<bitrate>6000000</bitrate>
					<audio-bitrate>130000</audio-bitrate>
				</config>
			</profile>
			<profile>
				<name>Streaming Medium</name>
				<config resolution="1080p" fps="60">
					<bitrate>7000000</bitrate>
					<audio-bitrate>128000</audio-bitrate>
				</config>
				<config resolution="1080p" fps="30">
					<bitrate>4500000</bitrate>
					<audio-bitrate>128000</audio-bitrate>
				</config>
			</profile>
			<profile>
				<name>Streaming Low</name>
				<config resolution="1080p" fps="60">
					<bitrate>4500000</bitrate>
					<audio-bitrate>128000</audio-bitrate>
				</config>
				<config resolution="1080p" fps="30">
					<bitrate>3000000</bitrate>
					<audio-bitrate>128000</audio-bitrate>
				</config>
			</profile>
		</profiles>
	</service>
</streaming>

Hey @raymon, where does the RTMPS key go in the XML? Shouldn’t the server URL be like:
rtmps://live.cloudflare.com:443/live/<your_rtmps_key>?

1 Like

There is a field for that in the user interface. For security reasons it’s not in the preset.

Hi @raymon,
Does this XML content work for you? I am trying to stream a live video to Cloudflare’s server with the same XML content as yours (Cloudflare part) from a Web Presenter 4K (1080p resolution). The text “ON AIR” is still blinking, which means that the connection to the Cloudflare server is impossible. Do you have any idea what could be happening?

Hey @PEC-OTNTV, Yes. This is the XML we run in production on a Blackmagic Web Presenter HD. We don’t have the 4K model. It does connect to Cloudflare, but keeps disconnecting like this topic describes.

OK. @raymon thank you for this confirmation. So I don’t understand why I can’t reach the connection step… I continue to investigate. Thanks again for your time

<Hello @renan , Blackmagic just told me that none of their devices support RTMPS. They can only stream via RTMP. I find this very curious since @raymon says he can stream to Cloudflare from his Web Presenter HD… Is it possible to configure a stream with RTMP protocol instead of RTMPS in Cloudflare?

Hi,
I also using Blackmagic, but Atem mini pro.
When I do live stream with RTMP, It also can do but disconnect often.
and can not work properly all the way.
As you mention this, I can guess RTMPS is the reason.
As Atem is the market reader, I hope RTMP support.

In the meantime I tried multiple Blackmagic devices, including an ATEM Mini Pro. The behavior is the same. Blackmagic products and Cloudflare stream seem incompatible. Blackmagic tells YouTube and Twitch streamers to not use RTMPS, only RTMP. I think this is deferentially the culprit.

I’m watching this for a resolution as well. My church congregation is hoping to migrate off of Facebook to stream our services, but we aren’t going to move away from the ATEM Mini Pro that we are using in order to do so. Blackmagic devices are widespread, it would certainly be helpful to support them

Well at least it’s good to know that I’m not the only one with problems regarding Blackmagic devices. I hope @renan and others on the Cloudflare Stream team can take a look at it soon.

The routing from the network I’m using in NL is improved a lot. It doesn’t have packet loss any more and goes via the NL-IX in Amsterdam instead of London. Awesome!

|------------------------------------------------------------------------------------------|
|                                      WinMTR statistics                                   |
|                       Host              -   %  | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|                             192.168.1.1 -    0 |   74 |   74 |    0 |    0 |    0 |    0 |
|                              37.152.8.1 -    0 |   74 |   74 |    8 |   10 |   33 |   32 |
|                           178.238.96.89 -    0 |   74 |   74 |    8 |   10 |   25 |   22 |
| redhosting-globsw.nikhef.openpeering.nl -    0 |   74 |   74 |    8 |   11 |   41 |   22 |
|          cloudflare.telecity2.nl-ix.net -    0 |   74 |   74 |    9 |   15 |   39 |   21 |
|                           172.65.29.121 -    0 |   74 |   74 |    9 |   11 |   23 |   21 |
|________________________________________________|______|______|______|______|______|______|
   WinMTR v0.92 GPL V2

Did you manage to get hold of a Blackmagic Web Presenter for some local testing @renan @zaid? The intermittent disconnects do still happen. Routing issues are ruled out on our end now.

Hi everyone!

I have an ATEM Mini Pro ISO device that’s successfully connected to the Cloudflare RTMPS url - however I’m also facing constant disconnects in testing the service.

Every couple of mins our device’s On Air status starts flashing which means its disconnecting. We have live outputs to YouTube and Facebook and when our On Air starts flashing, both of these platforms show no data being received.

I’m running this out of Bangkok, Thailand and on a very stable Fibre connection with 500mbps uploads with the stream using around 10mbps.

In testing, we also use ProPresenter which allows us to overlay graphics - version 7 also allows us to directly stream from the software - however the same issue occurs with constant disconnections.

any one have any ideas on what is going on?

                             My traceroute  [v0.95]
macbookpro15-2.local (2001:fb1:f8:48ea:54e7:cce6:9fb7:d2022-03-18T16:13:46+0700
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 2001:fb1:f8:48ea:6620:e0ff:fe73:  0.0%   505    2.7   8.4   1.4 258.3  14.2
 2. 2001:fb1:fe0:2f::1                0.0%   505    8.0  11.1   2.5 226.7  14.5
 3. 2001:fb1:fe0:2f::                 0.0%   504   15.4   9.5   2.7 132.3   7.2
 4. 2001:fb0:1099:99::301             0.0%   504   13.8  12.5   3.3  56.8   8.5
 5. 2001:fb0:1099:99::360             0.0%   504    8.8  14.3   5.5 580.7  29.9
 6. 2001:fb0:1:19:171:102:254:65      2.6%   504   14.5  14.3   5.6 476.4  23.7
 7. 2001:fb0:1:10:171:102:254:9      71.4%   504   10.7  14.0   5.1 372.4  31.0
 8. 2405:4000:800:1::190              1.8%   504    6.8  12.2   4.7 267.5  12.8
 9. 2405:4000:900:3::a3               0.0%   504   11.5  13.6   4.7 342.6  17.3
10. 2606:4700:60:0:6cc:fbc2:190b:ff5  0.0%   504    7.3  12.9   4.6 373.8  19.7