This page tries to explain how to cut small sample file from .ts or from .m2ts file. These samples are sometimes crucial for fixing AVIdemux bugs and because of this, developers might ask you to provide one.
You can use any binary file cutting tool for the job (this applies to Transport Stream files). In this tutorial we will guide the process with Virtualdubs hex editor (for Windows users) and with dd command (Linux and Mac OS X).
Virtualdub is video editor, but the software also contains build-in hex editor that we are going to use. Process itself is very simple.
Now that you have created a new sample file, test it out in AVIdemux. If it causes same issues as the original one, then share it to us.
dd is basic tool that comes with Unix-based operating systems. It can be used for many tasks, but in this case we use it to create sample files.
dd if=recorded_from_DVB_tuner.ts of=sample_for_avidemux.ts bs=20M count=1
If dd complains something like “dd: bs: illegal numeric value”, then don't use M, but instead input the value as bytes, e.g.
dd if=recorded_from_DVB_tuner.ts of=sample_for_avidemux.ts bs=20000000 count=1
Now that you have created a new sample file, test it out in AVIdemux. If it causes same issues as the original one, then share it to us.