joy4 icon indicating copy to clipboard operation
joy4 copied to clipboard

example太少啊

Open lanybass opened this issue 7 years ago • 3 comments

我想知道如何把一个rtsp流抓出来保存为flv


	file, _ := avutil.Create("projectindex.flv")
	conn, _ := rtsp.Dial("rtsp://admin:[email protected]/h264/ch1/sub/av_stream")

	demuxer := &pktque.FilterDemuxer{Demuxer: conn, Filter: &pktque.Walltime{}}
	//demuxer := &transcode.Demuxer{Demuxer: conn,}
	avutil.CopyFile(file, demuxer)

上面代码我乱猜的,不行啊,开启 rtsp.DebugRtp = true 就看见错误,不开debug就闪退:

rtsp: dollar at 11 12 panic: runtime error: invalid memory address or nil pointer dereference

lanybass avatar Apr 14 '17 04:04 lanybass

upvote

sundl123 avatar Nov 29 '17 13:11 sundl123

有办法了吗

iamsee avatar Nov 21 '19 15:11 iamsee

有办法了吗

你现在还在用这个库吗?

lh948 avatar Mar 02 '20 16:03 lh948