Introducing BabaTV!!! 1.0

 Hi guys this is babaman studios and instead of a game we created a software that allows you to watch live TV for free on your computer!

Here is a trailer!


A simple Python app to stream live TV channels using mpv and tkinter. BabaTV is a lightweight, easy-to-use application for streaming live TV channels directly on your desktop.

Features:

  • Browse and play hundreds of free live TV streams from around the world
  • Simple and intuitive Tkinter-based graphical interface
  • Powered by mpv for smooth, high-quality video playback
  • Channels organized by name for quick access
  • No accounts, no subscriptions – just open and watch

SYSTEM REQUIREMENTS: VLC meadia player 64 bit should be installed.(for windows)

NOTE: This is not illegal in any way, these streams are from youtube.



Now you guys are wondering why babaman studios created a TV, it is a game development studio. Well the thing is I wanted to watch the news but well it ain't free anymore. You have to pay subscriptions and stuff. Don't get me started about watching on the computer. So I used my programming skills to create this software and well I want to share it with others too so here I am.

DW on BabaTV

HOW DO I STREAM IT?

Now let's get into it.  So there are 2 important libraries used here to stream.

  • VLC = To display the video
  • yt-dlp = To process the streaming links
There are other libraries as well:

  • Tkinter = To display the babatv control window
  • sys = To mange files
  • os = to mange file
Now this is a snippet of the program responsible for streaming:
def get_stream_url(url):
ydl_opts = {
'format': 'best',
'quiet': True,
'noplaylist': True,
}

with yt_dlp.YoutubeDL(ydl_opts) as ydl:
info = ydl.extract_info(url, download=False)
return info['url']
def channel_run():
global player, number

url = channel_selection(number)
stream_url = get_stream_url(url)

if player:
player.stop()

player = vlc.MediaPlayer(stream_url)
player.play()
Now let's break this down:
These 2 lines of code:

These are 'functions' the 'def'' part declares that there is a function here. then the blue text is the name. So the lines under them with indentation, will run if I type the blue text with brackets. So for example this code:

can be run many times just by typing get_stream_url().
Now the get_stream_url basically configures VLC setting and extract the video from the link.
Now the channel_run() has 4 main parts:


This part just calls variables player and number. Variables hold values, so 'player' holds a value and we are calling it to access it's value. Same with number.

The first line pulls out the url from a txt file (shown in video). Now we put the url into the previous function we discussed 'get_stream_url', which will turn the link into video format and also configure vlc settings.

This allows the computer to have the ability to actually close the video player when it wants to.

The first line makes the video part. vlc.MediaPlayer() commands asks for a video for vlc to play and inside the bracket 'stream_url' has video information. Now last line, player.play() starts player the video.


What I showed is how I stream youtube live streams using python and how I display it.

The remaining part of the code includes:
  • Babatv control window programming using tkinter.
  • Taking data (channel names and links) from txt files.
  • File management.


Now guys, babatv will also be launched on linux arm64 mabye amd. I have already created the beta snap for it, (it doesn't work for now). With name babatv-channels. This is 1.0 only so I will make more changes in the later version so mates
STAY TUNNED!

Comments

Popular Posts