Search in sources :

Example 1 with VideoExecuter

use of lucee.runtime.video.VideoExecuter in project Lucee by lucee.

the class IsVideoFile method call.

public static boolean call(PageContext pc, String path) throws PageException {
    try {
        ConfigWeb config = pc.getConfig();
        VideoExecuter ve = VideoUtilImpl.createVideoExecuter(config);
        ve.info(config, new VideoInputImpl(Caster.toResource(pc, path, true)));
    } catch (Exception e) {
        if (StringUtil.contains(e.getMessage(), "missing ffmpeg installation"))
            throw Caster.toPageException(e);
        return false;
    }
    return true;
}
Also used : VideoExecuter(lucee.runtime.video.VideoExecuter) ConfigWeb(lucee.runtime.config.ConfigWeb) VideoInputImpl(lucee.runtime.video.VideoInputImpl) PageException(lucee.runtime.exp.PageException)

Aggregations

ConfigWeb (lucee.runtime.config.ConfigWeb)1 PageException (lucee.runtime.exp.PageException)1 VideoExecuter (lucee.runtime.video.VideoExecuter)1 VideoInputImpl (lucee.runtime.video.VideoInputImpl)1