Examples of VideoInfo


Examples of ca.carleton.gcrc.olkit.multimedia.ffmpeg.VideoInfo

    if( null == progress ) {
      progress = MultimediaConversionProgressNull.getSingleton();
    }
   
    // Get information about video
    VideoInfo videoInfo = null;
    {
      FFmpeg ffmpeg = new FFmpeg();
      videoInfo = ffmpeg.getVideoInfo( inFile );
    }
   
    // Check if conversion is required
    boolean conversionRequired = false;
    if( null == videoInfo.bitRate ) {
      conversionRequired = true;
    } else if( videoInfo.bitRate.intValue() > 250000 ) {
      conversionRequired = true;
    }
    if( false == "h264".equals( videoInfo.videoCodec ) ) {
      conversionRequired = true;
    }
    if( false == "mpeg4aac".equals( videoInfo.audioCodec ) ) {
      conversionRequired = true;
    }
   
    // Report length and dimensions
    request.setInDurationInSec( videoInfo.durationInSec );
    request.setInHeight(videoInfo.height);
    request.setInWidth(videoInfo.width);
   
    if( false == conversionRequired ) {
      // Conversion not required, converted file is the uploaded file
      request.setOutFile(inFile);
      progress.updateProgress(100);
    } else {
      File outFile = request.getOutFile();
      if( null == outFile ) {
        File parentDir = inFile.getParentFile();
        outFile = File.createTempFile("conv", ".mp4", parentDir);
      }
     
      FFmpeg ffmpeg = new FFmpeg(progress);
      ffmpeg.convertVideo(videoInfo, outFile);
     
      request.setOutFile(outFile);
      request.setConversionPerformed(true);

      VideoInfo outVideoInfo = ffmpeg.getVideoInfo( outFile );
      request.setOutDurationInSec( outVideoInfo.durationInSec );
      request.setOutHeight(outVideoInfo.height);
      request.setOutWidth(outVideoInfo.width);
    }
   
View Full Code Here

Examples of ca.carleton.gcrc.olkit.multimedia.ffmpeg.VideoInfo

    if( null == progress ) {
      progress = MultimediaConversionProgressNull.getSingleton();
    }

    // Get information about audio
    VideoInfo audioInfo = null;
    {
      FFmpeg ffmpeg = new FFmpeg();
      audioInfo = ffmpeg.getVideoInfo( inFile );
    }
   
    // Check if conversion is required
    boolean conversionRequired = false;
    if( null == audioInfo.bitRate ) {
      conversionRequired = true;
    } else if( audioInfo.bitRate.intValue() > 250000 ) {
      conversionRequired = true;
    }
    if( false == "mpeg4aac".equals( audioInfo.audioCodec ) ) {
      conversionRequired = true;
    }

    // Report length and dimensions
    request.setInDurationInSec( audioInfo.durationInSec );
   
    if( false == conversionRequired ) {
      // Conversion not required, converted file is the uploaded file
      request.setOutFile(inFile);
      progress.updateProgress(100);
    } else {
      File outFile = request.getOutFile();
      if( null == outFile ) {
        File parentDir = inFile.getParentFile();
        outFile = File.createTempFile("conv", ".mp4", parentDir);
      }

      FFmpeg ffmpeg = new FFmpeg(progress);
      ffmpeg.convertAudio(audioInfo, outFile);
     
      request.setOutFile(outFile);
      request.setConversionPerformed(true);

      VideoInfo outAudioInfo = ffmpeg.getVideoInfo( outFile );
      request.setOutDurationInSec( outAudioInfo.durationInSec );
      request.setOutHeight(0);
      request.setOutWidth(0);
    }
  }
View Full Code Here

Examples of ca.carleton.gcrc.olkit.multimedia.ffmpeg.VideoInfo

    }
  }
 
  private void convertVideo() throws Exception {
    // Get information about video
    VideoInfo videoInfo = null;
    {
      FFmpeg ffmpeg = new FFmpeg();
      videoInfo = ffmpeg.getVideoInfo( fileInfo.getUploadedFile() );
    }
   
View Full Code Here

Examples of ca.carleton.gcrc.olkit.multimedia.ffmpeg.VideoInfo

    }
  }
 
  private void convertAudio() throws Exception {
    // Get information about audio
    VideoInfo audioInfo = null;
    {
      FFmpeg ffmpeg = new FFmpeg();
      audioInfo = ffmpeg.getVideoInfo( fileInfo.getUploadedFile() );
    }
   
View Full Code Here

Examples of com.github.axet.vget.info.VideoInfo

     * extract video information constructor
     *
     * @param source
     */
    public VGet(URL source) {
        this(new VideoInfo(source), null);
    }
View Full Code Here

Examples of com.github.axet.vget.info.VideoInfo

    public VGet(URL source) {
        this(new VideoInfo(source), null);
    }

    public VGet(URL source, File targetDir) {
        this(new VideoInfo(source), targetDir);
    }
View Full Code Here

Examples of com.github.axet.vget.info.VideoInfo

        try {
            AtomicBoolean stop = new AtomicBoolean(false);
            Runnable notify = new Runnable() {
                @Override
                public void run() {
                    VideoInfo i1 = info;
                    DownloadInfo i2 = i1.getInfo();

                    // notify app or save download state
                    // you can extract information from DownloadInfo info;
                    switch (i1.getState()) {
                    case EXTRACTING:
                    case EXTRACTING_DONE:
                    case DONE:
                        System.out.println(i1.getState() + " " + i1.getVideoQuality());
                        break;
                    case RETRYING:
                        System.out.println(i1.getState() + " " + i1.getDelay());
                        break;
                    case DOWNLOADING:
                        long now = System.currentTimeMillis();
                        if (now - 1000 > last) {
                            last = now;

                            String parts = "";

                            List<Part> pp = i2.getParts();
                            if (pp != null) {
                                // multipart download
                                for (Part p : pp) {
                                    if (p.getState().equals(States.DOWNLOADING)) {
                                        parts += String.format("Part#%d(%.2f) ", p.getNumber(), p.getCount()
                                                / (float) p.getLength());
                                    }
                                }
                            }

                            System.out.println(String.format("%s %.2f %s", i1.getState(),
                                    i2.getCount() / (float) i2.getLength(), parts));
                        }
                        break;
                    default:
                        break;
                    }
                }
            };

            info = new VideoInfo(new URL(url));

            // [OPTIONAL] limit maximum quality, or do not call this function if
            // you wish maximum quality available.
            //
            // if youtube does not have video with requested quality, program
View Full Code Here

Examples of org.apache.openmeetings.web.user.record.VideoInfo

      Long recId = getRecordingId();
      if (recId != null) {
        r = getBean(FlvRecordingDao.class).get(recId);
      }
    }
    add(new VideoInfo("info", r).setVisible(r != null), new VideoPlayer("player", r).setVisible(r != null));
  }
View Full Code Here

Examples of railo.runtime.video.VideoInfo

   



  private Pair toMpeg(VideoInput vi) throws PageException, IOException {
    VideoInfo info = getInfo(vi);
    //Struct sct = _doActionInfo(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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.