eizedev / AirConnect-Synology

Updated AirConnect packages for Synology NAS and Synology Router
https://github.com/philippe44/AirConnect
MIT License
308 stars 14 forks source link

Video Support #31

Closed mdeckereu closed 2 years ago

mdeckereu commented 3 years ago

Hi there,

I was wondering if it would be possible to integrate also video für UPNP and Chromecast.

Currently, by using AirConnect with Chromecast capable apps (e.g. Youtube / Youtube Music), common Chromecast Devices are shown but no longer seperated but only through AirConnect. It would be nice to still being able to use those Chromecast native apps but also having support for it in Airplay-only Apps.

Cheers, Matt

eizedev commented 3 years ago

Hi @mdeckereu Can you please explain it a little more?

If I understand your request correctly, when you play a video on your device, you would like to output the audio stream via AirConnect to a Chromecast enabled speaker, right?

In most cases, this will not work because AirConnect is an audio-only application. Do not expect to play a video on your device and have the audio from UPnP/Sonos or ChromeCast synchronized. This does not work (technical limitations).

You could also check the official documentation here

Here is a short quote of the section:

Many have asked for a way to do video/audio synchronisation so that UPnP (Sonos) players
can be used as speakers when playing video on a computer or tablet (YouTube for example).
Due to this RTP-to-HTTP bridging, this cannot be done as the exact time when an audio frame is played
cannot be controlled on the HTTP client.
AirPlay speakers can achieve that because the iPhone/iPad/MAC player will "delay" the video by a known amount,
send the audio in advance (usually 2 sec) and then control the exact time when this audio is output by the speaker.
But although AirConnect has the exact request timing and maintains synchronization with the player,
it cannot "relay" that synchronization to the speakers.
UPnP protocol does not allow this and Sonos has not made their protocol public.
Sometimes you might get lucky because the video-to-audio delay will almost match the HTTP player delay,
but it is not reproductible and will not be stable over time.
eizedev commented 2 years ago

Closed due to inactivity. If the issue is still relevant, please let me know.