var (
ErrInvalidDuration = errors.New("invalid duration")
ErrClipOutside = errors.New("clip zone is outside video")
ErrTruncatedChunk = errors.New("chunk was truncated")
)
type Filter interface {
// Updates the moov box FilterMoov(m *mp4.MoovBox) error// Filters the Mdat data and writes it to w FilterMdat(w io.Writer, m *mp4.MdatBox) error
}
Clip returns a filter that extracts a clip between begin and begin + duration (in seconds, starting at 0)
Il will try to include a key frame at the beginning, and keeps the same chunks as the origin media