Converting from UYVY to Y-only (8-bit)

Often, video material is provided in a common file-format called Abekas, or UYVY. Generally sequences are either single-, or multi-, file in nature, and either do or don't have header information.

For the purposes of Colour-Recovery work, we know that our source material is black&white, therefore files in UYVY form are carrying a lot of unused baggage. Through conversion to Y-only form, we can jettison all this redundant information and produce source files of half the size. This has benefits in storage and transfer of data.

I've written a 32-bit Windows command line driven application that can be used for converting UYVY content files to Y-only. This is provided as an executable file here.
(This could be used, for instance, in conjunction with the Colour Recovery application that Richard Russell has contributed).

It's been written to be fairly flexible. You can specify whether the input is 1920x1080 or 720x576, the frame offset from the beginning of a sequence that you wish to start, the size of the input file headers (if any), whether the input is single- or multi-file based, and the number of digits used in the multi-file counter. (e.g. 7 digits in the case of "DrW_ep3_0020012.yuv", "DrW_ep3_0020013.yuv", "DrW_ep3_0020014.yuv", ... )

usage: UYVY2Y input_filename_prefix input_filename_ext output_file [HD/SD(1/0)] [start_frame (Default 0)] [header size (in bytes) (Default 0)] [Single/Multi file(0/1)(Default single)] [no. digits in counter (Default 7)]

e.g. Create a single Y-only file from the 345th frame of a single 1080line UYVY file sequence, with 1024 byte header.
UYVY2Y input .uyvy output.y 1 345 1024
e.g. Create a single Y-only file from the 20123rd frame of a 1080line UYVY multi-file sequence, with 1024 byte headers, and seven digits in the counter.
UYVY2Y input .uyvy output.y 1 20123 1024 1 7

The command line interface to the program is a bit fragile, so treat it with respect and care. [Maybe one day I'll have time to improve the parameter parsing. ;-) ]
The rule with the command line is : parameters in square brackets are optional, but if you want to use a particular parameter then you have to specify all the preceding parameters.


James Insell 19/06/2008