• 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 "
    --------------------
    
    "; 
  • 相关阅读:
    正则表达式进阶——你从没想过的正则表达式使用方式
    bert 预训练模型路径
    Ubuntu 18.04 美化
    循环中存在异步的情况
    SQL truncate 、delete与drop区别
    用express创建网站出现"$ DEBUG=microbog ./bin/www"的提示
    全局安装了express框架,但是无法使用express指令的问题
    jQuery获取textarea中的文本
    js实现查询关键词,使其高亮
    SQL Server常用函数汇总
  • 原文地址:https://www.cnblogs.com/fenle/p/5779698.html
Copyright © 2020-2023  润新知