!7 cmodule VideoSplicer > DynPrintLog { S inputFile, outputFile; S timestamps; transient ImageSurface isPreview; visual jvsplit(northAndCenterWithMargins( jvstack( withLabel("Input video:", filePathInputWithBrowseButton(dm_textField('inputFile))), withLabel("Output video:", filePathInputWithBrowseButton(dm_textField('outputFile))), rightAlignedLine(jbutton("Load video", rThread loadVideo))), dm_textArea('timestamps)), jhsplit(jsection("Preview", isPreview = jImageSurface()), super)); void loadVideo enter { File f = newFile(inputFile); if (fileExists(f)) ret with infoBox("File not found: " + f2s(f)); S id = md5(f2s(f)); File previewFile = prepareCacheProgramFile("preview-" + id + ".jpg"); if (!fileExists(previewFile)) ffmpeg_getSingleFrame(f, previewFile, 0.0); isPreview.setImage(loadImage2(previewFile)); } }