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;
WriterInfo info
Information about the current media file.
ChannelLayout channel_layout
The channel layout (mono, stereo, 5 point surround, etc...)
std::shared_ptr< Frame > GetFrame(int64_t requested_frame)
std::map< string, string > metadata
An optional map/dictionary of video & audio metadata.
This class uses the FFmpeg libraries, to write and encode video files and audio files.
int main(int argc, char *argv[])
void WriteFrame(std::shared_ptr< Frame > frame)
Add a frame to the stack waiting to be encoded.
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 class uses the FFmpeg libraries, to open video files and audio files, and return openshot::Frame...
This class represents a fraction.
void Close()
Close the writer.
ReaderInfo info
Information about the current media file.
Fraction fps
Frames per second, as a fraction (i.e. 24/1 = 24 fps)
This namespace is the default namespace for all code in the openshot library.
void Open()
Open File - which is called by the constructor automatically.
void SetAudioOptions(bool has_audio, string codec, int sample_rate, int channels, ChannelLayout channel_layout, int bit_rate)
Set audio export options.
void DisplayInfo()
Display file information in the standard output stream (stdout)
int channels
The number of audio channels used in the audio stream.
int sample_rate
The number of audio samples per second (44100 is a common sample rate)