All posts by cconcolato

MPEG-SVC in GPAC

This week was held in Incheon, South Korea, the 104th MPEG meeting. For this occasion, the GPAC team worked hard to prepare the following contribution.

This contribution discusses MPEG-HEVC (see this post), WebVTT and in particular the support for MPEG Scalable Video Coding (SVC) packaging, streaming and playback in GPAC. I’ve extracted the SVC related part of this contribution in this post. Continue reading MPEG-SVC in GPAC

Live DASH audio/video encoder: DashCast

Dear GPAC users,

We’ve just released a new application which might be of interest to some (hopefully many) of you. It’s called DashCast. It’s an application which allows you to:

  1. transcode a live/non-live stream in multiple qualities (eg. bitrate and resolution).
  2. segment a continuous stream in small chunks and packetize them for delivery via Dynamic Adaptive Streaming over HTTP (DASH) standard.

For more information, check out the dedicated page.

Deferred rendering in GPAC

Since revision 2028 of the source code, the GPAC player can render content in a special mode called “defer-debug”. In this mode, only the rectangular regions of the window that have changed since the previous frame are drawn in each frame. To enable this mode, you need to modify the GPAC configuration file (i.e. GPAC.cfg or .gpacrc), by setting the DrawMode to “defer-debug” in the Compositor section. Continue reading Deferred rendering in GPAC

Compiling GPAC on Debian and Ubuntu (and other Unix distros)

Updated May 13th 2016

Introduction

Starting from a fresh Ubuntu 10.10, Ubuntu 12.04 or Debian testing 6 (Wheezy), the following steps will provide you with a fully working GPAC.

Get the source code

sudo apt-get install git
git clone https://github.com/gpac/gpac.git

Deprecated (not updated since 2014):

sudo apt-get install subversion
svn co svn://svn.code.sf.net/p/gpac/code/trunk/gpac gpac

Get the dependencies

The instructions differ depending on the linux distribution.

Ubuntu 10.10

sudo apt-get install zlib1g-dev xulrunner-1.9.2-dev libfreetype6-dev libjpeg62-dev libpng12-dev libopenjpeg-dev libmad0-dev libfaad-dev libogg-dev libvorbis-dev libtheora-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxv-dev x11proto-video-dev libgl1-mesa-dev x11proto-gl-dev linux-sound-base libxvidcore-dev libwxbase2.8-dev libwxgtk2.8-dev wx2.8-headers libssl-dev libjack-dev libasound2-dev libpulse-dev libsdl1.2-dev dvb-apps libavcodec-extra-53 libavdevice-dev

Modify the file /etc/ld.so.conf (you must be in the sudoers list), to help GPAC find Mozilla JavaScript dynamic library, by adding the line at the beginning of the file:

/usr/lib/xulrunner-1.9.2.16/

Note:Inserting the line at the end of the file may result in broken libxul dependencies since firefox 11 and the introduction of libssl3 in mozilla’s build.
Note:Ubuntu may update the xulrunner packages. Replace 1.9.2.16 by whatever your xulrunner version is.

Ubuntu 11.10

Compared to Ubuntu 10.10, the xulrunner-dev package must be replaced by firefox-dev.
Modify the file /etc/ld.so.conf setting

/usr/lib/firefox-7.0.1

The firefox version must be the same as installed on your system (it is possible that no version is included in the path, e.g. only /usr/lib/firefox/ is present) and run ldconfig to update the libraries:

sudo ldconfig

Ubuntu 12.04

sudo apt-get install make pkg-config g++ zlib1g-dev libfreetype6-dev libjpeg62-dev libpng12-dev libopenjpeg-dev libmad0-dev libfaad-dev libogg-dev libvorbis-dev libtheora-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxv-dev x11proto-video-dev libgl1-mesa-dev x11proto-gl-dev linux-sound-base libxvidcore-dev libssl-dev libjack-dev libasound2-dev libpulse-dev libsdl1.2-dev dvb-apps libavcodec-extra-53 libavdevice-dev libmozjs185-dev

Ubuntu 14.04

sudo apt-get install subversion make pkg-config g++ zlib1g-dev libfreetype6-dev libjpeg62-dev libpng12-dev libopenjpeg-dev libmad0-dev libfaad-dev libogg-dev libvorbis-dev libtheora-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev libxv-dev x11proto-video-dev libgl1-mesa-dev x11proto-gl-dev linux-sound-base libxvidcore-dev libssl-dev libjack-dev libasound2-dev libpulse-dev libsdl1.2-dev dvb-apps libavcodec-extra libavdevice-dev libmozjs185-dev

Debian testing 6 (Wheezy)

apt-get install pkg-config g++ zlib1g-dev xulrunner-dev libfreetype6-dev libjpeg8-dev libpng12-dev libopenjpeg-dev libmad0-dev libfaad-dev libogg-dev libvorbis-dev libtheora-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxv-dev x11proto-video-dev libgl1-mesa-dev x11proto-gl-dev linux-sound-base libxvidcore-dev libssl-dev libjack-dev libasound2-dev libpulse-dev libsdl1.2-dev dvb-apps libavcodec-extra-53 libavdevice-dev

Other Unix distros

Note: we provide specific build instructions to build on MacOS X.

If the FFmpeg packages lead to errors, consider rebuilding with Zenbuild or other scripts.

We provide the extra libs as an zip package. Download it and run the compile.sh script. If you encounter an issue, please report a bug.

Compilation

cd gpac
./configure
make
sudo make install

Now you should be able to run MP4Box, MP4Client and all other apps.

Meet the GPAC Team @ MPEG

GPAC people are attending the MPEG 96th meeting in Geneva, Switzerland. Activities followed are:

  • Dynamic Adaptive Streaming over HTTP (DASH);
  • ISO Base Media File Format;
  • MPEG-2 Transport Stream;
  • Systems aspects of Universal Speech and Audio Coding;
  • MPEG-4 Scene Descriptions;
  • MPEG-U Advanced User Interactions.

If you’re interested and have questions, meet us or ask questions on our forums.

MP4Box: fragmentation, segmentation, splitting and interleaving

NOTE: The latest documentation describing MP4Box Support for DASH is given here.

With our work on Dynamic Adaptive Streaming over HTTP (DASH), in the current version of GPAC (revision 2642 on SVN), we now have many options for interleaving, fragmenting and segmenting … which may be confusing. It is time to clarify their usage in MP4Box. Some related aspects using MPEG-2 TS instead of MP4 can be seen in this previous post.

The options are:
-inter time_in_ms (with possibly -tight) or -flat (no interleaving)
-frag time_in_ms
-dash dur_in_ms
-split time_sec (or -split-size)

Interleaving (-inter) is when (groups of ) samples of different tracks are stored alternatively in the file: e.g. N milliseconds of video samples, followed by N milliseconds of audio samples, followed by N milliseconds of video samples … Typically, interleaved samples are grouped within an interleaving window. Interleaving reduces disk accesses, playback buffer requirements and enables progressive download and playback.

Fragmentation (-frag) is an optional process applicable to the MP4 file format. By default, MP4 files generated with MP4Box are not fragmented. This process consists in using Movie Fragments (moof). Movie Fragments is a tool introduced in the ISO spec to improve recording of long-running sequences and that is now used for HTTP streaming. Even if it is possible, according to the ISO spec, to do interleaving on fragments, MP4Box currently does not support it, because we don’t see important use cases for it. For instance, all audio samples within a fragment are contiguously stored and similarly for the video samples. The only way to ‘interleave’ tracks is to have small fragments. There may be some overhead for big files, we welcome comments on this.

Segmentation (-dash) is the process of creating segments, parts of an original file meant for individual/separate HTTP download (not necessarily for individual playback). A segment can be a part of a big file or a separate file. It is not specific to the MP4 file format (in particular it may apply to MPEG-2 TS) but a segment may imply specific ISO signaling (styp and sidx boxes, for instance). A segment is what is refered to by the XML file used to drive the HTTP Streaming and segment boundaries can be convenient places for bitstream switching. Segmentation often implies fragmentation but not necessarily.

Last, MP4Box can split (-split) a file and create individual playable files from an original one. It does not use segmentation in the above sense, it removes fragmentation and can use interleaving.

Some examples of MP4Box usages:
– Rewrites a file with an interleaving window of 1 sec.
MP4Box -inter 1000 file.mp4

– Rewrites a file with 10 sec. fragments
MP4Box -frag 10000 file.mp4

– Rewrites a file (and creates the associated XML) with 10 sec. fragments and 30 sec. segments
MP4Box -frag 10000 -dash 30000 file.mp4

– Segmentation of a file into 30 sec. segment files with 10 sec. fragments (and creation of the associated XML file.mpd)
MP4Box -frag 10000 -dash 30000 -segment-name segment_file file.mp4

Interested readers can find more details about the ISO Base Media File Format specification, here.

New web site

As you may have noticed, a few days ago, the GPAC web site has changed from a static web site to a WordPress blog hosted on SourceForget.net. However, this was not satisfactory. Therefore, we decided to move the web site out of SourceForge. It is now hosted by the Institut Telecom. Hopefully, all your links to SourceForge should be redirected automatically. We still use WordPress, but this time with all the nice features of WordPress plugins (video embedding, theme, …). We hope you will like it.

GPAC on iPad for Digital Radio Services

As part of a French-funded project, the GPAC team has worked the porting of GPAC on iOS devices, initially to show Digital Radio Services. As a result, the GPAC player can now run on iPhone and iPad and play various types of content: MP4, MPEG-2 TS, SVG, XMT, RTP, … basically all the types of content that play on desktop. Have a look at this YouTube video to see a demo. If you want to have GPAC running on your iPad or iPhone, check out the SVN and contact us on our forums

[youtube]http://www.youtube.com/watch?v=Bmer91TZhCo[/youtube]