*************************************************************************************************************** ************
Easywave Time: 2014.10.31
Category: Linux applications-mp4 video recording library Mp4v2 transplant Experience and introduction statement: Reproduced, please keep the link
Note: If there is an error, please correct me. These are the journal articles I studied ...
*************************************************************************************************************** ************
A: Mp4v2 Library introduction
Mp4v2 's predecessor was a feature library in the Mpeg4ip Open source project, but now MPEG4IP is no longer updated. But Mp4v2 is still being updated and independent. MP4V2 is primarily an open source library that is recorded as a MP4 file, as follows:
MPEG4IP provides an end-to-end system for the transmission of audio and video streams and supports different encoding formats including mpeg4/h.261/mpeg2/h.263 MP3/AAC/AMR. Now that the Google related code.google.com has been unable to open, so we have to provide the following, as follows: Https://launchpad.net/ubuntu/+source/mp4v2
II: Compilation of MP4V2
Under Linux to compile Mp4v2, first need to configure which options, we can configure to see, execute./configure--help on it, as shown below:
/work/prj/mp4v2/mp4v2-2.0.0$./configure--help ' Configure ' configures Mp4v2 2.0.0 to adapt to many kinds of systems. Usage:./configure [OPTION] ... [Var=value] ... To assign environment variables (e.g., CC, CFLAGS ...), specify them asvar=value. See below for descriptions of some of the useful variables. Defaults for the options is specified in brackets. Configuration:-H,--help display this Help and exit--help=short display options specific to th Is package--help=recursive display the short help of all the included Packages-v,--version display V Ersion information and Exit-q,--quiet,--silent do not print ' checking ... ' Messages--cache-file=file cache Te St results in FILE [disabled]-C,--config-cache alias for '--cache-file=config.cache '-N,--no-create do n OT Create output files--srcdir=dir find the sources in dir [Configure DIR or ' ... '] Installation directories:--prefix=prefix Install Architecture-independent files in PREFIX [/usr/local]--exec-prefix=eprefix install Architecture-de pendent files in Eprefix [prefix]by default, ' make install ' would install all the files in '/usr/lo Cal/bin ', '/usr/local/lib ' etc. You can Specifyan installation prefix other than '/usr/local ' using '--prefix ', for instance '--prefix= $HOME '. For better control, use the options below. Fine tuning of the installation directories:--bindir=dir user executables [Eprefix/bin]--sbindir=dir System admin Executables [Eprefix/sbin]--libexecdir=dir program executables [eprefix/libexec]--sysconfdir=d IR read-only single-machine data [prefix/etc]--sharedstatedir=dir modifiable architecture-independent data [PR Efix/com]--localstatedir=dir modifiable single-machine data [Prefix/var]--libdir=dir object code Librar ies [eprefix/lib]--includedir=dir C header files [prefix/include]--oldincLudedir=dir C header files for NON-GCC [/usr/include]--datarootdir=dir read-only arch.-independent data root [ Prefix/share]--datadir=dir read-only architecture-independent data [Datarootdir]--infodir=dir Info Documentation [DATAROOTDIR/INFO]--localedir=dir locale-dependent data [Datarootdir/locale]--mandir=DIR Man documentation [Datarootdir/man]--docdir=dir documentation root [datarootdir/doc/mp4v2]--htmldir=di R HTML documentation [DOCDIR]--dvidir=dir DVI documentation [DOCDIR]--pdfdir=dir PDF D ocumentation [Docdir]--psdir=dir PS documentation [Docdir]program names:--program-prefix=prefix Prepend PREFIX to Installed program names--program-suffix=suffix append suffix to Installed program names- -program-transform-name=program run SED program on installed program Namessystem types:--build=build Configure for Building on BUILD [guesSED]--host=host cross-compile to build programs to run on host [build]optional Features:--disable-option-checkin G Ignore unrecognized--enable/--with options--disable-feature do not include FEATURE (same as--enable-feature=n o)--enable-feature[=arg] include FEATURE [arg=yes]--disable-debug disable debugging compilation--disable-op Timize Disable optimizing compilation--disable-fvisibility disable use of-fvisibility--disable-gch D isable GCC precompiled-headers--disable-largefile Disable LFS (large file support)--disable-util disable Build of command-line utilities--enable-bi=arch Enable-march for Bi-arch compilation--enable-ub[=archs] En Able-arch Arch for Universal-binaries (OSX only)--enable-cygwin-win32 when building with Cygwin Use-mwin32--enable -mingw-threads when building with MinGW use-mthreads--disable-dependency-tracking speeds up one-time build--enable- Dependency-tracking do Not reject slow dependency extractors--enable-shared[=pkgs] Build shared libraries [Default=yes]--enable-static[=pkg S] Build static libraries [Default=yes]--enable-fast-install[=pkgs] optimize for fast Installa tion [Default=yes]--disable-libtool-lock avoid locking (might break parallel builds) Optional Packages:--with-package[ =ARG] Use package [Arg=yes]--without-package does not use the package (same as--with-package=no)--with-pic Try to use only Pic/non-pic objects [Default=use both]--with-gnu-ld assume the C compiler uses GNU LD [default=no]some influential environment Variables:cxx C + + compiler command Cxxflags C + + compiler flags LDFLAGS linker flags, e.g.-l<lib dir> if you had libraries in a nonstandard D Irectory <lib dir> LIBS libraries to pass to the linker, e.g.-l<library> cppflags (Objective) C/ + + preprocessor flags, E. G.-i<include dir> If you had headers in a nonstandard directory <include dir> CC c c Ompiler command CFLAGS C compiler flags CPP C preprocessor cxxcpp C + + preprocessoruse these variables To override the choices made by ' configure ' or to Helpit to find libraries and programs with nonstandard names/locations. Report bugs to <[email protected]>.
There are too many options, how to choose, I am here to provide a build.sh script, please press the inside of the configuration to do it, but note that:--disable-optimize, if the--enable-optimize after the Mp4v2 compiled library will be much less, otherwise mp4v2 library will be relatively larger, specific take Just look at yourself and feel it, this is not the case. The build.sh script file looks like this:
Once the./build.sh script is run, it is automatically compiled and installed, and after compilation succeeds, the following folder is generated in the _install directory as follows:
See if there is a mp4v2 library under the Lib directory, as shown below:
To know how to use this library, you can refer to the application code under the Util directory as follows:
Specific applications will need to see their own, follow-up will be used in a practical project. This is not a detailed description of how to use it.
Mp4v2 porting and introduction of MP4 video recording library under embedded Linux