You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Cloud Vision处理低帧率iPhone MP4视频时时间偏移异常

问题:Google Cloud Video Intelligence处理iPhone录制低帧率MP4时时间偏移计算错误

问题现象

  • 处理iPhone(Safari录制)的低帧率(约5fps)MP4视频时,返回结果中的endTimeOffset和检测对象的timeOffset存在明显偏差
  • 示例:一段实际时长4.5秒、帧率5.236fps的视频,处理后endTimeOffset仅为0.834166s,与实际时长不符
  • 该问题在时长超过15秒的MP4视频中极易复现,但同参数的WEBM视频处理结果正常

检测结果示例

{ 
  "annotationResults": [
    { 
      "segment": { 
        "endTimeOffset": "0.834166s", 
        "startTimeOffset": "0s" 
      }, 
      "inputUri": "/obfuscated_path/c9bb312c-77ef-4fc2-a577-698e10797316.mp4", 
      "frameLabelAnnotations": [
        { 
          "entity": { 
            "entityId": "/m/0643t", 
            "description": "personal computer", 
            "languageCode": "en-US" 
          }, 
          "frames": [
            { 
              "confidence": 0.5484067, 
              "timeOffset": "1s" 
            } 
          ], 
          "categoryEntities": [
            { 
              "entityId": "/m/01m3v", 
              "description": "computer", 
              "languageCode": "en-US" 
            } 
          ] 
        },
        // 其余检测结果省略
      ]
    }
  ]
}

MP4文件属性

  • 分辨率:1280x720
  • 帧率:5.236fps
  • 时长:4.5s

执行检测的Java代码片段

// --snip
// Set the label detection mode
LabelDetectionConfig config =
    LabelDetectionConfig.newBuilder()
        .setLabelDetectionMode(LabelDetectionMode.FRAME_MODE)
        .build();

// Set the video context with the above configuration
VideoContext context = VideoContext.newBuilder().setLabelDetectionConfig(config).build();

AnnotateVideoRequest request =
    AnnotateVideoRequest.newBuilder()
        .setInputUri(videoObj.getUri())
        .addFeatures(Feature.LABEL_DETECTION)
        .setVideoContext(context)
        .build();

// -- snip

VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create();

client.annotateVideoAsync(request);

疑问

这是MP4格式的已知问题吗?是否有解决方法?

内容的提问来源于stack exchange,提问作者S. D.

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 04:54:59