示例#1
0
文件: a.go 项目: huhaibo/mp4
func write() {
	m, _ := mp4.Open("/Users/Xieran/Desktop/a.mp4")
	fmt.Println(m.W, m.H)
	pkts := m.ReadDur(20)
	m2, _ := mp4.Create("/tmp/out.mp4")
	fmt.Println(len(pkts))
	for _, p := range pkts {
		fmt.Println(p)
		m2.Write(p)
	}
	m2.Close()
}
示例#2
0
文件: a.go 项目: huhaibo/mp4
func read() {
	m, err := mp4.Open("/tmp/out.mp4")
	mp4.LogLevel(0)
	fmt.Println(m.W)
}