use of lucee.runtime.video.VideoInfo in project Lucee by lucee.
the class Video method toMpeg.
private Pair toMpeg(VideoInput vi) throws PageException, IOException {
VideoInfo info = getInfo(vi);
if ("mpeg1video".equals(info.getVideoCodec()))
return new Pair(vi.getResource(), toStruct(info));
VideoOutput tmp = new VideoOutputImpl(pageContext.getConfig().getTempDirectory().getRealResource("tmp-" + new Random().nextInt() + ".mpg"));
try {
doActionConvert(vi, tmp, null, null, NAMECONFLICT_ERROR);
return new Pair(tmp.getResource(), toStruct(info));
} catch (PageException pe) {
tmp.getResource().delete();
throw pe;
} catch (IOException ioe) {
tmp.getResource().delete();
throw ioe;
}
}
Aggregations