Skip to content
gen2brainPublic

About

MPEG-4 Part 2 (DivX, Xvid, H.263) video decoder in pure Go

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpeg4

Status Go Reference

MPEG-4 Part 2 video decoder in pure Go (DivX, Xvid, H.263), with an AVI demuxer. No CGo, no dependencies.

Usage

Decode a raw MPEG-4 or H.263 stream from an io.Reader:

r := mpeg4.NewReader(f)

for {
    pic, pts, err := r.Next()
    ...
}

Decode the video track of an AVI file:

f, err := avi.Open(r, size)
v, err := mpeg4.NewVideo(f.Video(), f.Video().Handler)

for {
    pic, pts, err := v.Next()
    ...
}

Pictures come back in display order and stay valid until the next Decode or Next. NewVideo takes any track that implements mpeg4.Samples.

Supported

  • Simple and Advanced Simple profiles, and baseline H.263
  • I, P and B-VOPs, quarter sample motion, GMC and interlaced video
  • Data partitioning, RVLC and video packets
  • DivX packed bitstreams
  • AVI, including OpenDML

License

MIT, see LICENSE. The decoder is a port of OxideAV. This software is based in part on the work of the Independent JPEG Group.

The MPEG-4 Visual patents have expired; the last one in the licensing pool ran out in July 2026.

About

MPEG-4 Part 2 (DivX, Xvid, H.263) video decoder in pure Go

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages