Fixed a huge bug where the FFmpegWriter was not scaling colors to 8 bit, and that would crash on certain colors being used in an image. Also, added a new, experimental waveform visualization to the encoder.

This commit is contained in:
Jonathan Thomas
2012-08-22 17:31:12 -05:00
parent b4873d566f
commit 1ec7128a09
7 changed files with 143 additions and 64 deletions

View File

@@ -20,11 +20,11 @@ int main()
// openshot::FFmpegReader r("../../src/examples/piano.wav");
// openshot::FFmpegReader r("/home/jonathan/Videos/big-buck-bunny_trailer.webm");
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel-1024-stereo.mp4");
openshot::FFmpegReader r("/home/jonathan/Videos/sintel-1024-stereo.mp4");
// openshot::FFmpegReader r("/home/jonathan/Videos/OpenShot_Now_In_3d.mp4");
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel_trailer-720p.mp4");
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/piano.wav");
openshot::FFmpegReader r("/home/jonathan/Music/Army of Lovers/Crucified/Army of Lovers - Crucified [Single Version].mp3");
// openshot::FFmpegReader r("/home/jonathan/Music/Army of Lovers/Crucified/Army of Lovers - Crucified [Single Version].mp3");
// openshot::FFmpegReader r("/home/jonathan/Documents/OpenShot Art/test.jpeg");
// openshot::FFmpegReader r("/home/jonathan/Videos/60fps.mp4");
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/asdf.wdf");
@@ -37,7 +37,7 @@ int main()
w.DisplayInfo();
// Set options
w.SetAudioOptions(true, "libvorbis", 44100, 2, 128000);
w.SetAudioOptions(true, "libvorbis", 44100, 2, 128000, false);
w.SetVideoOptions(true, "libvpx", Fraction(24, 1), 640, 360, Fraction(1,1), false, false, 2000000);
// Prepare Streams
@@ -67,12 +67,12 @@ int main()
//Frame *f = r.GetFrame(1);
for (int frame = 1; frame <= 1000; frame++)
for (int frame = 1; frame <= 2000; frame++)
{
Frame *f = r.GetFrame(frame);
//if (f->number == 307 || f->number == 308 || f->number == 309 || f->number == 310)
// f->DisplayWaveform(false);
//f->DisplayWaveform();
// Apply effect
//f->AddEffect("flip");