video3x version 0.1 LGPL 3+ Copyright 2011 Vadim Druzhin Call: vi3x -i in[:arg] -o out[:arg] [-f filter[@frames][:arg] ...] [options] or: vi3x -h [-i in ...] [-o out ...] [-f filter ...] [options] or: vi3x --full-help [options] SYNTAX: in - specifies an input module (i.e., 420p). out - specifies an output module (i.e., null). filter - specifies a filter module (i.e., timecode). arg - presents a list of module parameters in the form: name1=value1,name2=value2 and so on. If a value is 1, it may be omitted (name2 means name2=1). frames - presents a list of frame ranges in the form: f1-f2,f3-f4 and so on. The frame numbering starts from 1, ranges are inclusive (11-20 means process 10 frames including frames 11 and 20). The 1-frame range may be specified with a single number (11-11 is equal to just 11). The frames are counted for each filter individually, so if some filter in the chain changes a frame rate (adds or drops frames) the frame numbering will be shifted. I.e., after an inverse telecine filter the 30th frame becomes the 24th frame for consecutive filters. Full vi3x command line may look like this: vi3x -i 420p:w=640,h=480 -o 420p -f toonclean:demo -f timecode@100-200:x=10,y=10 OPTIONS: -h|--help - display this help text. If you need a help for specific module, add the module specification to the command line: vi3x -h -o 420p -o null -f timecode --full-help|--fullhelp|--full_help - display the help for all modules. -l|--log log_file - log all messages to a file. -i|--input in[:arg] - select the input module. This is a mandatory option. -o|--output out[:arg] - select the output module. This is a mandatory option. -f|--filter filter[@frames][:arg] - append the filter module to a filter chain. This option may be used multiple times. -t|--test - initialize the filter chain, but don't process any input. *** INPUT MODULES: ** 420p: Import raw frames in the planar 420p color space - Author: Vadim Druzhin - Version: 0.1 The frames are read from the standard input. Parameters: * w: Frame width - Value range: 2 ... oo - Default: 0 The frame width must be even. * h: Frame height - Value range: 2 ... oo - Default: 0 The frame height must be even, and must be divisible by 4 for interlaced frames. * il: Interlacing mode of chroma planes - Values: 0, 1 - Default: 1 0 - use progressive upsampling; 1 - use interlaced upsampling. * mpeg1: Sample position of chroma planes - Values: 0, 1 - Default: 0 0 - assume MPEG-2 sample position; 1 - assume MPEG-1 sample position. * fps: Frame rate - Value range: 1 ... oo - Default: 25 * fps_div: Frame rate divisor - Value range: 1 ... oo - Default: 1 The divisor required to specify non-integer frame rates. I.e., NTSC frame rate is: fps=30000,fps_div=1001. *** OUTPUT MODULES: ** null: Dummy export module, just outputs video parameters - Author: Vadim Druzhin - Version: 0.1 This module is useful for scripting. ** 420p: Export raw frames in the planar 420p color space - Author: Vadim Druzhin - Version: 0.1 The frames are written to the standard output. Parameters: * mpeg1: Sample position of downsampled chroma planes - Values: 0, 1 - Default: 0 0 - assume MPEG-2 sample position; 1 - assume MPEG-1 sample position. * il: Interlacing of downsampled chroma planes - Values: -1, 0, 1 - Default: -1 -1 - use the frame interlacing flag; 0 - force progressive downsampling; 1 - force interlaced downsampling. *** FILTER MODULES: ** toonclean: Cartoon-oriented denoise filter - Author: Vadim Druzhin - Version: 0.1 This filter performs a spatial and temporal denoise while preserving sharp edges, also supports an automatic noise level detection. Parameters: * denoise: Strength of spatial denoise - Value range: 0 ... 32 - Default: 2 The 0 value disables spatial denoise, big values will make the processing extremely slow without a visible effect. Recommended values are in the range of 1-4. * level: Luma noise level (the pixel value difference) - Value range: -1 ... 255 - Default: -1 The -1 value means auto-detect, 0 disables denoise in the luma plane. The typical values are in the range of 4-12. * level_c: Chroma noise level (the pixel value difference) - Value range: -1 ... 255 - Default: -1 The -1 value means auto-detect, 0 disables denoise in the chroma planes. The typical values are in the range of 2-6. * depth: Depth of the temporal denoise buffer - Value range: 0 ... oo - Default: 1 The buffer combines past and future frames, so with depth=2 5 frames will be buffered -- 2 past, 2 future and 1 current. The 0 value disables the temporal denoise. Recommended values are in the range of 1-3. * depth_first: Perform the temporal denoise before the spatial one - Values: 0, 1 - Default: 0 By default, the spatial denoise is performed first. * demo: Process only the right half of a frame - Values: 0, 1 - Default: 0 * debug: Enable debug information - Values: 0, 1 - Default: 0 ** tooncine: Cartoon-oriented inverse telecine filter - Author: Vadim Druzhin - Version: 0.1 Parameters: * depth: Maximum number of buffered telecine groups - Value range: 2 ... oo - Default: 30 Each telecine group consist of 5 frames. Small values may decrease an accuracy for low motion scenes, large values may cause the wrong telecine detection for short scenes. * cine_hi: High interlacing coefficient - Value range: 0 ... oo - Default: 12 The interlacing ratio of a highly interlaced frame to the average interlacing of a telecine group scaled by 4. This value must be greater than cine_lo. * cine_lo: Low interlacing coefficient - Value range: 0 ... oo - Default: 6 The interlacing ratio of an interlaced frame to the average interlacing of a telecine group scaled by 4. This value must be lower than cine_hi. * cine_huge: Interlacing verification coefficient - Value range: 0 ... oo - Default: 100 If the interlacing ratio of a recombined frame to the average interlacing of a telecine group scaled by 4 exceeds this value, it will be considered as a telecine mismatch. * cine_depth: Minimum number of groups for weak telecine detection - Value range: 0 ... oo - Default: 4 * ill_sens: Interlacing level ratio for a new scene detection - Value range: 0 ... oo - Default: 4 * noise: Noise threshold for the interlacing detector - Value range: 0 ... 12192 - Default: 48 * debug: Enable debug information - Values: 0, 1 - Default: 0 ** reil: Change the chroma planes upsampling method - Author: Vadim Druzhin - Version: 0.1 The function of this filter is the same as downsample chroma planes and then upsample them using given interlacing mode. Parameters: * il: New interlacing mode of chroma planes - Values: 0, 1 - Default: 0 0 - convert to progressive; 1 - convert to interlaced. ** timecode: Embed current frame number into the frame - Author: Vadim Druzhin - Version: 0.1 Parameters: * x: X coordinate of the text (in pixels from left) - Value range: -oo ... oo - Default: 8 Negative values are interpreted as the offset from the right margin. * y: Y coordinate of the text (in pixels from top) - Value range: -oo ... oo - Default: 8 Negative values are interpreted as the offset from the bottom margin. ** toonframe: Cartoon-oriented area based deinterlace filter - Author: Vadim Druzhin - Version: 0.1 This filter interpolates or blends fields in moving areas of an interlaced video. Parameters: * mode: Deinterlacing mode - Values: 0, 1, 2, 3 - Default: 1 0 - just mark interlaced areas; 1 - smart linear interpolation; 2 - simple linear interpolation; 3 - blend fields together. * noise: Noise threshold for the interlacing detector - Value range: 0 ... 12192 - Default: 8 If you see too much false interlacing, increase this value. * motion: Motion detection sensitivity - Value range: 0 ... 65025 - Default: 64 With smaller values more areas will be consider as moving and get deinterlaced. The 0 value disables motion detection. * force: Disable the interlacing detection - Values: 0, 1 - Default: 0 All moving areas will be deinterlaced. * min_ill: Minimum interlacing level to perform deinterlacing - Value range: 0 ... 1000 - Default: 0 The 0 value means deinterlace all frames. * grow_mask: Expand detected interlaced area by this amount of pixels - Value range: 0 ... oo - Default: 2 * debug: Enable debug information - Values: 0, 1 - Default: 0