Code Monkey home page Code Monkey logo

ttxfromts's Introduction

TtxFromTS

TtxFromTS is a command line utility which decodes teletext services from a recorded DVB MPEG transport stream file. It can output decoded services as TTI or T42 files, or as a stream of Teletext packets to standard out or a web socket. TTI files are compatible with vbit2.

TtxFromTS is a cross platform application, available for Windows, macOS, and Linux.

Where to download it

The latest version of TtxFromTS can be downloaded from the project release page on GitHub.

How to use it

TtxFromTS can be run from the command line (e.g. Command Prompt, Terminal, PowerShell, etc). You can use arguments to set the file to be decoded and the application options.

By default TtxFromTS will output TTI files, which will be placed in a subdirectory of the current working directory with the same name as input file.

These arguments are available to use:

  • -i (required) The input transport stream file.
  • --pid (required if service ID not specified) The packet identifier of the teletext elementary stream to be decoded.
  • --sid (required if packet ID not specified) The identifier of the television service containing the teletext service to be decoded.
  • --list-services Outputs a list of services and their service identifiers. The PID and SID arguments aren't required if this is used.
  • --cycle The cycle time to be used between subpages in seconds. Must be greater than 1 second, defaults to 10 seconds.
  • --include-subs Enables decoding of teletext subtitle packets.
  • --no-config Disables creation of a vbit2 configuration file when outputting TTI files.
  • --type The type of output required. Valid options are TTI, T42, StdOut and WebSocket. Defaults to TTI.
  • --port The port number to be used by the WebSocket server. Defaults to port 80.
  • --output The path of the directory to output the TTI files to, or the path of the T42 file to be created.

Example Command Line

TxtFromTS --pid 1234 -i "C:\Path\To\File.ts"

I've found a problem

If you've found a bug, please file a new issue on the project issues page.

How to contribute

If you are a developer and would like to contribute to this library, you are welcome to do so.

All contributions for bug fixes and new features should be submitted as a pull request. Information on how to do this can be found on GitHub's help pages.

There are no formal coding convensions for the source code, but you should try to match the coding style of the existing source code files.

Prerequisites

Before the project can be built, you must first install the .NET 5.0 SDK on your system.

The project has been written in the C# programming language. The source code contains projects and configuration for development in Visual Studio, Visual Studio for Mac, or Visual Studio Code.

Cloning the Repository

You can clone the repository using the following command:

git clone https://github.com/orryverducci/TtxFromTS.git

Building a development build

You can build a development build of the application using the following command:

dotnet build

You can also run a development build using the following command, replacing the pid and i arguments with appropriate ones for your use case:

dotnet run -- --pid 1234 -i "C:\Path\To\File.ts"

Building a release build

You can build an optimised release build of the application, published for a specific operating system, using the following command:

dotnet publish --runtime win-x64 --configuration Release

win-x64 will need to be replaced with an appropriate runtime indentifier for the desired operating system and system architecture. Valid values are win-x86, win-x64, win-arm64, osx-x64, linux-x64 and linux-arm.

What's the license

This software is distributed under the terms of the Modified BSD License. Full terms can be read in LICENSE.md included in the source code.

This software uses the Cinegy Transport Stream Decoder Library, which is distributed under the terms of the Apache License 2.0.

ttxfromts's People

Contributors

dwilliamsuk avatar orryverducci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dwilliamsuk

ttxfromts's Issues

German ARD teletext not being extracted

Description

While trying to extract teletext from the German ARD channel (which displays in VLC), I noticed that teletext extraction does not work with TtxFromTS.

Steps To Reproduce

  1. Download ard.zip and extract the TS file
  2. Run TtxFromTS -i ard.ts --sid 1 --type t42 test.ts
  3. Output says:
 TtxFromTS 2.0

[INFO] Found PMT PID for the service: 50
[INFO] Found teletext elementary stream PID: 3000
[INFO] Reading TS file: 10%
[INFO] Reading TS file: 20%
[INFO] Reading TS file: 30%
[INFO] Reading TS file: 40%
[INFO] Reading TS file: 50%
[INFO] Reading TS file: 60%
[INFO] Reading TS file: 70%
[INFO] Reading TS file: 80%
[INFO] Reading TS file: 90%
[INFO] Reading TS file: 100%

[STATISTICS]
Total number of packets: 56273
Packets processed: 5903
Teletext packets written: 0

Expected Behavior

Teletext gets extracted

Additional Information

All other German channels seem to work fine.

Support single-stream TS files without specifying PID or SID

Feature to be added

Allow running without the --sid or --pid option if there is only one stream in the TS file.

What problem is the feature trying to resolve?

I am trying to extract teletext from IP TV streams. Each stream only has one channel on it, not more. While most channels have SID 1, some preserve the SID from the DTT broadcast that is being converted to IPTV. This makes it hard to add new channels to an automated pipeline, since I first need to run --list-services on it to get the SID.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.