OpenShot Library | libopenshot
0.2.2
|
Go to the documentation of this file.
31 #include "../../include/OpenShot.h"
32 #include "../../include/CrashHandler.h"
37 int main(
int argc,
char* argv[]) {
39 FFmpegReader r9(
"/home/jonathan/Videos/sintel_trailer-720p.mp4");
62 for (
long int frame = 1; frame <= 100; frame++)
65 int frame_number = frame;
66 std::shared_ptr<Frame> f = r9.
GetFrame(frame_number);
76 cout <<
"Completed successfully!" << endl;
std::map< string, string > metadata
An optional map/dictionary of video & audio metadata.
int sample_rate
The number of audio samples per second (44100 is a common sample rate)
void SetVideoOptions(bool has_video, string codec, Fraction fps, int width, int height, Fraction pixel_ratio, bool interlaced, bool top_field_first, int bit_rate)
Set video export options.
This namespace is the default namespace for all code in the openshot library.
This class represents a fraction.
ChannelLayout channel_layout
The channel layout (mono, stereo, 5 point surround, etc...)
ReaderInfo info
Information about the current media file.
This class uses the FFmpeg libraries, to write and encode video files and audio files.
void DisplayInfo()
Display file information in the standard output stream (stdout)
int main(int argc, char *argv[])
void SetAudioOptions(bool has_audio, string codec, int sample_rate, int channels, ChannelLayout channel_layout, int bit_rate)
Set audio export options.
This class uses the FFmpeg libraries, to open video files and audio files, and return openshot::Frame...
std::shared_ptr< Frame > GetFrame(int64_t requested_frame)
void Close()
Close the writer.
Fraction fps
Frames per second, as a fraction (i.e. 24/1 = 24 fps)
void Open()
Open File - which is called by the constructor automatically.
void WriteFrame(std::shared_ptr< Frame > frame)
Add a frame to the stack waiting to be encoded.
WriterInfo info
Information about the current media file.
int channels
The number of audio channels used in the audio stream.