You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
1) Reduced all openmp to use /2 the available CPUs (for performance reasons)
2) Improved detection of pixel format (enabled GIF support.. although it is still flawed a bit) 3) Improved error reporting when video encoding issues happen
This commit is contained in:
18
src/Main.cpp
18
src/Main.cpp
@@ -40,6 +40,8 @@ using namespace tr1;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
/*
|
||||
|
||||
FFmpegReader sinelReader("/home/jonathan/Videos/sintel_trailer-720p.mp4");
|
||||
sinelReader.Open();
|
||||
|
||||
@@ -89,6 +91,8 @@ int main(int argc, char* argv[])
|
||||
//c1.GetFrame(150)->Save("test.bmp", 1.0);
|
||||
return 0;
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// SDLPlayer p;
|
||||
// p.Reader(&r2);
|
||||
@@ -112,12 +116,12 @@ int main(int argc, char* argv[])
|
||||
|
||||
|
||||
// Reader
|
||||
FFmpegReader r1("/home/jonathan/colors-24-converted-to-29-97-fps-pulldown-advanced.mp4");
|
||||
FFmpegReader r1("/home/jonathan/Videos/New_OpenShot_Timeline.webm");
|
||||
r1.Open();
|
||||
|
||||
// FrameMapper
|
||||
FrameMapper r(&r1, Fraction(24,1), PULLDOWN_ADVANCED);
|
||||
r.PrintMapping();
|
||||
//FrameMapper r(&r1, Fraction(24,1), PULLDOWN_ADVANCED);
|
||||
//r.PrintMapping();
|
||||
|
||||
/* WRITER ---------------- */
|
||||
FFmpegWriter w("/home/jonathan/output.mp4");
|
||||
@@ -126,7 +130,7 @@ int main(int argc, char* argv[])
|
||||
//w.SetAudioOptions(true, "libvorbis", 48000, 2, 188000);
|
||||
//w.SetAudioOptions(true, "libmp3lame", 44100, 2, 128000);
|
||||
//w.SetVideoOptions(true, "libvpx", Fraction(24,1), 1280, 720, Fraction(1,1), false, false, 30000000);
|
||||
w.SetVideoOptions(true, "mpeg4", r.info.fps, 1280, 720, Fraction(1,1), false, false, 3000000);
|
||||
w.SetVideoOptions(true, "mpeg4", openshot::Fraction(3,1), 720, 360, Fraction(1,1), false, false, 3000000);
|
||||
|
||||
// Prepare Streams
|
||||
w.PrepareStreams();
|
||||
@@ -138,7 +142,7 @@ int main(int argc, char* argv[])
|
||||
w.OutputStreamInfo();
|
||||
|
||||
//for (int frame = 3096; frame <= 3276; frame++)
|
||||
for (int frame = 1; frame <= 20; frame++)
|
||||
for (int frame = 1; frame <= 100; frame++)
|
||||
{
|
||||
// tr1::shared_ptr<Frame> f(new Frame(frame, 1280, 720, "#000000", 44100, 2));
|
||||
// if (frame % 2 == 0)
|
||||
@@ -150,7 +154,7 @@ int main(int argc, char* argv[])
|
||||
// cout << f->number << endl;
|
||||
// w.WriteFrame(f);
|
||||
|
||||
tr1::shared_ptr<Frame> f = r.GetFrame(frame);
|
||||
tr1::shared_ptr<Frame> f = r1.GetFrame(frame);
|
||||
if (f)
|
||||
{
|
||||
//if (frame >= 250)
|
||||
@@ -159,7 +163,7 @@ int main(int argc, char* argv[])
|
||||
//f->Display();
|
||||
|
||||
// Write frame
|
||||
f->Display();
|
||||
//f->Display();
|
||||
cout << "queue frame " << frame << " (" << f->number << ", " << f << ")" << endl;
|
||||
w.WriteFrame(f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user