Skip to content

Commit 63ebc4f

Browse files
committed
Adding test for AV1 sync verification on Windows builder
1 parent 061b185 commit 63ebc4f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

examples/test_video_sync.mp4

4.04 MB
Binary file not shown.

tests/FFmpegReader.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,3 +284,24 @@ TEST_CASE( "DisplayInfo", "[libopenshot][ffmpegreader]" )
284284
// Compare a [0, expected.size()) substring of output to expected
285285
CHECK(output.str().substr(0, expected.size()) == expected);
286286
}
287+
288+
TEST_CASE( "Decode_AV1_to_PNG", "[libopenshot][ffmpegreader]" )
289+
{
290+
// Create a reader
291+
std::stringstream path;
292+
path << TEST_MEDIA_PATH << "test_video_sync.mp4";
293+
FFmpegReader r(path.str());
294+
r.Open();
295+
296+
for (long int frame = 1; frame <= 200; frame++)
297+
{
298+
std::cout << "Requesting Frame: #: " << frame << std::endl;
299+
std::stringstream output;
300+
output << "frame-" << frame << ".png";
301+
std::shared_ptr<Frame> f = r.GetFrame(frame);
302+
f->Save(output.str(), 1.0, "PNG");
303+
}
304+
305+
// Close reader
306+
r.Close();
307+
}

0 commit comments

Comments
 (0)