Interface IVideoStream
Video Stream
Inherited Members
Namespace: Xabe.FFmpeg
Assembly: Xabe.FFmpeg.dll
Syntax
public interface IVideoStream : IStream
Properties
Bitrate
Video bitrate
Declaration
long Bitrate { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Default
Default
Declaration
int? Default { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Duration
Duration
Declaration
TimeSpan Duration { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Forced
Forced
Declaration
int? Forced { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Framerate
Frame rate
Declaration
double Framerate { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Height
Height
Declaration
int Height { get; }
Property Value
| Type | Description |
|---|---|
| System. |
PixelFormat
Pixel Format
Declaration
string PixelFormat { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Ratio
Screen ratio
Declaration
string Ratio { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Width
Width
Declaration
int Width { get; }
Property Value
| Type | Description |
|---|---|
| System. |
Methods
AddSubtitles(String, String, String)
Burn subtitle into file
Declaration
IVideoStream AddSubtitles(string subtitlePath, string encode = null, string style = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
subtitlePath | Path to subtitle file in .srt format |
| System. |
encode | Set subtitles input character encoding. Only useful if not UTF-8. |
| System. |
style | Override default style or script info parameters of the subtitles. It accepts a string containing ASS style format KEY=VALUE couples separated by "," |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
AddSubtitles(String, VideoSize, String, String)
Burn subtitle into file
Declaration
IVideoStream AddSubtitles(string subtitlePath, VideoSize originalSize, string encode = null, string style = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
subtitlePath | Path to subtitle file in .srt format |
| Video |
originalSize | Specify the size of the original video, the video for which the ASS style was composed. This is necessary to correctly scale the fonts if the aspect ratio has been changed. |
| System. |
encode | Set subtitles input character encoding. Only useful if not UTF-8. |
| System. |
style | Override default style or script info parameters of the subtitles. It accepts a string containing ASS style format KEY=VALUE couples separated by "," |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
ChangeSpeed(Double)
Change speed of video
Declaration
IVideoStream ChangeSpeed(double multiplicator)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
multiplicator | Speed value. (0.5 - 2.0). To double the speed set this to 2.0 |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
Exceptions
| Type | Condition |
|---|---|
| System. |
When speed isn't between 0.5 - 2.0. |
CopyStream()
Set stream to copy with orginal codec
Declaration
IVideoStream CopyStream()
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
Reverse()
Reverse video
Declaration
IVideoStream Reverse()
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
Rotate(RotateDegrees)
Rotate video
Declaration
IVideoStream Rotate(RotateDegrees rotateDegrees)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotate |
rotateDegrees | Rotate type |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetBitrate(Int64)
Set Bitrate of the video (-b:v option)
Declaration
IVideoStream SetBitrate(long bitrate)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
bitrate | Bitrate in bits |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetBitstreamFilter(String)
Set filter
Declaration
IVideoStream SetBitstreamFilter(string filter)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
filter | Filter |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetBitstreamFilter(BitstreamFilter)
Set filter
Declaration
IVideoStream SetBitstreamFilter(BitstreamFilter filter)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitstream |
filter | Filter |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetCodec(String)
Set video codec
Declaration
IVideoStream SetCodec(string codec)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
codec | Video codec |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetCodec(VideoCodec)
Set video codec
Declaration
IVideoStream SetCodec(VideoCodec codec)
Parameters
| Type | Name | Description |
|---|---|---|
| Video |
codec | Video codec |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetFlags(String[])
Set Flags for conversion (-flags option)
Declaration
IVideoStream SetFlags(params string[] flags)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
flags | Flags to use |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetFlags(Flag[])
Set Flags for conversion (-flags option)
Declaration
IVideoStream SetFlags(params Flag[] flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag[] | flags | Flags to use |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetFramerate(Double)
Set Framerate of the video (-r option)
Declaration
IVideoStream SetFramerate(double framerate)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
framerate | Framerates in FPS |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetLoop(Int32, Int32)
Loop over the input stream.(-loop)
Declaration
IVideoStream SetLoop(int count, int delay = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
count | Number of repeats |
| System. |
delay | Delay between repeats (in seconds) |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetOutputFramesCount(Int32)
Set output frames count
Declaration
IVideoStream SetOutputFramesCount(int number)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
number | Number of frames |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetSeek(TimeSpan)
Seeks in input file to position. (-ss argument)
Declaration
IVideoStream SetSeek(TimeSpan seek)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
seek | Position |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetSize(Int32, Int32)
Set size of video
Declaration
IVideoStream SetSize(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
width | Width |
| System. |
height | Height |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetSize(VideoSize)
Set size of video
Declaration
IVideoStream SetSize(VideoSize size)
Parameters
| Type | Name | Description |
|---|---|---|
| Video |
size | VideoSize |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
SetWatermark(String, Position)
Melt watermark into video
Declaration
IVideoStream SetWatermark(string imagePath, Position position)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
imagePath | Watermark |
| Position | position | Position of watermark |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |
Split(TimeSpan, TimeSpan)
Get part of video
Declaration
IVideoStream Split(TimeSpan startTime, TimeSpan duration)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
startTime | Start point |
| System. |
duration | Duration of new video |
Returns
| Type | Description |
|---|---|
| IVideo |
IVideoStream |