Video Hook Documentation

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 1. Introduction

The video hook functionality is designed (mostly) for live video. It allows the video to be modified or examined between the decoder and the encoder.

Any number of hook modules can be placed inline, and they are run in the order that they were specified on the ffmpeg command line.

Three modules are provided and are described below. They are all intended to be used as a base for your own modules.

Modules are loaded using the -vhook option to ffmpeg. The value of this parameter is a space seperated list of arguments. The first is the module name, and the rest are passed as arguments to the Configure function of the module.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.1 null.c

This does nothing. Actually it converts the input image to RGB24 and then converts it back again. This is meant as a sample that you can use to test your setup.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.2 fish.c

This implements a 'fish detector'. Essentially it converts the image into HSV space and tests whether more than a certain percentage of the pixels fall into a specific HSV cuboid. If so, then the image is saved into a file for processing by other bits of code.

Why use HSV? It turns out that HSV cuboids represent a more compact range of colors than would an RGB cuboid.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.3 imlib2.c

This allows a caption to be placed onto each frame. It supports inserting the time and date. By using the imlib functions, it would be easy to add your own graphical logo, add a frame/border, etc.

[Top] | [Contents] | [Index] | [ ? ]

# Table of Contents

> 1. Introduction

> > 1.1 null.c
> > 1.2 fish.c
> > 1.3 imlib2.c

[Top] | [Contents] | [Index] | [ ? ]

# Short Table of Contents

> 1. Introduction

[Top] | [Contents] | [Index] | [ ? ]

# About this document

This document was generated by using texi2html

The buttons in the navigation panels have the following meaning:

Button | Name | Go to | From 1.2.3 go to
--- | --- | --- | ---
[ < ] | Back | previous section in reading order | 1.2.2
[ > ] | Forward | next section in reading order | 1.2.4
[ << ] | FastBack | beginning of this chapter or previous chapter | 1
[ Up ] | Up | up section | 1.2
[ >> ] | FastForward | next chapter | 2
[Top] | Top | cover (top) of document |
[Contents] | Contents | table of contents |
[Index] | Index | concept index |
[ ? ] | About | this page |

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

- 1. Section One
  - 1.1 Subsection One-One
    - ...
  - 1.2 Subsection One-Two
    - 1.2.1 Subsubsection One-Two-One
    - 1.2.2 Subsubsection One-Two-Two
    - 1.2.3 Subsubsection One-Two-Three <== Current Position
    - 1.2.4 Subsubsection One-Two-Four
  - 1.3 Subsection One-Three
    - ...
  - 1.4 Subsection One-Four

This document was generated by Sam Hocevar on July, 30 2004 using texi2html