User Tools

Site Tools


tutorial:cut_ts_sample

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
tutorial:cut_ts_sample [2011/06/19 12:09]
agent_007 created
tutorial:cut_ts_sample [2011/06/19 13:28]
agent_007 swap image
Line 1: Line 1:
 ====== Cut TS sample ====== ====== Cut TS sample ======
-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.+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. In this tutorial we will guide the process with Virtualdubs hex editor (for Windows users) and with dd command (Linux and Mac OS X).  ​+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 (for Windows users) ==== ==== Virtualdub (for Windows users) ====
 Virtualdub is video editor, but the software also contains build-in hex editor that we are going to use. Process itself is very simple. Virtualdub is video editor, but the software also contains build-in hex editor that we are going to use. Process itself is very simple.
 +  * Download and install Virtualdub (you can use .zip version, no need to install)
 +  * Open Virtualdub (VirtualDub.exe)
 +{{:​tutorial:​vdub_logo.png|}}
 +  * Open **Tools -> Hex editor...** (which should open a new window, the //​VirtualDub Hex Editor//)
 +{{:​tutorial:​vdub_toolshex_l.png|}}
 +  * From that VirtualDub Hex Editor window, choose **File -> Open...** and select the .ts or .m2ts file you want to use
 +{{:​tutorial:​vdub_fileopen_l.png|}}
 +  * 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
 +{{:​tutorial:​vdub_extract_segment_l.png|}}
 +  * 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).
 +{{:​tutorial:​vdub_extract_segment2.png|}}
  
-1. Download and install Virtualdub (you can use .zip versionno need to install) +Now that you have created a new sample file, test it out in AVIdemuxIf it causes same issues as the original onethen share it to us. 
-2Open Virtualdub ​(VirtualDub.exe+ 
-3. Open **Tools ​-> Hex editor...** (which should open a new window, the //​VirtualDub Hex Editor//) +==== dd (for Linux/Mac OS X users==== 
-4. From that VirtualDub Hex Editor window, choose //​File ​-Open...// and select ​the .ts or .m2ts file you want to use +dd is basic tool that comes with Unix-based operating systemsIt can be used for many tasks, but in this case we use it to create sample files
-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 windowkeep 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 valuepress **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).+  ​- Open console/terminal ​and move to the folder where the original ​file is located ​(you can use **cd** command to move around ​file system) 
 +  - Input command that cuts sample from file, it is something like dd if=original.ts of=sample.ts bs=20M count=1, where if indicates input fileof indicates output filebs=20M sets the size of output file, and count says we only write one blockOne example below 
 +<code bash> 
 +dd if=recorded_from_DVB_tuner.ts of=sample_for_avidemux.ts bs=20M count=1 
 +</​code>​
  
 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. 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.
tutorial/cut_ts_sample.txt · Last modified: 2012/11/11 08:51 (external edit)