使用package github.com/abema/go-mp4时,当我试图在文档中运行这个示例时,我会得到以下错误:
invalid operation: box (variable of type *mp4.BoxInfo) is not an interface 下面是我正在尝试的例子:
// extract specific boxes
boxes, err := mp4.ExtractBox(file, nil, mp4.BoxPath{mp4.BoxTypeMoov(), mp4.BoxTypeTrak(), mp4.BoxTypeTkhd()})
if err != nil {
:
}
for _, box := range boxes {
tkhd := box.(*mp4.Tkhd)
fmt.Println("track ID:", tkhd.TrackID)
}发布于 2022-04-25 17:49:19
对不起,这是我的示例代码的错误。
我创建了请求请求来修复它。https://github.com/abema/go-mp4/pull/113/files
当您发现关于go-mp4的任何其他问题时,如果您能在GitHub上创建新的问题,我将不胜感激。https://github.com/abema/go-mp4/issues
https://stackoverflow.com/questions/71938115
复制相似问题