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.Int64 |
Default
Default
Declaration
int? Default { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Duration
Duration
Declaration
TimeSpan Duration { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Forced
Forced
Declaration
int? Forced { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Framerate
Frame rate
Declaration
double Framerate { get; }
Property Value
Type | Description |
---|---|
System.Double |
Height
Height
Declaration
int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PixelFormat
Pixel Format
Declaration
string PixelFormat { get; }
Property Value
Type | Description |
---|---|
System.String |
Ratio
Screen ratio
Declaration
string Ratio { get; }
Property Value
Type | Description |
---|---|
System.String |
Width
Width
Declaration
int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
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.String | subtitlePath | Path to subtitle file in .srt format |
System.String | encode | Set subtitles input character encoding. Only useful if not UTF-8. |
System.String | 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 |
---|---|
IVideoStream | 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.String | subtitlePath | Path to subtitle file in .srt format |
VideoSize | 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.String | encode | Set subtitles input character encoding. Only useful if not UTF-8. |
System.String | 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 |
---|---|
IVideoStream | IVideoStream |
ChangeSpeed(Double)
Change speed of video
Declaration
IVideoStream ChangeSpeed(double multiplicator)
Parameters
Type | Name | Description |
---|---|---|
System.Double | multiplicator | Speed value. (0.5 - 2.0). To double the speed set this to 2.0 |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | When speed isn't between 0.5 - 2.0. |
CopyStream()
Set stream to copy with orginal codec
Declaration
IVideoStream CopyStream()
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
Reverse()
Reverse video
Declaration
IVideoStream Reverse()
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
Rotate(RotateDegrees)
Rotate video
Declaration
IVideoStream Rotate(RotateDegrees rotateDegrees)
Parameters
Type | Name | Description |
---|---|---|
RotateDegrees | rotateDegrees | Rotate type |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetBitrate(Int64)
Set Bitrate of the video (-b:v option)
Declaration
IVideoStream SetBitrate(long bitrate)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | bitrate | Bitrate in bits |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetBitstreamFilter(String)
Set filter
Declaration
IVideoStream SetBitstreamFilter(string filter)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | Filter |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetBitstreamFilter(BitstreamFilter)
Set filter
Declaration
IVideoStream SetBitstreamFilter(BitstreamFilter filter)
Parameters
Type | Name | Description |
---|---|---|
BitstreamFilter | filter | Filter |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetCodec(String)
Set video codec
Declaration
IVideoStream SetCodec(string codec)
Parameters
Type | Name | Description |
---|---|---|
System.String | codec | Video codec |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetCodec(VideoCodec)
Set video codec
Declaration
IVideoStream SetCodec(VideoCodec codec)
Parameters
Type | Name | Description |
---|---|---|
VideoCodec | codec | Video codec |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetFlags(String[])
Set Flags for conversion (-flags option)
Declaration
IVideoStream SetFlags(params string[] flags)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | flags | Flags to use |
Returns
Type | Description |
---|---|
IVideoStream | 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 |
---|---|
IVideoStream | IVideoStream |
SetFramerate(Double)
Set Framerate of the video (-r option)
Declaration
IVideoStream SetFramerate(double framerate)
Parameters
Type | Name | Description |
---|---|---|
System.Double | framerate | Framerates in FPS |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetLoop(Int32, Int32)
Loop over the input stream.(-loop)
Declaration
IVideoStream SetLoop(int count, int delay = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Number of repeats |
System.Int32 | delay | Delay between repeats (in seconds) |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetOutputFramesCount(Int32)
Set output frames count
Declaration
IVideoStream SetOutputFramesCount(int number)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | number | Number of frames |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetSeek(TimeSpan)
Seeks in input file to position. (-ss argument)
Declaration
IVideoStream SetSeek(TimeSpan seek)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | seek | Position |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetSize(Int32, Int32)
Set size of video
Declaration
IVideoStream SetSize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | Width |
System.Int32 | height | Height |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetSize(VideoSize)
Set size of video
Declaration
IVideoStream SetSize(VideoSize size)
Parameters
Type | Name | Description |
---|---|---|
VideoSize | size | VideoSize |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
SetWatermark(String, Position)
Melt watermark into video
Declaration
IVideoStream SetWatermark(string imagePath, Position position)
Parameters
Type | Name | Description |
---|---|---|
System.String | imagePath | Watermark |
Position | position | Position of watermark |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |
Split(TimeSpan, TimeSpan)
Get part of video
Declaration
IVideoStream Split(TimeSpan startTime, TimeSpan duration)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | startTime | Start point |
System.TimeSpan | duration | Duration of new video |
Returns
Type | Description |
---|---|
IVideoStream | IVideoStream |