【问题标题】:How to read Mdat atoms of a mp4 video?如何读取 mp4 视频的 Mdat 原子?
【发布时间】:2022-08-05 06:07:51
【问题描述】:

我正在尝试解析 mp4 并能够解析 moov,但不确定如何使用 moov 信息来解析 mdat

我的目标是从mdat 获取轨道信息,如元数据和可能的帧,因为它包含视频和音频数据。

目前关注QuickTime File Format Specification

尝试使用Sample-to-Chunk Atoms,但我所有的 stsc(20 字节)看起来像这样:

[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0]
[0 0 0 1]
[0 0 0 1 0 0 0 1]
[0 0 0 1]
    fmt.Println(binary.BigEndian.Uint32(buf[0:4])) //4
    fmt.Println(binary.BigEndian.Uint32(buf[4:8])) //4
    fmt.Println(binary.BigEndian.Uint32(buf[8:16])) //8
    fmt.Println(binary.BigEndian.Uint32(buf[16:20])) //4

目前不知道如何接近和解析mdat 原子。

任何帮助,将不胜感激!

标签: python go parsing mp4


【解决方案1】:

mp4 规范是 ISO/IEC 14496-12,它比 qt 规范更明确。

如果您想了解示例表如何引用单个框架,您可以在此处查看我的项目https://github.com/essential61/mp4analyser

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-25
    • 2015-12-05
    • 2012-07-16
    • 2013-09-24
    • 1970-01-01
    • 1970-01-01
    • 2011-08-26
    • 2012-04-28
    相关资源
    最近更新 更多