Go to file
Dan Bryant 8b27c97bb8 update for Qt5 on Windows 2019-08-10 22:52:51 +01:00
libmediation update for building on Windows 2019-07-28 22:49:07 +01:00
tsMuxer update for building on Windows 2019-07-28 22:49:07 +01:00
tsMuxerGUI update for Qt5 on Windows 2019-08-10 22:52:51 +01:00
.gitignore add libmediation, update make_pair functions to be usable with C++11, update Makefile for modern systems and bring readme up-to-date 2019-07-23 23:05:20 +01:00
CHANGELOG.md add libmediation, update make_pair functions to be usable with C++11, update Makefile for modern systems and bring readme up-to-date 2019-07-23 23:05:20 +01:00
LICENSE Initial commit 2019-07-15 16:18:54 +01:00
README.md update for Qt5 on Windows 2019-08-10 22:52:51 +01:00

README.md

tsMuxer

Vision

This project is for tsMuxer - a transport stream muxer for remuxing/muxing elementary streams. This is very useful for transcoding and this project is used in other products such as Universal Media Server.

EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS.

Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.

Some of the major features include:

  • Ability to set muxing fps manually and automatically
  • Ability to change level for H.264 streams
  • Ability to shift a sound tracks
  • Ability to extract DTS core from DTS-HD
  • Ability to join files
  • Output/Author to compliant Blu-ray Disc or AVCHD
  • Blu-ray 3D support

Ethics

This project operates under the W3C's Code of Ethics and Professional Conduct:

W3C is a growing and global community where participants choose to work together, and in that process experience differences in language, location, nationality, and experience. In such a diverse environment, misunderstandings and disagreements happen, which in most cases can be resolved informally. In rare cases, however, behavior can intimidate, harass, or otherwise disrupt one or more people in the community, which W3C will not tolerate.

A Code of Ethics and Professional Conduct is useful to define accepted and acceptable behaviors and to promote high standards of professional practice. It also provides a benchmark for self evaluation and acts as a vehicle for better identity of the organization.

We hope that our community group act according to these guidelines, and that participants hold each other to these high standards. If you have any questions or are worried that the code isn't being followed, please contact the owner of the repository.

Language

tsMuxer is written in C++. It can be compiled for Windows, Linux and Mac.

History

This project was created by Roman Vasilenko, with the last public release 20th January 2014. It was open sourced on 23rd July 2019, to aid the future development.

Installation

All executable are created to be portable, so you can just save and extract the compressed package for your platform.

Todo

The following is a list of changes that will need to be made to the original source code and project in general:

  • swapping custom includes from libmediation to their standard library equivalents
  • the code uses my_htonl, my_ntohll, etc - these can be swapped for the standard library versions
  • the program currently only compiles 32-bit executables, even on 64-bit systems, a multi-architecture approach is needed
  • consider making static executables for Linux, to make the program more portable
  • build for Windows requires Visual Studio 2017 and compiling through GUI - we need to create a Makefile equivalent
  • create a multi-platform build pipeline, maybe using dockcross or if that doesn't work creating a custom WinPE image just for compiling on Windows
  • both Windows and Linux builds require extra files to be downloaded and manually copied into place in order for the builds to succeed - we need to work on that

Contributing

Were really happy to accept contributions from the community, thats the main reason why we open-sourced it! There are many ways to contribute, even if youre not a technical person.

Were using the infamous simplified Github workflow to accept modifications (even internally), basically youll have to:

  • create an issue related to the problem you want to fix (good for traceability and cross-reference)
  • fork the repository
  • create a branch (optionally with the reference to the issue in the name)
  • hack hack hack
  • commit incrementally with readable and detailed commit messages
  • submit a pull-request against the master branch of this repository

Well take care of tagging your issue with the appropriated labels and answer within a week (hopefully less!) to the problem you encounter.

If youre not familiar with open-source workflows or our set of technologies, do not hesitate to ask for help! We can mentor you or propose good first bugs (as labeled in our issues). Also welcome to add your name to Credits section of this document.

Submitting bugs

You can report issues directly on Github, that would be a really useful contribution given that we lack some user testing on the project. Please document as much as possible the steps to reproduce your problem (even better with screenshots).

Building

Linux

For these examples we have successfully used Ubuntu 19 64-bit and Debian 10 64-bit.

First we have to install the pre-requisites. On Debian 10 you have to enable the "buster-backports" repo. Then on Debian or Ubuntu you can run the following to install all required packages:

# add 32-bit architecture 
sudo dpkg --add-architecture i386
sudo apt-get update

# download/install dependencies
sudo apt-get install build-essential \
flex \
libelf-dev \
libc6-dev \
binutils-dev \
libdwarf-dev \
libc6-dev-i386 \
g++-multilib \
qt5-qmake \
qtbase5-dev \
qtdeclarative5-dev \
qtmultimedia5-dev \
libqt5multimediawidgets5 \
libqt5multimedia5-plugins \
libqt5multimedia5
libfreetype6-dev \
upx \
zlib1g-dev \
git

# on Ubuntu:
sudo apt-get install checkinstall
sudo apt-get install libfreetype6-dev:i386
sudo apt-get install qt5-default

# on Debian:
sudo apt-get -t buster-backports install checkinstall
sudo apt-get install libfreetype6-dev:i386
sudo apt-get install qt5-default

With all the dependencies set up we can now actually compile the code.

Open the folder where the git repo is stored in a terminal and run the following:

# build libmediation
cd libmediation
make -j$(nproc)

# compile tsMuxer to ../bin
cd ..
cd tsMuxer
make -j$(nproc)

# generate the tsMuxerGUI makefile
cd ..
cd tsMuxerGUI
qmake

# compile tsMuxerGUI to ../bin
make -j$(nproc)

# create lower case links, then create installable deb package and move it to $HOME
cd ../bin
ln -s tsMuxeR tsmuxer
ln -s tsMuxerGUI tsmuxergui
sudo checkinstall \
    --pkgname=tsmuxer \
    --pkgversion="1:$(./tsmuxer | \
                      grep "tsMuxeR version" | \
                      cut -f3 -d " " | \
                      sed 's/.$//')-git-$(\
                      git rev-parse --short HEAD)-$(\
                      date --rfc-3339=date | sed 's/-//g')" \
    --backup=no \
    --deldoc=yes \
    --delspec=yes \
    --deldesc=yes \
    --strip=yes \
    --stripso=yes \
    --addso=yes \
    --fstrans=no \
    --default cp -R * /usr/bin && \
mv *.deb ~/
cd $HOME

Windows

To compile tsMuxer and tsMuxerGUI on Windows you will require Visual Studio 2017 Community Edtion. You can run the installer from here.

When selecting the installer options please specify:

  • Visual Studio core editor
  • Just-In-Time debugger
  • Visual C++ core desktop features
  • VC 2017 version ... tools
  • C++ profiling tools
  • Visual C++ ATL for x86 and x64
  • Windows 8.1 SDK and UCRT SDK
  • MSBuild Tools
  • Visual C++ Build Tools core features
  • Visual C++ 2017 Redistributable Update
  • Windows 10 SDK
  • Visual C++ tools for CMake
  • Testing tools core features - Build Tools
  • C++/CLI support

Next you will need to set up the Windows build dependencies. At the moment these aren't portable, so you will have to follow these steps exactly or the build will fail. We need to set up Freetype and Zlib as they aren't included in the MSVC libraries.

You can download a compressed archive of these files here or here.

Once you download the package you have to install it, you need to extract the ZIP directly into the root of the C:\ drive (I know, this needs to be improved!). If the path "C:\windev2\include" exists you know it is set up correctly.

With all the dependencies set up we can now actually compile the code.

Firstly, to compile tsMuxer open the tsMuxer.sln file in Visual Studio, right click the name of the solution and select "Build". Output files are created in ..\bin.

Next to compile tsMuxerGUI you will require a Qt5 installation that is compatible with Visual C++ 2017. For this example we will be using Qt 5.12, as that is the LTS release. You can download it here.

Next to compile tsMuxerGUI you will require a Qt4 installation that is compatible with Visual C++ 2017. This is not generally available, so must be installed manually - again, this is not portable, so you will have to follow these steps exactly or the build will fail.

You can download a compressed archive of a Qt 4.8.7 installation compiled for MSVC++ 2017 32-bit from here or here.

Once you download the package you have to install it, you need to extract the ZIP directly into the root of the C:\ drive (I know, this needs to be improved!). If the path "C:\Qt\qt-4.8.7-vs2017-32\bin" exists you know it is set up correctly.

To compile tsMuxerGUI you need to open the tsMuxerGUI folder in a command prompt and then run the following commands:

set PATH=C:\Qt\Qt5.12.4\5.12.4\msvc2017\bin;%PATH%
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars32.bat"
qmake
nmake
copy bin\tsMuxerGUI.exe ..\bin\
copy C:\Qt\Qt5.12.4\5.12.4\msvc2017\bin\Qt5Core.dll ..\bin\
copy C:\Qt\Qt5.12.4\5.12.4\msvc2017\bin\Qt5Gui.dll ..\bin\
copy C:\Qt\Qt5.12.4\5.12.4\msvc2017\bin\Qt5Multimedia.dll ..\bin\
copy C:\Qt\Qt5.12.4\5.12.4\msvc2017\bin\Qt5Network.dll ..\bin\
copy C:\Qt\Qt5.12.4\5.12.4\msvc2017\bin\Qt5Widgets.dll ..\bin\

You will find the following files will be created in ..\bin:

  • Qt5Core.dll
  • Qt5Gui.dll
  • Qt5Multimedia.dll
  • Qt5Network.dll
  • Qt5Widgets.dll
  • tsMuxerGUI.exe

Financing

We are not currently accepting any kind of donations and we do not have a bounty program.

Versioning

Version numbering follows the Semantic versioning approach.

License

Were using the Apache 2.0 license for simplicity and flexibility. You are free to use it in your own project.

Credits

  • Roman Vasilenko - for creating tsMuxer