joy4 icon indicating copy to clipboard operation
joy4 copied to clipboard

bug: avutil.CopyFile not ok for for xxx.ts input file

Open fastfading opened this issue 4 years ago • 1 comments

func Mp4Mux(srcFile, dstFile string) {
	demuxer, err := avutil.Open(srcFile)
	if err != nil {
		log.Fatalln(" srcFile:", srcFile, "error", err)
	}
	defer demuxer.Close()

	muxer, _ := avutil.Create(dstFile)
	defer muxer.Close()

	// CopyFile(muxer, demuxer)
	avutil.CopyFile(muxer, demuxer)
}

this is ok for mp4 file , but not ok for for xxx.ts input file.
output file can not be played

fastfading avatar May 27 '20 02:05 fastfading

image

image this will happen when there are 2 I frame in ts each I frame in different ts packet seems not work well in multi-slice mode

fastfading avatar Jul 02 '20 08:07 fastfading