LinuxConsulting

- Nicu Pavel personal page

mp4join



    mp4join is an utility written in C that joins 2 mpeg4 files by using only file operations without doing any processing of the video, audio, or other tracks. There are GTK and console only version available, future versions will condensate the both versions into a single one.

Usage


For GTK application just run the application and select the files to join. For console application edit and use run.sh to run the utility or run mp4join infile1.mp4 infile2.mp4 outfile.mp4.

Description

  • mp4join - joins 2 (or more in the future) mp4 files with similar video/audio tracks encoding in realtime (without reencoding)
  • mp4join outputs a new file which is ISO/IEC 14496-1 compliant
  • mp4join is based on libmp4v2 and code from mpeg4ip project.

Assumptions

  • mp4join requires 2 files with similar encoding parameters. Most important at this moment are:     FrameRate, VideoSize, Codec, Sample Rate for audio.
  • mp4join doesn't work with broken mp4 files. It needs basic atom descriptors.

Limitations

  • Supported video codecs: The video track creator only supports: xvid, m4v/mp4v, divx, cmp. Profile variations don't matter.
  • H.264 is NOT SUPPORTED.
  • Supported audio codecs:AAC. Profile variations don't matter (low complexity or main are ok).
  • Encryption of the track is not supported
  • There is no hinting of tracks (ie tracks won't be "streamable" thru Darwin Streaming Server)
  • Only Video and Audio tracks are supported. Scene descriptors (BIFS) and Object Descriptors (OD) are not supported.
  • MP4 Metadata (author, title, genre) is partial supported (ie file has support for metadata but only TOOL field is filled with "mpeg4 joiner 0.0.1")
  • FrameRate is HARDCODED at 30. Variable Frame Rate is NOT SUPPORTED.
  • Audio and Video tracks should have the SAME time length there is no padding/trimming done on joining. Small differences less than 5s are "OK".
  • Track TimeScale is HARDCODED.
  • Video Profile and Audio Profile are read from the VOL/VO header.
  • There is no way to specify a video/audio profile now.
  • For AAC only ADTS header is supported (older ADIF is not supported).



Downloads:


GTK version (0.0.2)
Source archive can be downloaded here: mp4join-src-0.0.2.tgz
Compiled binary can be downloaded here: mp4join-bin-0.0.2.tgz

console version (0.0.1)
In the source and binary archive I placed mpeg4ip libraries and includes for users without mpeg4ip installed.

Source archive can be downloaded here: mp4join-src-0.0.1.tgz
Compiled binary can be downloaded here: mp4join-bin-0.0.1.tgz
Source can be browsed online here: source
MPEG 4 samples can be downloaded from here: samples


mp4join