This is an old revision of the document!
This page tries to explain how to cut small sample file from .ts or from .m2ts file. This 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. 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.
1. Download and install Virtualdub (you can use .zip version, no need to install) 2. Open Virtualdub (VirtualDub.exe) 3. Open Tools → Hex editor… (which should open a new window, the VirtualDub Hex Editor) 4. From that VirtualDub Hex Editor window, choose File → Open… and select the .ts or .m2ts file you want to use 5. The window should be filled with text (nothing to worry about), and you can then select Edit → Extract segment… which should open Extract file segment window 6. From the Extract file segment window, keep the Address (hex) as 0 and to the Length (hex) field you enter how many bytes you want to have in sample file. E.g. if you want to make sample file with size of 20 megabytes (20 000 000 bytes), then use value 1312D00. After you have selected the value, press OK. New file saving dialog jump to the screen and you use it to select where you want to save file (and give it a filename).
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.