zoukankan      html  css  js  c++  java
  • Ffmpeg

    Ffmpeg

    <?php 
    $movefile = "./4.mp4"; 
    $mov = new ffmpeg_movie($movefile); 
        printf("file name = %s
    ", $mov->getFileName()); 
        printf("duration = %s seconds
    ", $mov->getDuration()); 
        printf("frame count = %s
    ", $mov->getFrameCount()); 
        printf("frame rate = %0.3f fps
    ", $mov->getFrameRate()); 
        printf("comment = %s
    ", $mov->getComment()); 
        printf("title = %s
    ", $mov->getTitle()); 
        printf("author = %s
    ", $mov->getAuthor()); 
        printf("copyright = %s
    ", $mov->getCopyright()); 
        printf("get bit rate = %d
    ", $mov->getBitRate()); 
        printf("has audio = %s
    ", $mov->hasAudio() == 0 ? 'No' : 'Yes'); 
        if ($mov->hasAudio()) { 
            printf("get audio stream id= %s
    ", $mov->getAudioStreamId()); 
            printf("get audio codec = %s
    ", $mov->getAudioCodec()); 
            printf("get audio bit rate = %d
    ", $mov->getAudioBitRate()); 
            printf("get audio sample rate = %d 
    ", $mov->getAudioSampleRate()); 
            printf("get audio channels = %s
    ", $mov->getAudioChannels()); 
        } 
        printf("has video = %s
    ", $mov->hasVideo() == 0 ? 'No' : 'Yes'); 
        if ($mov->hasVideo()) { 
            printf("frame height = %d pixels
    ", $mov->getFrameHeight()); 
            printf("frame width = %d pixels
    ", $mov->getFrameWidth()); 
            printf("get video stream id= %s
    ", $mov->getVideoStreamId()); 
            printf("get video codec = %s
    ", $mov->getVideoCodec()); 
            printf("get video bit rate = %d
    ", $mov->getVideoBitRate()); 
            printf("get pixel format = %s
    ", $mov->getPixelFormat()); 
            printf("get pixel aspect ratio = %s
    ", $mov->getPixelAspectRatio()); 
            $frame = $mov->getFrame(10); 
            printf("get frame = %s
    ", is_object($frame) ? 'true' : 'false'); 
            printf("  get frame number = %d
    ", $mov->getFrameNumber()); 
            printf("  get frame width = %d
    ", $frame->getWidth()); 
            printf("  get frame height = %d
    ", $frame->getHeight()); 
        } 
        echo "
    --------------------
    
    "; 
  • 相关阅读:
    在 Linux 下搭建 Git 服务器***
    使用 SVN Hook 实现服务器端代码自动更新
    git服务器的建立
    Oracle 11gR2 RAC集群服务启动与关闭总结
    Cluster的日记体系
    DB time VS. DB CPU
    oracle 内存分配和调优 总结
    利用logminer恢复delete误删除操作的数据
    大话RAC介质恢复---联机日志损坏
    ORACLE联机日志文件丢失或损坏的处理方法(转)
  • 原文地址:https://www.cnblogs.com/fenle/p/5779698.html
Copyright © 2011-2022 走看看