No weird or unmaintained softwares or libraries are involved in this guide, just VLC, Avahi and youtube-dl
.
VLC supports Chromecast since version 3.0.0 (2018-02-09). Just go to Playback -> Renderer
.
vlc --sout "#chromecast" --sout-chromecast-ip=$IP --demux-filter=demux_chromecast "$input"