INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: IEEE 802.1AS - Precise synchronization- is the answer to sync in ethernet stack?  (Read 14886 times)

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

Is the below something you guys have looked at?
It needs to be implemented in MC20 server/renderer and end rendering devices, as well as the switches from what I can see.

I particularly like this quote from a squeezebox thread a couple years ago. ;)
"The pre-condition is that the different MediaServers and MediaRenderers in the home are synchronized to the same master clock and support the appropriate clock synchronization protocol (such as NTP, IEEE 802.1AS).

 which equals to "Our spec is perfect. It's your job, dear developer, through the use of unobtainium, to guarantee the ridiculous preconditions we set for this system to work. If you just do that, you will see that it works perfectly"."

From : http://forums.slimdevices.com/archive/index.php/t-95603.html



IEEE 802.1AS - Precise synchronization

AVB devices periodically exchange timing information that allows both ends of the link to synchronize their time base reference clock very precisely. This precise synchronization has two purposes:
To allow synchronization of multiple streams
To provide a common time base for sampling/receiving data streams at a source device and presenting those streams at the destination device with the same relative timing.

The protocol used for maintaining timing synchronization is specified in IEEE 802.1AS, which is a very tightly-constrained subset of another IEEE standard (IEEE 1588), with extensions to support IEEE 802.11 and also generic “coordinated shared networks” (CSNs – examples include some wireless, coaxial cable, and power line technologies). IEEE 1588 is used for industrial control and test and measurement applications.

 Figure 3 – Clocking hierarchy
An 802.1AS network timing domain is formed when all devices follow the requirements of the 802.1AS standard and communicate with each other using the IEEE 802.1AS protocol. Within the timing domain there is a single device called the grandmaster that provides a master timing signal. All other devices synchronize their clocks with the grandmaster as shown in Figure 3.

The device acting as grandmaster can either be auto selected or can be specifically assigned (e.g., if the network is used in a professional environment that needs “house clock” (audio), or "genlock" (video), or if the timing hierarchy needs to be specified for other reasons). AVB devices typically exchange capability information after physical link establishment. If peer devices on a link are network synchronization capable they will start to exchange clock synchronization frames. If not, then an AVB timing domain boundary is determined (as shown in Figure 2).

From:
http://en.wikipedia.org/wiki/Audio_Video_Bridging

And... some more interesting reading:

http://www.edn.com/design/audio-design/4006336/2/Will-Ethernet-AV-help-unify-home-networks

http://stereos.about.com/b/2013/11/13/avb-the-new-standard-in-wireless-audio.htm

https://avb.statusbar.com/page/developer-faq/

https://tools.ietf.org/html/draft-williams-avtext-avbsync-00

And slightly related.
http://www.globaltv.com.au/broadcast-engineering/ethernet-based-live-television-production

A range of AVB switches discussed here:
http://support.biamp.com/Tesira/AVB/List_of_AVB-capable_Ethernet_switches

Demo of AVB vs Airplay at the bottom of this Blog: (recommend looking at their Brick and Bullet on the main page too) :)
http://www.avb.io/blog


If your exhausted just reading my post without even looking through the links.... you can see why AirPlay and Sonos have the consumer market..... for now.
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

Opensource software implementation for Linux and windows
http://code.google.com/p/ptpv2d/

How cool is this.. a little over the top @ $800... but 64 AVB streams in a PCI-E NIC.
http://echoavb.com/products/streamware-nic-1

The Intel I210 AVB NIC for $50.
http://www.amazon.com/Intel-I210-T1-Network-Adapter-E0X95AA/dp/B00ESFF2JC

Motu 5 port AVB switch $300
http://www.amazon.com/MOTU-9305-AVB-Switch/dp/B00M8IA7AU/ref=sr_1_1?s=electronics&ie=UTF8&qid=1422960680&sr=1-1&keywords=AVB

Netgear 24port AVB capable switch ~$200 - need to allow another ~$160 for the optional AVB license. (EAV license)
http://www.bhphotovideo.com/c/product/1077916-REG/netgear_gs724t_400nas_prosafe_gs724tv4_ethernet_switch.html

Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392

Is the below something you guys have looked at?

I don't understand your point. (And no I did not read all your links either). Are you suggesting that this (whatever it is) may be a replacement for UPnP?

If that is indeed your point, then I guess my "answer" would be this one single link http://upnp.org/membership/list/ ;)
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

Actually it's not a replacement but a new OPEN standard for 2ms synchronized AV distribution over Ethernet cable.

It can work as a stand alone network or in a hybrid 10/100/1000 network with AVB compliant switches and devices and normal Ethernet non-compliant devices.
It also works over 802.11 wifi , the time stamping time critical part anyway.

Most of this AVB stuff has been confined to the pro audio arena but it's just starting to filter down into consumer goods now. (Apple Macs with Thunderbolt)

My point is that this is believed to be the new open standard to eventually replace closed AirPlay and Sonos type systems.
Sonos are making an Open API now as they must know AVB is a medium term threat. (combined with the pressures of having to stream content)
Apple have already built AVB compliant hardware into their thunderbolt enabled MACs and OSX too..  That says something about what may happen in the next 2-3 years.

The OEM embedded AVB devices I linked to above create some interesting opportunities for the brave.


With the few components I listed above you could easily make a very cost effective AVB compliant Ethernet network.
A Netgear core 24 port switch for a large network for $360 + $50 per PC or a smaller 5 port network for $300 + $50 per PC port.

In theory MC20 would stream the audio from a server with an intel I210 NIC to a AVB switch and each PC with a intel I210 NIC could be a zone. (and eventually if it takes off, embedded AVB devices would be zones)
It may require more software development work, but the hardware is designed to be plug and play and the libraries are all open source for Linux, Windows and OSX.
https://github.com/audioscience/avdecc-lib

Technically it could replace HDMI, though I doubt the movie studios would allow that in consumer gear!
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10788

Why would AVB have any higher chances than UPnP/DLNA? They are equally open and cover the same things, and many more companies are signed up for UPnP, and it doesn't need switch support (why would it ever need that anyway?)
Logged
~ nevcairiel
~ Author of LAV Filters

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

I don't think I can answer that question as I don't understand enough. But I'll give it a try.

UPnP is overly complicated and doesn't operate at a low enough level in the network stack to be accurate enough and reliable enough for synchronised multicast.
I believe primarily because you need a single master clock to manage a packet switched network which has not yet been implemented in UPnP. Even with that spec implemented it wont be as accurate as AVB.
https://mail.gnome.org/archives/rygel-list/2013-January/msg00043.html

PS. note the references throughout the spec to 802.1AS - maybe they will build the AVB spec into UPnP 2?

AVB has been built around the single premise that "thou shalt be synchronised by a master clock" down to the micro second level.  
Sure it's primarily a Pro audio standard at the moment, but it hasn't yet been butchered and is starting to be widely used outside pro audio for AV distribution solutions.
It's a dark horse to be watched.

If you really want to know. Drop this guy a line on linkedin. He's one of the founding members of AVB and was also on the UPnP steering committee.
https://www.linkedin.com/in/johngildred


Here's another interesting thread discussing synchronized playback.
Post #2 - "I don't have one yet, but I ordered a Merging Hapi a couple of days ago with the premium cards in and out. It uses the same Ravenna AES67 ethernet that the consumer NADACs will use. I will use it with both my mac JRiver server and my windows JRiver server."
http://www.whatsbestforum.com/showthread.php?16625-NAS-Ethernet

First consumer Ethernet DAC - 2 channel and multichannel DACS using the same AVB standard.
http://www.audiostream.com/content/merging-technologies-nadac

Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392


By the way, I forgot to mention that the UPnP specification utilizes 802.1AS as one of the permitted time synchronization technology platforms used to support the AVTransport ClockSync feature that underlies its SyncPlay/SyncStop/SyncPause command set. You may want to study the specifications here...

http://upnp.org/specs/av/UPnP-av-AVTransport-v3-Service.pdf
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

By the way, I forgot to mention that the UPnP specification utilizes 802.1AS as one of the permitted time synchronization technology platforms used to support the AVTransport ClockSync feature that underlies its SyncPlay/SyncStop/SyncPause command set. You may want to study the specifications here...

http://upnp.org/specs/av/UPnP-av-AVTransport-v3-Service.pdf


hmmmm, I read it and it sure does supports synchronised playback..... providing you have 802.1AS as an underlying sync master clock (or another), which, as in my first post;
 
The pre-condition is that the different MediaServers and MediaRenderers in the home are synchronized to the same master clock and support the appropriate clock synchronization protocol (such as NTP, IEEE 802.1AS)

which in developer land translates too...  

"Our spec is perfect. (UpNP) It's your job, dear developer, through the use of unobtainium, to guarantee the ridiculous preconditions we set for this system to work. If you just do that, you will see that it works perfectly"

Because:
Other than the pro audio commercial applications of 802.1AS for AVB and AES etc over Ethernet, a widely adopted master clock solution for NTP or 802.1AS for use by UpNP doesn't exist.

So:
We need 802.1AS (AVB) as a pre-condition for UpNP to support synchronous playback. Or another widely adopted Master Clock solution. NTP might work.

To do 802.1AS AVB you need the network solution I mentioned above with an end to end 802.1AS compliant Ethernet system, so why not just use the native capabilities of 802.1AS.

(BTW I did get ASIO multicast running at home over 3 streams but without the underlying masterclock it wasn't reliable in its synchronisation)
Setting up NTP with a master clock might work over a standard network... with some devices... time for some more research. :)

This is where I'm starting my round of NTP research.
http://www.eecis.udel.edu/~mills/ntp/html/hints/winnt.html


Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392

You think that UPnP is not perfect. Probably right, nothing is. But why do you suppose that 400 manufacturers (including all majors except Apple) are supporting it? And why do you suppose Apple is not supporting it. (Be honest). And what makes you think those people will drop everything that they have invested in that, and jump on your horse instead?
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

You think that UPnP is not perfect. Probably right, nothing is. But why do you suppose that 400 manufacturers (including all majors except Apple) are supporting it? And why do you suppose Apple is not supporting it. (Be honest). And what makes you think those people will drop everything that they have invested in that, and jump on your horse instead?

Hi again... :)

I've installed NTP services on all my MC20 machines which was extremely simple.
It would appear though that MC20 linked zones doesn't take advantage of some of the clock sync features in the spec. I could be wrong...
Whether NTP is on or off though it makes no difference to sync of linked zones.

I looked on the UpNP database and I cant see these features in the supported features list for JRiver server or renderer. (though it's probably out of date - last update for JRiver was 2011)
http://www.upnp-database.info/device.jsp?deviceId=344

From what I've seen no one is using this spec but other synchronised playback systems are using RTSP/RTP/NTP.
AirPlay uses all three plus Multicast DNS and HTTP.

We can probably get sync working over zones if the CLOCKSYNC feature is enabled in MC20 for linked zone playback? Is it possible without too much work?
I have the relevant section from the spec below and a list of the required features.

Requires:
NTP Service installed and running on all clients and servers.
upnp:resExt::clockSync@deviceClockInfoID
upnp:resExt::clockSync@supportedTimestampsID
ContentDirectory::GetFeatureList() action for MediaServers
ConnectionManager::GetFeatureList() action for MediaServers
ConnectionManager::GetFeatureList() action for MediaRenderers.

5.1. Synchronized playback
It is possible to instruct one or more MediaRenderers to start playing back of a Content Item at a specific time.
The same can be done for operations such as pausing and stopping.
These operations are possible using the AVTransport::SyncPlay(), AVTransport::SyncPause() and AVTransport::SyncStop() actions.

The pre-condition is that the different MediaServers and MediaRenderers in the home are synchronized to the same master clock and support the appropriate clock synchronization protocol (such as NTP, IEEE 802.1AS).

Information about the clock synchronization of the different devices can be obtained by the control point using the ContentDirectory::GetFeatureList() action and the ConnectionManager::GetFeatureList() action for MediaServers and the ConnectionManager::GetFeatureList() action for MediaRenderers.

In order to determine if the MediaServer is capable of streaming synchronized content, the control point uses the content’s upnp:resExt::clockSync@deviceClockInfoID and upnp:resExt::clockSync@supportedTimestampsID properties to locate the specific details about the synchronization protocol that will be used.

The control point does this via the MediaServer’s ConnectionManager service <Feature> element containing the CLOCKSYNC feature within the MediaServer’s feature list.

Specifically, the control point finds the <DeviceClockInfo> and <supportedTimestamps> elements whose @id values match the content’s upnp:resExt::clockSync@deviceClockInfoID and upnp:resExt::clockSync@supportedTimestampsID property values, respectively. Consequently, the control point identifies the clock sync protocol (e.g. 802.1AS), timestamp mechanism (e.g. ‘RTP-1733’) and the ID of the master clock to whom the MediaServer’s internal clock is synchronized.

Then, by examining the MediaRenderer’s <DeviceClockInfo> element within the <Feature> element containing the CLOCKSYNC feature from the MediaRenderer’s ConnectionManager service feature list, the control point determines that the MediaRenderer supports CLOCKSYNC feature, and identifies the clock sync protocol (802.1AS), timestamp mechanism (e.g.‘RTP-1733’) and the ID of the master clock to whom the MediaRenderer’s internal clock is synchronized.

Based on the comparison of information from the MediaRenderer and the MediaServer, the control point derives the conclusion whether the selected content can be played on the specified MediaRenderer in a precision time-synchronized manner.

As described above, the control point can invoke the ConnectionManager::GetFeatureList() action in order to determine the specific details of the synchronized playback supported by the device hosting the ConnectionManager service.

The <syncProtocolID> element of the <Feature> element containing the CLOCKSYNC feature enumerates the clock synchronization protocol that was used to synchronize the implementation’s local time-of-day clock.

The possible clock synchronization protocols include 802.1AS, NTP (Network Timing Protocol) and SNTP (Simple Network Timing Protocol) protocols. 802.1AS clock synchronization protocol enables precision synchronization (accuracy exceeding 1 micro-second), thus enabling usages such as synchronized audio and video playback. For other usages such as party music being piped to multiple rooms, NTP and SNTP protocols may provide sufficient clock synchronization accuracy.

Similarly, the <masterClockID> element of the <Feature> element containing the CLOCKSYNC feature identifies the master clock to which this implementation has synchronized its local time-of-day clock. Depending on the clock synchronization protocol, the <masterClockID> element specifies either the 8-byte binary sequence (<High 24-bits MAC> 0xFF 0xFE <Low 24-bits MAC>) in case of 802.1AS, or the URL of the time server in case of NTP or SNTP.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10788

Linked Zones in MC do not use UPnP/DLNA. When MC talks to another MC, it uses its own thing.
Logged
~ nevcairiel
~ Author of LAV Filters

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

Linked Zones in MC do not use UPnP/DLNA. When MC talks to another MC, it uses its own thing.

Ahhh well that explains that then..
I know it seems I'm getting all hot an bothered over AVB and 802.1AS, but if MC20 can be made to work with the UpNP clocksync spec with NTP, I see no reason to make things more complicated.

Build a NTP clock service into MC20, add the required UpNP clocksync features, rewrite zonelinks code and Bobs your uncle. ;) oh if only it were that simple. :)

So what are the chances?
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14277
  • I won! I won!

I'd ask the same Q differently, does JR want to spend dev effort to add Whole House media playback (in sync), if the answer is Yes (and I've not seen JR say this yet), then the question would be to what devices:
- DLNA
- Remote
- Airplay
- Sonos
- All of the above!

...then what tech needs to be supported should fall out
- DLNA V2 with a master clock (802.1AS??)
- Airplay nativly or via an existing API (Tuneblade?)
- Sonos API
- Internal code changes for Remotes
etc
etc

Thanks
Nathan
Logged
JRiver CEO Elect

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

I'd ask the same Q differently, does JR want to spend dev effort to add Whole House media playback (in sync), if the answer is Yes (and I've not seen JR say this yet), then the question would be to what devices:
- DLNA
- Remote
- Airplay
- Sonos
- All of the above!

...then what tech needs to be supported should fall out
- DLNA V2 with a master clock (802.1AS??)
- Airplay nativly or via an existing API (Tuneblade?)
- Sonos API
- Internal code changes for Remotes
etc
etc

Thanks
Nathan

And I thought I was optimistic. :)

I know this is a bit cheeky... but all they need to do is...

Work out for each;

Cost of Dev$ and Time to Market to start making $ (soonest at the lowest cost)
Customer base$ (quick $ - they are a business after all)
New Sales$ (That's a tough one!)

Minus
Delays or cancellation of other projects and their associated $

In a nutshell workout the feature that has the broadest appeal that will make the most dollars in the shortest amount of time.
Do a marketing survey with an online tool like survey monkey, to the customer base to market test. (or a forum poll)

Example

To get synchronous audio playback;
1. Would you:
A) Wait for the Upgrade to MC21
B) Buy an add-on to MC20 with a discount towards MC21
C) Not interested

2. Are you MOST interested in synchronous audio for: (you can only choose 1)
A) DLNA / UPnP for JRiver Linux/Windows/OSX Servers and Players (including JRemote and Gizmo) (no other devices on the market at the moment with clocksync support)
B) AirPlay Devices
C) Sonos Devices
D) Google Cast
E) All the Above
F) Other (specify)

3. Would you rather wait a couple years for Sync Audio and get better:
A) Theatre View
B) Blu-Ray Support
C) Streaming Support (Youtube, Netflix)
D) TV Support
E) No I really really must have Sync Audio

My vote goes -
B) Buy an add-on to MC20 with a discount towards MC21 (please take my money now!)
A) DLNA / UPnP for JRiver
E) No I really really must have Sync Audio


All the above is more a long term goal and not very realistic. :)

PS. I believe in fairies and unicorns  :P







Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14277
  • I won! I won!

I'll take it all!  Well, I'll take what I'm Given............... but we are yet to hook convince JR that it exciting enough!
Logged
JRiver CEO Elect

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

Another incentive... Zone Sync Audio with Intel Stick or the equivalent Intel NUC... hmmmmmmmmm
Logged

mcw

  • Recent member
  • *
  • Posts: 35

AVB may be a very good bet.

Meyersound appears onboard ....http://meyersound.com/product/d-mitri/avb.htm

Looks like Harman is leaning towards it too....see pg 6-  http://hiqnet.harmanpro.com/content/images/misc/hiqnet_guide_to_audio_networking.pdf

Pro today, consumer tomorrow?

Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

AVB may be a very good bet.

Meyersound appears onboard ....http://meyersound.com/product/d-mitri/avb.htm

Looks like Harman is leaning towards it too....see pg 6-  http://hiqnet.harmanpro.com/content/images/misc/hiqnet_guide_to_audio_networking.pdf

Pro today, consumer tomorrow?



Thanks enjoyed the read!
Yeah it may get traction with consumer goods, but it's a bit too soon to tell. At least Apple is already onboard and the cost of the hardware is already reasonable. The standard is completely open and free from royalties too.  Have to wait and see.  In the meantime we still have TuneBlade and AirPlay which has been working really well for me for a week now.

Oh and there's still the possibility for ClockSync with UPnP which shouldn't be written off.
Personally I think there will be 3 ways going forward.

1. MC Single Zone with Third Party multi-zone streaming (TuneBlade/AirFoil and AirPlay for the MC tinkerers)
2. Multi-Zone with UPnP 2 (for the general 'Joe' population)
3. Multi-Zone with AVB (for the pro home installation)

1. Works well enough for now
2. Is a pipe dream at the moment
3. Is workable now if you're prepared to invest
Logged
Pages: [1]   Go Up