We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在是2个都保存为宽了
gomedia/go-codec/h264.go
Line 489 in 17feea5
The text was updated successfully, but these errors were encountered:
还有2个关联的问题:
[SAR 1:1 DAR 16:9]
func GetTsVideoInfo(tsPath string) (info TsVideoInfo) { demuxer := mpeg2.NewTSDemuxer() demuxer.OnFrame = func(cid mpeg2.TS_STREAM_TYPE, frame []byte, pts uint64, dts uint64) { if cid == mpeg2.TS_STREAM_H264 { codec.SplitFrameWithStartCode(frame, func(nalu []byte) bool { naluType := codec.H264NaluType(nalu) if naluType == codec.H264_NAL_SPS { info.Width, info.Height = codec.GetH264Resolution(nalu) start, sc := codec.FindStartCode(nalu, 0) sodb := codec.CovertRbspToSodb(nalu[start+int(sc)+1:]) bs := codec.NewBitStream(sodb) var s codec.SPS s.Decode(bs) if s.VuiParameters.NumUnitsInTick > 0 { info.Fps = int(s.VuiParameters.TimeScale / s.VuiParameters.NumUnitsInTick / 2) } info.Sar = int(s.VuiParameters.SarWidth) // 这里是0 return false } return true }) } }
Sorry, something went wrong.
No branches or pull requests
现在是2个都保存为宽了
gomedia/go-codec/h264.go
Line 489 in 17feea5
The text was updated successfully, but these errors were encountered: