Fixed the FFMpegReader to discard the first audio and video frames it finds after a seek, since they sometimes are missing information. This fixed many issues with the time mapping curves and audio reversing and fast forwarding.

This commit is contained in:
Jonathan Thomas
2012-10-22 17:05:34 -05:00
parent 082efa23cc
commit 612bb25f5f
4 changed files with 50 additions and 12 deletions

View File

@@ -38,19 +38,31 @@ int main()
Timeline t(640, 360, Framerate(24,1));
// Add some clips
Clip c1(new FFmpegReader("/home/jonathan/Videos/sintel-1024-stereo.mp4"));
Clip c1(new FFmpegReader("/home/jonathan/Videos/sintel_trailer-720p.mp4"));
c1.Position(0.0);
// LINEAR Reverse
//c1.time.AddPoint(1, 500, LINEAR);
//c1.time.AddPoint(500, 1, LINEAR);
// LINEAR Fast Reverse (sounds wavy, due to periodic repeated frames)
//c1.time.AddPoint(1, 500, LINEAR);
//c1.time.AddPoint(500, 100, LINEAR);
// LINEAR Slow Reverse (sounds wavy, due to periodic repeated frames)
//c1.time.AddPoint(1, 600, LINEAR);
//c1.time.AddPoint(500, 1, LINEAR);
// BEZIER Reverse
c1.time.AddPoint(1, 500);
c1.time.AddPoint(300, 1);
c1.time.AddPoint(500, 500);
// c1.time.AddPoint(1, 500, LINEAR);
// c1.time.AddPoint(500, 1, LINEAR);
c1.time.AddPoint(1, 500, LINEAR);
c1.time.AddPoint(200, 200);
c1.time.AddPoint(500, 500, LINEAR);
// c1.time.AddPoint(1, 500, LINEAR);
// c1.time.AddPoint(200, 200);
// c1.time.AddPoint(500, 500, LINEAR);
c1.time.PrintValues();
// Add clips