docs: public boolean check() throws Exception {
          // create a temporary copy from input
          File fileCopy = File.createTempFile("modeshape-sequencer-video", ".tmp");
          IoUtil.write(in, new BufferedOutputStream(new FileOutputStream(fileCopy)));
  
          final Demuxer container = Demuxer.make();
          container.open(fileCopy.getAbsolutePath(), null, false, true, null, null);
  
          // try to delete the file immediately or on JVM exit
          boolean deleted = false;
          try {
              deleted = fileCopy.delete();
          } catch (SecurityException e) {
              // ignore
          }
          if (!deleted) {
              fileCopy.deleteOnExit();
          }
  
          KeyValueBag metadata = container.getMetaData();
          for (String key : metadata.getKeys()) {
              if (key.toLowerCase(Locale.ROOT).equals("title")) {
                  title = metadata.getValue(key);
              }
              if (key.toLowerCase(Locale.ROOT).equals("comment")) {
                  comment = metadata.getValue(key);
              }
              if (key.toLowerCase(Locale.ROOT).equals("encoder")) {
                  encoder = metadata.getValue(key);
              }
          }
  
          if (container.getDuration() != Global.NO_PTS) {
              // convert to seconds
              duration = (float) container.getDuration() / 1000.0 / 1000.0;
          }
          if (container.getBitRate() > 0) {
              bitrate = container.getBitRate();
          }
  
          for (int i = 0; i < container.getNumStreams(); i++) {
              StreamMetadata streamMetadata = new StreamMetadata();
              DemuxerStream stream = container.getStream(i);
  
              Decoder coder = stream.getDecoder();
  
              if (coder.getCodecType() == Type.MEDIA_AUDIO) {
                  streamMetadata.setStreamType("audio");
              } else if (coder.getCodecType() == Type.MEDIA_VIDEO) {
                  streamMetadata.setStreamType("video");
              } else {
                  streamMetadata.setStreamType("unknown");
              }
  
              if (coder.getCodec() != null) {
                  streamMetadata.setCodec(coder.getCodec().getName());
              }
              streamMetadata.setSamplerate(nullValueIfInvalid(coder.getSampleRate()));
              streamMetadata.setChannels(nullValueIfInvalid(coder.getChannels()));
              streamMetadata.setWidth(nullValueIfInvalid(coder.getWidth()));
              streamMetadata.setHeight(nullValueIfInvalid(coder.getHeight()));
              if (coder.getTimeBase() != null) {
                  streamMetadata.setFramerate(nullValueIfInvalid(1.0 / coder.getTimeBase().getDouble()));
              }
              streams.add(streamMetadata);
          }
          container.close();
          return true;
      }