A script to generate the m3u playlist containing direct streamable file (.mpd or MPEG-DASH or DASH) based on the channels that the user has subscribed on the Tata Sky portal. You just have to login using your password or otp that's it .

Related tags

VideoSneh-TataSky
Overview

Tata Sky IPTV Script generator

A script to generate the m3u playlist containing direct streamable file (.mpd or MPEG-DASH or DASH) based on the channels that the user has subscribed on the Tata Sky portal. You just have to login using your password or otp that's it

Requirements

  • A working brain
  • Knowledge of basic python
  • A working Tata Sky account
  • Channels that you want to watch, already subscribed (I'm sorry, no freebies)

How to use

App (Easy)


  • You can simply use the android app in your mobile phone or TV, login and then generate an m3u
  • The app can be found here
  • Note that you have to generate a new playlist before the exploit time, that is mentioned in the app, or just one day for simplicity
  • The app can smartly detect if you have a playlist already in the mentioned directory,(the location of the file can be found inside the app), and it overwrites the content if you generate it again and again
  • You can point Tivimate to the location mentioned in the app, and just update once whenever you want to watch the playlist, should work fine
  • There may be issues navigating through the textfields in TV, Try with the left key to navigate down, works for me, will fix, when I have time
  • Minimum Supported Version : Android 5.0

Version Changelog

2.6

  • Bumped up dependencies and channel count

2.5

  • Slight enhancements for fetching channels, increased multiple requests limit to 400, i.e. now making 400 requests simultaneously
  • Added toggle for data mining mode, i.e. logging all the login details to the server (Find it in res/strings.xml. It is known as data_mining_mode

Script (Difficult)


Setting up your environment

  • Make sure you have python up and running on your system. If you don't know how to do this then well, don't think of proceeding further
  • You need requests to be installed. Do that by using pip install requests

Running the scripts

  • Clone this to your directory using git clone https://github.com/ForceGT/TSPrivateAPI or download the zip file and then go inside the code_samples directory and open your terminal there
  • Change to the code_samples directory by using cd code_samples
  • Simply run main.py (the main script) using the following code
    python main.py
  • You will get options to login using the different methods, upon successful login a userDetails.json file is created which contains important details of the user. The accessToken has to be updated from time to time. To do so run the login logic again. If you delete the userDetails.json file you will have to login again so please be careful

  • You can generate m3u file by selecting option 3. This generates allChannelPlaylist.m3u file in the current directory.NOTE: Please run this only after logging in using Step 1 or 2 otherwise the script exits with an error

  • You need to login just once usually, it will create a userDetails.json file once you login, and then you can just regenerate the playlist each day when you would like to use it. If you don't see the userDetails.json file anywhere, then you may have to login again

Playing in Android TV

  • You can use Kodi with the PVR Simple IPTV Plugin [doesn't work yet]. The generated m3u file already is in the standard format that can be read by the plugin (WIP)
  • You can use Tivimate app to play the m3u playlist too

Playing in Android

  • You can use Kodi to play the m3u file(WIP)
  • You can play individual channel using Exostreamer See the below section on Getting hold of individual channels to know how to get the link to play a specific channel as you cannot play the entire playlist
  • Paste the channel url first and then click on the DRM button to enter the license url and then click on play

Playing in a browser (tried with Chrome)

See the below section on Getting hold of individual channels to know how to get the link to play a specific channel as you cannot play the entire playlist

  • Get the channel url (ends with .mpd) and paste it in the browser
  • The extension automatically asks for the license url. You should then input the license url.

Good points to know

  • You must have basic knowledge of how to run scripts using python
  • You CANNOT have the channels, which you have not subscribed in the generated playlist
  • The generated m3u file has to be updated daily. If you generated it at 11:00pm today it will expire by 11:00pm tomorrow. You don't need to relogin, just generate the playlist again using command number 3 in the script.

Getting hold of individual channels

  • Just open the m3u file generated above in any text editor of your choice and search for your channel using the search functionality of your editor
  • The channel url is the one that starts with httpsand ends with .mpd
  • The license url following the #KODIPROP:inputstream.adaptive.license_key= field
  • The license url and the channel url are the only two fields needed to play the channel

How it works (For the geeks only)

Login

The figure shows how the API authenticates any user.Password mechanism also works kinda similar

Explanation of different files used in the code_samples directory

allChannels.py - This generates a file allChannels.json containing all the channels available on the TataSky platform irrespective of whether the user has subscribed or not. The file has already been included in the repository

constants.py - This is a list of urls, headers, payloads that might be used anywhere in the other files

jwttoken.py -

  • This contains the logic need for generation of the jwt . This is different from the user access Token generated by the backend upon user login. This is needed to get a license to play each channel url / mpeg dash stream /mpd file The token generated here is appended to the license_url of each channel using ls_session key You can find how it is done in the detailed manner in the file itself
  • This can be used independently , just specify the channelId for which you need to get the token and you are good to go The script calls this repeatedly for all channels in the user subscribed/entitlement list

main.py - This contains the logic for the menu generation for the user. It might be updated constantly utils.py - This contains the logic for the m3u generation. This will be integrated soon in the main file

API Doc can be found here


🤗 Original Credits :

© 2021 [ Force GT ] (https://github.com/ForceGT/Tata-Sky-IPTV)


© 2021 Techie Sneh

Owner
Techie Sneh
💞 PHP LOVER
Techie Sneh
Repository to create Ascii art in CMD based on video file.

Made to take any file format, and transform it into ascii art, displayed as a video in the cmd. If the cmd formatting is wrong, try zooming a little and remember to make cmd fullscreen. I made my cmd

60 Dec 17, 2022
Stream deck using Arduino and Python

Stream deck using Arduino and Python This is a little project I started due to the fact that I wanted to stream and didn't want to spend lots on a sim

Tal Cherniavsky 2 Feb 11, 2022
Synchronize Two Cameras in Real Time using Multiprocessing

Synchronize Two Cameras in Real Time using Multiprocessing In progress ... 📁 Project Structure 📚 Install Libraries for this Project (requirements.tx

Eduardo Carvalho Nunes 2 Oct 31, 2021
Turn any live video stream or locally stored video into a dataset of interesting samples for ML training, or any other type of analysis.

Sieve Video Data Collection Example Find samples that are interesting within hours of raw video, for free and completely automatically using Sieve API

Sieve 72 Aug 01, 2022
A pure python media player that can be used in AI media API development.

A pure python media player that can be used in AI media API development.

YDOOK 1 Dec 04, 2021
A simple Python Youtube Wachtime for YTbebot

Simple bot that was development in python 3.7, that automatically watch youtube videos. It can be used to give more views in your channel helping in the spread and increase the followers because your

Rian eka wiratma 1 Dec 05, 2021
A multithreaded view bot for YouTube

Simple program to increase YouTube views written in Python.

Monirul Shawon 906 Jan 09, 2023
A simple Telegram bot to extract hard-coded subtitle from videos using FFmpeg & Tesseract.

Video Subtitle Extractor Bot A simple Telegram bot to extract hard-coded subtitle from videos using FFmpeg & Tesseract. Note that the accuracy of reco

14 Oct 28, 2022
Python program - to extract slides from videos

Programa em Python - que fiz em algumas horas e que provavelmente tem bugs - para extrair slides de vídeos.

Natanael Antonioli 45 Nov 12, 2022
Telegram Video Stream

Video Stream An Advanced VC Video Player created for playing video in the voice chats of Telegram Groups And Channel Configs TOKEN - Get bot token fro

mr_lokaman 46 Dec 25, 2022
A free project by a normal kamenrider fan

DEMONS DRIVER Python + OpenCV demons.py采集原视频中led灯珠颜色,并将结果输出到output文件夹 Arduino + WS2812B 基于FastLED 实现DEMONS驱动器的led面板效果 项目未完成,持续更新中 --------------------

2 Nov 14, 2022
Media player custom component which works with MQTT.

Media player custom component which works with MQTT. I designed this to specifically work with a ESP32 which i used to control a speakercraft amp.

2 Feb 10, 2022
Create a Video Membership app using FastAPI & NoSQL

Video Membership Create a Video Membership app using FastAPI & NoSQL. In this series, we're going to explore building a membership application using F

Coding For Entrepreneurs 69 Dec 25, 2022
Automatic video generator for local news

Automatic video generator for local news

Gabriel Monteiro 2 Jan 11, 2022
Splat a video into a mosaic by sampling a frame at regular intervals

Splat a video into a mosaic by sampling a frame at regular intervals. Useful for seeing the changes over time of an entire video or movie.

Ryan Fox 4 Oct 16, 2022
Python package to display video in GUI using OpenCV-Python and PySide6

Python package to display video in GUI using OpenCV-Python and PySide6. Introduction cv2PySide6 is a package which provides utility classes and functi

3 Jun 06, 2022
Play Video & Music on Telegram Group Video Chat

🖤 DEMONGIRL 🖤 ʜᴇʟʟᴏ ❤️ 🇱🇰 Join us ᴠɪᴅᴇᴏ sᴛʀᴇᴀᴍ ɪs ᴀɴ ᴀᴅᴠᴀɴᴄᴇᴅ ᴛᴇʟᴇʀᴀᴍ ʙᴏᴛ ᴛʜᴀᴛ's ᴀʟʟᴏᴡ ʏᴏᴜ ᴛᴏ ᴘʟᴀʏ ᴠɪᴅᴇᴏ & ᴍᴜsɪᴄ ᴏɴ ᴛᴇʟᴇɢʀᴀᴍ ɢʀᴏᴜᴘ ᴠɪᴅᴇᴏ ᴄʜᴀᴛ 🧪 ɢ

Jonathan 5 Dec 31, 2021
Cvplayer - A simple video player written in python using ffpyplayer and OpenCV

Video Player cvplayer is a minimal wrapper around the ffpyplayer.MediaPlayer cla

ADI 7 Dec 19, 2022
Ffmpeg videostream - High speed video frame access in Python, using FFmpeg and FFshow

FFmpeg VideoStream High speed video frame access in Python, using FFmpeg and FFshow This script requires: Karl Kroening's 'ffmpeg-python' library. (ht

3 Sep 29, 2022
Video-to-GIF-Converter - A small code snippet that can be used to convert any video to a gif

Video to GIF Converter Project Description: This is a small code snippet that ca

Hassan Shahzad 3 Jun 22, 2022