Closed orestonce closed 1 year ago
不好意思 是上次修改引入的bug, 已经修复,请更新至最新版本测试
可以了
While saving as mp4 from rtmp at certain intervals, a time problem arises in the mp4 file. I was using -vsync 0 when I recorded using FFMPEG. How should we proceed here?
sorry ,could you explain to me time problem in detail ?
最新的commit好像又出现了
@hasnhasan Can you provide a minimal example for reproducing your problem ?
已经解决了。见issus-> #41
@xm0625 好的
import ( "fmt" "io/ioutil" "os"
)
func main() { tsfile :=
01389.ts
// input mp4filename := "output-gomedia.mp4" // output mp4file, err := os.OpenFile(mp4filename, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0666) if err != nil { fmt.Println(err) return } defer mp4file.Close()}
read file 0 Got aac sample rate: 44100 panic: runtime error: index out of range [3] with length 3
goroutine 1 [running]: github.com/yapingcat/gomedia/codec.H265NaluType(...) /root/go/pkg/mod/github.com/yapingcat/gomedia@v0.0.0-20220717141418-916ca463aae9/codec/util.go:95 github.com/yapingcat/gomedia/mpeg2.(TSDemuxer).flush.func1({0xc0000c9e17, 0x9dd, 0x0}) /root/go/pkg/mod/github.com/yapingcat/gomedia@v0.0.0-20220717141418-916ca463aae9/mpeg2/ts-demuxer.go:158 +0xa9 github.com/yapingcat/gomedia/codec.SplitFrameWithStartCode({0xc0000c9800, 0xc0001ce006, 0xaa}, 0xc000088b30) /root/go/pkg/mod/github.com/yapingcat/gomedia@v0.0.0-20220717141418-916ca463aae9/codec/util.go:66 +0xbc github.com/yapingcat/gomedia/mpeg2.(TSDemuxer).flush(0xc000088ea0) /root/go/pkg/mod/github.com/yapingcat/gomedia@v0.0.0-20220717141418-916ca463aae9/mpeg2/ts-demuxer.go:152 +0x173 github.com/yapingcat/gomedia/mpeg2.(*TSDemuxer).Input(0xc000088ea0, {0x4e9fa0, 0xc00008e210}) /root/go/pkg/mod/github.com/yapingcat/gomedia@v0.0.0-20220717141418-916ca463aae9/mpeg2/ts-demuxer.go:139 +0x4a5 main.main() /root/work/min/main.go:67 +0x44d