SAMPEG is a family of MPEG encoder programs targeted primarily for optimum picture
quality. However, MMX support is included to considerably speed up the encoding
process. On target systems without MMX support, replacement functions are provided
so that SAMPEG works on every processor architecture.
The SAMPEG family currently consists of 3 programs:
- SAMPEG-2, an encoder which was developed as my masters thesis and had
parallelization on multi-processor systems as a primary design goal.
Development of SAMPEG-2 has been discontinued in favour of the new encoders.
- SAMPEG-3 is a completely rewritten MPEG-2 encoder which will support
MPEG-2 encoding up to HP@HL. However, SAMPEG-3 will at some time be renamed
- SAMPEG-4 was planned to be an MPEG-4 encoder, but was canceled due to lack of time
The MPEG-1 part of SAMPEG-3 is now complete and MPEG-2 works except field picture
The program architecture is MPEG-4 aware, but nothing useful has been implemented yet.
The installation of LibVideoGfx
is required prior to compilation of SAMPEG-4.
(NOTE: the MMX routines require a Pentium-III processor.
This is not checked by the program. If you have an x86 processor which does not support
MMX-2 instructions, you have to manually remove the ENABLE_MMX line from config.h after
- 0.0.3 now based on libvideogfx-1.0.3
- 0.0.2 minor bugfixes, should now compile on gcc 3.2
- 04.Dec.2001 prerelease
- 03.Dec.2001 prerelease
- 30.Nov.2001 prerelease (seems to work with GCC 2.96 now)
- 05.Nov.2001 CVS snapshot (GCC 2.96 seems to
generate bad code when enabling any optimization options. You will have to use a different
compiler or configure with CXXFLAGS=-O0 ./configure.)
Here are some examples for typical use-cases:
- Encode JPEG image sequence with 1.5 Mbps:
sampeg --format=jpeg --input=img%03d.jpg -r1.5M -o out.mpg
- Encode raw YUV-data:
sampeg --format=yuv --input=raw.yuv:352x288 -r1.5M -o out.mpg
- Encode in fast mode (no rate-control at the moment):
sampeg --fastmode -i raw.yuv:352x288 -o out.mpg
- Encode from V4L input device:
sampeg --format=v4l -i 352x288:/dev/video0 ...
- Encode with IPPP GOP-pattern:
sampeg -i raw.yuv:352x288 -g 4 -p 1 -o out.mpg
- Transcode high bit-rate MPEG to lower bit-rate (dvdview must be in your $PATH):
sampeg --format=mpeg -i big.mpg -r 768k -o out.mpg
There are also some publications on SAMPEG-2 available online on
For bug-reports or suggestions contact, send me an .