openshot Namespace Reference

This namespace is the default namespace for all code in the openshot library. More...

## Classes

class | AudioBufferSource
| This class is used to expose an AudioSampleBuffer as an AudioSource in JUCE. More...
struct | AudioDeviceInfo
class | AudioDeviceManagerSingleton
| Singleton wrapper for AudioDeviceManager (to prevent multiple instances). More...
struct | AudioLocation
| This struct holds the associated video frame and starting sample # for an audio packet. More...
class | AudioPlaybackThread
| The audio playback thread. More...
class | AudioReaderSource
| This class is used to expose any ReaderBase derived class as an AudioSource in JUCE. More...
class | AudioResampler
| This class is used to resample audio data for many sequential frames. More...
class | Bars
| This class draws black bars around your video (from any side), and can be animated with openshot::Keyframe curves over time. More...
class | BaseException
| Base exception class with a custom message variable. More...
class | Blur
| This class adjusts the blur of an image, and can be animated with openshot::Keyframe curves over time. More...
class | Brightness
| This class adjusts the brightness and contrast of an image, and can be animated with openshot::Keyframe curves over time. More...
class | CacheBase
| All cache managers in libopenshot are based on this CacheBase class. More...
class | CacheDisk
| This class is a disk-based cache manager for Frame objects. More...
class | CacheMemory
| This class is a memory-based cache manager for Frame objects. More...
class | ChromaKey
| This class uses the ImageMagick++ libraries, to remove (i.e. key out) a color (i.e. greenscreen) More...
struct | ChunkLocation
| This struct holds the location of a frame within a chunk. More...
class | ChunkNotFound
| Exception when a required chunk is missing. More...
class | ChunkReader
| This class reads a special chunk-formatted file, which can be easily shared in a distributed environment. More...
class | ChunkWriter
| This class takes any reader and generates a special type of video file, built with chunks of small video and audio data. More...
class | Clip
| This class represents a clip (used to arrange readers on the timeline) More...
class | ClipBase
| This abstract class is the base class, used by all clips in libopenshot. More...
class | Color
| This class represents a color (used on the timeline and clips) More...
class | ColorShift
| This class shifts the pixels of an image up, down, left, or right, and can be animated with openshot::Keyframe curves over time. More...
struct | CompareClipEffects
struct | CompareClips
struct | CompareEffects
class | Coordinate
| This class represents a Cartesian coordinate (X, Y) used in the Keyframe animation system. More...
class | CrashHandler
| This class is designed to catch exceptions thrown by libc (SIGABRT, SIGSEGV, SIGILL, SIGFPE) More...
class | Crop
| This class crops a frame image (from any side), and can be animated with openshot::Keyframe curves over time. More...
class | DecklinkError
| Exception when accessing a blackmagic decklink card. More...
class | DecklinkReader
| This class uses the Blackmagic Decklink libraries, to open video streams on Blackmagic devices. More...
class | DecklinkWriter
| This class uses the Blackmagic Decklink libraries, to send video streams to Blackmagic devices. More...
class | Deinterlace
| This class uses the ImageMagick++ libraries, to de-interlace the image, which removes the EVEN or ODD horizontal lines (which represent different points of time). More...
class | DummyReader
| This class is used as a simple, dummy reader, which always returns a blank frame. More...
class | EffectBase
| This abstract class is the base class, used by all effects in libopenshot. More...
class | EffectInfo
| This class returns a listing of all effects supported by libopenshot. More...
struct | EffectInfoStruct
| This struct contains info about an effect, such as the name, video or audio effect, etc... More...
class | ErrorDecodingAudio
| Exception when decoding audio packet. More...
class | ErrorEncodingAudio
| Exception when encoding audio packet. More...
class | ErrorEncodingVideo
| Exception when encoding audio packet. More...
class | FFmpegReader
| This class uses the FFmpeg libraries, to open video files and audio files, and return openshot::Frame objects for any frame in the file. More...
class | FFmpegWriter
| This class uses the FFmpeg libraries, to write and encode video files and audio files. More...
struct | Field
| This struct holds a single field (half a frame). More...
class | Fraction
| This class represents a fraction. More...
class | Frame
| This class represents a single frame of video (i.e. image & audio data) More...
class | FrameMapper
| This class creates a mapping between 2 different frame rates, applying a specific pull-down technique. More...
class | Hue
| This class shifts the hue of an image, and can be animated with openshot::Keyframe curves over time. More...
class | ImageReader
| This class uses the ImageMagick++ libraries, to open image files, and return openshot::Frame objects containing the image. More...
class | ImageWriter
| This class uses the ImageMagick library to write image files (including animated GIFs) More...
class | InvalidChannels
| Exception when an invalid # of audio channels are detected. More...
class | InvalidCodec
| Exception when no valid codec is found for a file. More...
class | InvalidFile
| Exception for files that can not be found or opened. More...
class | InvalidFormat
| Exception when no valid format is found for a file. More...
class | InvalidJSON
| Exception for invalid JSON. More...
class | InvalidJSONKey
| Exception for missing JSON Change key. More...
class | InvalidOptions
| Exception when invalid encoding options are used. More...
class | InvalidSampleRate
| Exception when invalid sample rate is detected during encoding. More...
class | Keyframe
| A Keyframe is a collection of Point instances, which is used to vary a number or property over time. More...
struct | MappedFrame
| This struct holds two fields which together make up a complete video frame. More...
class | Mask
| This class uses the image libraries to apply alpha (or transparency) masks to any frame. It can also be animated, and used as a powerful Wipe transition. More...
class | Negate
| This class uses the ImageMagick++ libraries, to negate image (i.e. negative) More...
class | NoStreamsFound
| Exception when no streams are found in the file. More...
class | OutOfBoundsFrame
| Exception for frames that are out of bounds. More...
class | OutOfBoundsPoint
| Exception for an out of bounds key-frame point. More...
class | OutOfMemory
| Exception when memory could not be allocated. More...
class | Pixelate
| This class pixelates an image, and can be animated with openshot::Keyframe curves over time. More...
class | PlayerBase
| This is the base class of all Players in libopenshot. More...
class | PlayerPrivate
| The private part of QtPlayer class, which contains an audio thread and video thread, and controls the video timing and audio synchronization code. More...
class | Point
| A Point is the basic building block of a key-frame curve. More...
class | Profile
| This class loads a special text-based file called a Profile. More...
struct | ProfileInfo
| This struct holds profile data, typically loaded from a file. More...
class | QtHtmlReader
| This class uses Qt libraries, to create frames with rendered HTML, and return openshot::Frame objects. More...
class | QtImageReader
| This class uses the Qt library, to open image files, and return openshot::Frame objects containing the image. More...
class | QtPlayer
| This class is used to playback a video from a reader. More...
class | QtTextReader
| This class uses Qt libraries, to create frames with "Text", and return openshot::Frame objects. More...
class | ReaderBase
| This abstract class is the base class, used by all readers in libopenshot. More...
class | ReaderClosed
| Exception when a reader is closed, and a frame is requested. More...
struct | ReaderInfo
| This struct contains info about a media file, such as height, width, frames per second, etc... More...
class | RendererBase
| This is the base class of all Renderers in libopenshot. More...
class | ResampleError
| Exception when resample fails. More...
struct | SafeTimeSliceThread
struct | SampleRange
| This struct holds a the range of samples needed by this frame. More...
class | Saturation
| This class adjusts the saturation of color on a frame's image. More...
class | Settings
| This class is contains settings used by libopenshot (and can be safely toggled at any point) More...
class | Shift
| This class shifts the pixels of an image up, down, left, or right, and can be animated with openshot::Keyframe curves over time. More...
class | TextReader
| This class uses the ImageMagick++ libraries, to create frames with "Text", and return openshot::Frame objects. More...
class | Timeline
| This class represents a timeline. More...
class | TooManySeeks
| Exception when too many seek attempts happen. More...
class | VideoCacheThread
| The video cache class. More...
class | VideoPlaybackThread
| The video playback class. More...
class | Wave
| This class distorts an image using a wave pattern. More...
class | WriterBase
| This abstract class is the base class, used by writers. Writers are types of classes that encode video, audio, and image files. More...
class | WriterClosed
| Exception when a writer is closed, and a frame is requested. More...
struct | WriterInfo
| This struct contains info about encoding a media file, such as height, width, frames per second, etc... More...
class | ZmqLogger
| This class is used for logging and sending those logs over a ZemoMQ socket to a listener. More...

## Enumerations

enum | AnchorType { ANCHOR_CANVAS , ANCHOR_VIEWPORT }
| This enumeration determines what parent a clip should be aligned to. More...

enum

ChannelLayout {
LAYOUT_MONO = AV_CH_LAYOUT_MONO , LAYOUT_STEREO = AV_CH_LAYOUT_STEREO , LAYOUT_2POINT1 = AV_CH_LAYOUT_2POINT1 , LAYOUT_2_1 = AV_CH_LAYOUT_2_1 ,
LAYOUT_SURROUND = AV_CH_LAYOUT_SURROUND , LAYOUT_3POINT1 = AV_CH_LAYOUT_3POINT1 , LAYOUT_4POINT0 = AV_CH_LAYOUT_4POINT0 , LAYOUT_4POINT1 = AV_CH_LAYOUT_4POINT1 ,
LAYOUT_2_2 = AV_CH_LAYOUT_2_2 , LAYOUT_QUAD = AV_CH_LAYOUT_QUAD , LAYOUT_5POINT0 = AV_CH_LAYOUT_5POINT0 , LAYOUT_5POINT1 = AV_CH_LAYOUT_5POINT1 ,
LAYOUT_5POINT0_BACK = AV_CH_LAYOUT_5POINT0_BACK , LAYOUT_5POINT1_BACK = AV_CH_LAYOUT_5POINT1_BACK , LAYOUT_6POINT0 = AV_CH_LAYOUT_6POINT0 , LAYOUT_6POINT0_FRONT = AV_CH_LAYOUT_6POINT0_FRONT ,
LAYOUT_HEXAGONAL = AV_CH_LAYOUT_HEXAGONAL , LAYOUT_6POINT1 = AV_CH_LAYOUT_6POINT1 , LAYOUT_6POINT1_BACK = AV_CH_LAYOUT_6POINT1_BACK , LAYOUT_6POINT1_FRONT = AV_CH_LAYOUT_6POINT1_FRONT ,
LAYOUT_7POINT0 = AV_CH_LAYOUT_7POINT0 , LAYOUT_7POINT0_FRONT = AV_CH_LAYOUT_7POINT0_FRONT , LAYOUT_7POINT1 = AV_CH_LAYOUT_7POINT1 , LAYOUT_7POINT1_WIDE = AV_CH_LAYOUT_7POINT1_WIDE ,
LAYOUT_7POINT1_WIDE_BACK = AV_CH_LAYOUT_7POINT1_WIDE_BACK , LAYOUT_OCTAGONAL = AV_CH_LAYOUT_OCTAGONAL , LAYOUT_STEREO_DOWNMIX = AV_CH_LAYOUT_STEREO_DOWNMIX
}

| This enumeration determines the audio channel layout (such as stereo, mono, 5 point surround, etc...) More...
enum | ChunkVersion { THUMBNAIL , PREVIEW , FINAL }
| This enumeration allows the user to choose which version of the chunk they would like (low, medium, or high quality). More...
enum | FrameDisplayType { FRAME_DISPLAY_NONE , FRAME_DISPLAY_CLIP , FRAME_DISPLAY_TIMELINE , FRAME_DISPLAY_BOTH }
| This enumeration determines the display format of the clip's frame number (if any). Useful for debugging. More...
enum | GravityType { GRAVITY_TOP_LEFT , GRAVITY_TOP , GRAVITY_TOP_RIGHT , GRAVITY_LEFT , GRAVITY_CENTER , GRAVITY_RIGHT , GRAVITY_BOTTOM_LEFT , GRAVITY_BOTTOM , GRAVITY_BOTTOM_RIGHT }
| This enumeration determines how clips are aligned to their parent container. More...
enum | HandleType { AUTO , MANUAL }
| When BEZIER interpolation is used, the point's left and right handles are used to influence the direction of the curve. More...
enum | InterpolationType { BEZIER , LINEAR , CONSTANT }
| This controls how a Keyframe uses this point to interpolate between two points. More...
enum | PlaybackMode { PLAYBACK_PLAY , PLAYBACK_PAUSED , PLAYBACK_LOADING , PLAYBACK_STOPPED }
| This enumeration determines the mode of the video player (i.e. playing, paused, etc...) More...
enum | PulldownType { PULLDOWN_CLASSIC , PULLDOWN_ADVANCED , PULLDOWN_NONE }
| This enumeration determines how frame rates are increased or decreased. More...
enum | ScaleType { SCALE_CROP , SCALE_FIT , SCALE_STRETCH , SCALE_NONE }
| This enumeration determines how clips are scaled to fit their parent container. More...
enum | StreamType { VIDEO_STREAM , AUDIO_STREAM }
| This enumeration designates the type of stream when encoding (video or audio) More...
enum | VolumeMixType { VOLUME_MIX_NONE , VOLUME_MIX_AVERAGE , VOLUME_MIX_REDUCE }
| This enumeration determines the strategy when mixing audio with other clips. More...

## Functions

OpenShotVersion | GetVersion ()
const Json::Value | stringToJson (const std::string value)

## Detailed Description

This namespace is the default namespace for all code in the openshot library.

This struct hold information about Audio Devices.

The type and name of the audio device.

## Enumeration Type Documentation

## AnchorType

enum openshot::AnchorType

This enumeration determines what parent a clip should be aligned to.

Enumerator
ANCHOR_CANVAS | Anchor the clip to the canvas.
ANCHOR_VIEWPORT | Anchor the clip to the viewport (which can be moved / animated around the canvas)

Definition at line 61 of file Enums.h.

## ChannelLayout

enum openshot::ChannelLayout

This enumeration determines the audio channel layout (such as stereo, mono, 5 point surround, etc...)

When writing video and audio files, you will need to specify the channel layout of the audio stream. libopenshot can convert between many different channel layouts (such as stereo, mono, 5 point surround, etc...)

Enumerator
LAYOUT_MONO |
LAYOUT_STEREO |
LAYOUT_2POINT1 |
LAYOUT_2_1 |
LAYOUT_SURROUND |
LAYOUT_3POINT1 |
LAYOUT_4POINT0 |
LAYOUT_4POINT1 |
LAYOUT_2_2 |
LAYOUT_QUAD |
LAYOUT_5POINT0 |
LAYOUT_5POINT1 |
LAYOUT_5POINT0_BACK |
LAYOUT_5POINT1_BACK |
LAYOUT_6POINT0 |
LAYOUT_6POINT0_FRONT |
LAYOUT_HEXAGONAL |
LAYOUT_6POINT1 |
LAYOUT_6POINT1_BACK |
LAYOUT_6POINT1_FRONT |
LAYOUT_7POINT0 |
LAYOUT_7POINT0_FRONT |
LAYOUT_7POINT1 |
LAYOUT_7POINT1_WIDE |
LAYOUT_7POINT1_WIDE_BACK |
LAYOUT_OCTAGONAL |
LAYOUT_STEREO_DOWNMIX |

Definition at line 46 of file ChannelLayouts.h.

## ChunkVersion

enum openshot::ChunkVersion

This enumeration allows the user to choose which version of the chunk they would like (low, medium, or high quality).

Since chunks contain multiple video streams, this version enumeration allows the user to choose which version of the chunk they would like. For example, if you want a small version with reduced quality, you can choose the THUMBNAIL version. This is used on the ChunkReader constructor.

Enumerator
THUMBNAIL | The lowest quality stream contained in this chunk file.
PREVIEW | The medium quality stream contained in this chunk file.
FINAL | The highest quality stream contained in this chunk file.

Definition at line 74 of file ChunkReader.h.

## FrameDisplayType

enum openshot::FrameDisplayType

This enumeration determines the display format of the clip's frame number (if any). Useful for debugging.

Enumerator
FRAME_DISPLAY_NONE | Do not display the frame number.
FRAME_DISPLAY_CLIP | Display the clip's internal frame number.
FRAME_DISPLAY_TIMELINE | Display the timeline's frame number.
FRAME_DISPLAY_BOTH | Display both the clip's and timeline's frame number.

Definition at line 68 of file Enums.h.

## GravityType

enum openshot::GravityType

This enumeration determines how clips are aligned to their parent container.

Enumerator
GRAVITY_TOP_LEFT | Align clip to the top left of its parent.
GRAVITY_TOP | Align clip to the top center of its parent.
GRAVITY_TOP_RIGHT | Align clip to the top right of its parent.
GRAVITY_LEFT | Align clip to the left of its parent (middle aligned)
GRAVITY_CENTER | Align clip to the center of its parent (middle aligned)
GRAVITY_RIGHT | Align clip to the right of its parent (middle aligned)
GRAVITY_BOTTOM_LEFT | Align clip to the bottom left of its parent.
GRAVITY_BOTTOM | Align clip to the bottom center of its parent.
GRAVITY_BOTTOM_RIGHT | Align clip to the bottom right of its parent.

Definition at line 38 of file Enums.h.

## HandleType

enum openshot::HandleType

When BEZIER interpolation is used, the point's left and right handles are used to influence the direction of the curve.

AUTO will try and adjust the handles automatically, to achieve the smoothest curves. MANUAL will leave the handles alone, making it the responsibility of the user to set them.

Enumerator
AUTO | Automatically adjust the handles to achieve the smoothest curve.
MANUAL | Do not automatically adjust handles (set them manually)

Definition at line 59 of file Point.h.

## InterpolationType

enum openshot::InterpolationType

This controls how a Keyframe uses this point to interpolate between two points.

Bezier is a smooth curve. Linear is a straight line. Constant is a jump from the previous point to this one.

Enumerator
BEZIER | Bezier curves are quadratic curves, which create a smooth curve.
LINEAR | Linear curves are angular, straight lines between two points.
CONSTANT | Constant curves jump from their previous position to a new one (with no interpolation).

Definition at line 46 of file Point.h.

## PlaybackMode

enum openshot::PlaybackMode

This enumeration determines the mode of the video player (i.e. playing, paused, etc...)

A player can be in one of the following modes, which controls how it behaves.

Enumerator
PLAYBACK_PLAY | Play the video normally.
PLAYBACK_PAUSED | Pause the video (holding the last displayed frame)
PLAYBACK_LOADING | Loading the video (display a loading animation)
PLAYBACK_STOPPED | Stop playing the video (clear cache, done with player)

Definition at line 44 of file PlayerBase.h.

## PulldownType

enum openshot::PulldownType

This enumeration determines how frame rates are increased or decreased.

Pull-down techniques are only needed to remove artificial fields added when converting between 24 fps (film) and television fps (29.97 fps NTSC or 25 fps PAL).

Enumerator
PULLDOWN_CLASSIC | Classic 2:3:2:3 pull-down.
PULLDOWN_ADVANCED | Advanced 2:3:3:2 pull-down (minimal dirty frames)
PULLDOWN_NONE | Do not apply pull-down techniques, just repeat or skip entire frames.

Definition at line 60 of file FrameMapper.h.

## ScaleType

enum openshot::ScaleType

This enumeration determines how clips are scaled to fit their parent container.

Enumerator
SCALE_CROP | Scale the clip until both height and width fill the canvas (cropping the overlap)
SCALE_FIT | Scale the clip until either height or width fills the canvas (with no cropping)
SCALE_STRETCH | Scale the clip until both height and width fill the canvas (distort to fit)
SCALE_NONE | Do not scale the clip.

Definition at line 52 of file Enums.h.

## StreamType

enum openshot::StreamType

This enumeration designates the type of stream when encoding (video or audio)

Enumerator
VIDEO_STREAM | A video stream (used to determine which type of stream)
AUDIO_STREAM | An audio stream (used to determine which type of stream)

Definition at line 63 of file FFmpegWriter.h.

## VolumeMixType

enum openshot::VolumeMixType

This enumeration determines the strategy when mixing audio with other clips.

Enumerator
VOLUME_MIX_NONE | Do not apply any volume mixing adjustments. Just add the samples together.
VOLUME_MIX_AVERAGE | Evenly divide the overlapping clips volume keyframes, so that the sum does not exceed 100%.
VOLUME_MIX_REDUCE | Reduce volume by about %25, and then mix (louder, but could cause pops if the sum exceeds 100%)

Definition at line 77 of file Enums.h.

## Function Documentation

## GetVersion()

OpenShotVersion openshot::GetVersion | ( |  | ) |

Definition at line 35 of file OpenShotVersion.cpp.

## stringToJson()

const Json::Value openshot::stringToJson | ( | const std::string | value | ) |

Definition at line 33 of file Json.cpp.

Referenced by openshot::Timeline::ApplyJsonDiff(), openshot::CacheDisk::JsonValue(), openshot::CacheMemory::JsonValue(), openshot::CacheDisk::SetJson(), openshot::CacheMemory::SetJson(), openshot::ChunkReader::SetJson(), openshot::Clip::SetJson(), openshot::Color::SetJson(), openshot::Coordinate::SetJson(), openshot::DecklinkReader::SetJson(), openshot::DummyReader::SetJson(), openshot::Bars::SetJson(), openshot::Blur::SetJson(), openshot::Brightness::SetJson(), openshot::ChromaKey::SetJson(), openshot::ColorShift::SetJson(), openshot::Crop::SetJson(), openshot::Deinterlace::SetJson(), openshot::Hue::SetJson(), openshot::Mask::SetJson(), openshot::Negate::SetJson(), openshot::Pixelate::SetJson(), openshot::Saturation::SetJson(), openshot::Shift::SetJson(), openshot::Wave::SetJson(), openshot::FFmpegReader::SetJson(), openshot::FrameMapper::SetJson(), openshot::ImageReader::SetJson(), openshot::Keyframe::SetJson(), openshot::Point::SetJson(), openshot::Profile::SetJson(), openshot::QtHtmlReader::SetJson(), openshot::QtImageReader::SetJson(), openshot::QtTextReader::SetJson(), openshot::TextReader::SetJson(), openshot::Timeline::SetJson(), openshot::WriterBase::SetJson(), and openshot::EffectBase::SetJson().