Streaming from Youtube to Flussonic
Flussonic Media Server can't ingest video directly from Youtube for many reasons. I don't want to talk about it, it's a theme for a separate article, but I show you an example how to restream from Youtube to Flussonic.
I will do it with open-source program named youtube-dl. Here is official documentation.
In Ubuntu you can install it via
apt install youtube-dl
Note: There is an old version in Ubuntu repository, some stream can't be downloaded with it. Go to official website to get the latest version of youtube-dl program.
Ok, youtube-dl is installed, go to your Youtube account and copy link to any video. I will use "Falcon Heavy Test Flight " from Trending tab.
Video name: Falcon Heavy Test Flight Link: https://www.youtube.com/watch?v=bCc16uozHVE
youtube-dl has a lot of options, but the default values are suitable for Flussonic in most cases.
Don't forget that Flussonic can accept only h264 video, but Youtube can stream with VP9 codec or with incompatible audio.
Our support team can't help you with it because YouTube content and
youtube-dl are not out products, but we can try on the terms of extended support.
youtube-dl -o - https://www.youtube.com/watch?v=bCc16uozHVE | /opt/flussonic/contrib/rtmp_publish -re -i - -c copy -bsf:v h264_mp4toannexb -f mpegts http://127.0.0.1/mylive/spacex/mpegts
This command download video and redirects to ffmpeg input, ffmpeg packing video to mpegts container and pushing to Flussonic stream mylive/spacex.
mylive is a default Flussonic's live location, spacex - stream name. Read more in the article about publishing video to Flussonic.