June 2018
Intermediate to advanced
436 pages
10h 33m
English
I developed a simple UI application, using Java Swing to test whether the code correctly handles frames. This UI reads an input video file in MP4 format and shows frames to the reader one by one like a simple video player. The UI application is named JCodecTest.java.
In the JCodecTest.java class, the testReadFrame() method utilizes the getFrameFromFile() method from the FrameGrab class (that is, from the JavaCV library) and checks whether the frame extraction process from each video clip works correctly. Here is the signature:
private void testReadFrame(Consumer<Picture> consumer) throws IOException, JCodecException { // Read the clip sequentially one by one next: for(Iterator<Pair<Path, String>> iter = ...