Search the Community
Showing results for tags 'youtube live'.
-
HOW TO - Watch Youtube Live/Twitch streams on Emby with TVHeadend
Facy5 posted a topic in Tools and Utilities
Hello everyone ! Seeing a lot of people want to add Youtube Live channels in their IPTV section, and knowing you can't simply add a Youtube Live stream link in your .m3u because YTLive links change every 3 to 6h (unless you want to edit your playlist and refresh Emby everytime, which would be a nightmare), this is a (quiet long) tutorial to show you how to make Youtube Live (but also Twitch or Dailymotion) streams work like a real TV channel in Emby. I based this how to on my own knwoledge (basically none in Linux, a lot of trial and error), and the tutorial by Carlos Gomes, available here : https://cgomesu.com/blog/Tvhlink/ All the tutorial is setup on a Windows 10 machine. You will need : - a Windows 10 (build 19041 and higher) or Windows 11 machine - Windows subsystem for Linux (can be version 1) - WSL to make short - a Linux distribution of your choice (preferably Debian or Ubuntu) - TVHeadend - Streamink - the TVHeadend plugin from the Emby plugin store 1) Install Windows subsystem for Linux. For Windows 10 below build 19041 : Open Powershell in admin mode, copy/past these commands : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart The Linux distributions available are : Ubuntu, Debian, kali-linux, Ubuntu-18.04, Ubuntu-20.04, Ubuntu-22.04, OracleLinux_8_5, OracleLinux_7_9, SUSE-Linux-Enterprise-Server-15-SP4, openSUSE-Leap-15.4 , or openSUSE-Tumbleweed. Then, still in the Powershell, download your distribution of your choice : To install Ubuntu 22.04 : curl.exe -L -o ubuntu.appx https://aka.ms/wslubuntu2204 For Debian : curl.exe -L -o debian.appx https://aka.ms/wsl-debian-gnulinux Then restart the computer. Optional : If you want to install WSL 2, check this link by Microsoft : https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package For Windows 10 build 19041 and higher : In the Command Prompt (or in Windows Terminal, available in the Windows Store) in admin mode, with WSL 2 already installed : (without the < > ) wsl --install -d <Distribution Name> For Ubuntu 22.04 : wsl --install -d Ubuntu-22.04 or, for Debian : wsl --install -d Debian Then restart the computer. 2) Install TVHeadend Go to the download page : https://tvheadend.org/projects/tvheadend/wiki/AptRepositories For Ubuntu, the easy way is to install via PPA : sudo apt-add-repository ppa:mamarley/tvheadend-git sudo apt update sudo apt install tvheadend For Debian, because the distribution can't handle PPA, to have to do this : curl -1sLf \ 'https://dl.cloudsmith.io/public/tvheadend/tvheadend/setup.deb.sh' \ | sudo -E bash Then after, the usual : sudo apt update sudo apt install tvheadend Once TVHeadend, and all its dependancies, donwloaded and installed, the install wizard will automatically be launched. You just have to create an admin ID and a password, leave the rest by default. 3) Install Streamlink ! For Debian, make sure you have backports repositories installed, otherwise you will get an older version of Streamlink and cause Python errors in TVHeadend ! echo "deb http://deb.debian.org/debian bullseye-backports main" | sudo tee "/etc/apt/sources.list.d/streamlink.list" sudo apt update sudo apt -t bullseye-backports install streamlink 4) Start the TVHeadend server : sudo tvheadend Wait a little, untill you see this line in blue (of course, the number version could vary with future update) : [ NOTICE] START: HTS Tvheadend version 4.3-2106~g9e1eb89be started Go to the webserver page of TVHeadend : http://localhost:9981/ Warning ! If after entered your admin ID, the page show you a 403 Forbidden error, type : sudo tvheadend -C It will show you the post install wizard to configure admin ID's (keep the same as the install) and a client ID (you can just keep the same ID as the admin account). Now : a) set up TVHeadend -> https://cgomesu.com/blog/Tvhlink/#basic-configuration b) create an automatically updated .m3u with Youtube Live/Twitch ... -> https://cgomesu.com/blog/Tvhlink/#automatic-network-of-livestream-channels If you create your .m3u from Windows (with Notepad ++ for exemple), I strongly suggest you to save it in your Linux home folder. Once done, you need to modify the permission of your .m3u, otherwise TVHeadend won't have the permission to handle it. To do so : cd path/of/your/playlist/ chmod +rwx yourplaylist.m3u Basically, your .m3u shoud look like this : #EXTM3U #EXTINF:-1 tvg-id="ChannelID.ShortCountryCode" tvg-country="ShortCountryCode",Name of the channel pipe:///usr/bin/env streamlink --stdout --default-stream best --url https://www.youtube.com/user/ChannelName/live 5) Install the TVHeadend plugin You can find it in the Emby plugin store, in the Live TV category. Once installed, restart your Emby server. Then, in the admin pannel, in the Live TV section : Add a new TV source -> select TVHeadend If you installed the TVHeadend server on the same computer of the Emby server, change the Tvheadend Server Web Interface URL with : http://127.0.0.1:9981 instead of http://localhost:9981 If you installed on another computer of your network, enter its local IP adress, and the port number : 9981 Enter admin ID and password -> Save Refresh data guide. Now Emby can play Youtube Live/Twitch/Dailymotion (and many others) livestreams ! (If I have some time, I could edit this post with pictures. if I misspelled or misspoke something, please forgive me, English isn't my mother tongue.)- 1 reply
-
- 2
-
- youtube live
- twitch
-
(and 8 more)
 Tagged with: