Convert Figma logo to code with AI

gpac logogpac

GPAC Ultramedia OSS for Video Streaming & Next-Gen Multimedia Transcoding, Packaging & Delivery

2,947
548
2,947
75

Top Related Projects

47,343

Mirror of https://git.ffmpeg.org/ffmpeg.git

15,068

VLC media player - All pull requests are ignored, please use MRs on https://code.videolan.org/videolan/vlc

19,088

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.

11,644

cross-platform (Qt), open-source (GPLv3) video editor

The swiss army knife of lossless video/audio editing

Quick Overview

GPAC is an open-source multimedia framework for research and academic purposes. It focuses on multimedia processing and delivery, supporting various formats and protocols. GPAC is particularly known for its MP4Box tool, which is widely used for manipulating MP4 files.

Pros

  • Versatile multimedia framework with support for numerous formats and protocols
  • Powerful MP4Box tool for manipulating MP4 files and other multimedia containers
  • Cross-platform compatibility (Windows, macOS, Linux, iOS, Android)
  • Active development and community support

Cons

  • Steep learning curve for beginners due to its extensive feature set
  • Documentation can be overwhelming and sometimes outdated
  • Performance may not be optimal for large-scale production environments
  • Some advanced features require in-depth knowledge of multimedia technologies

Code Examples

// Example 1: Creating an MP4 file from raw H.264 and AAC streams
GF_ISOFile *movie = gf_isom_open("output.mp4", GF_ISOM_WRITE_EDIT, NULL);
gf_isom_add_track(movie, GF_ISOM_MEDIA_VISUAL, GF_ISOM_SUBTYPE_AVC_H264, 1000);
gf_isom_add_track(movie, GF_ISOM_MEDIA_AUDIO, GF_ISOM_SUBTYPE_MPEG4_AUDIO, 1000);
// Add samples and close the file
gf_isom_close(movie);
// Example 2: Extracting a specific track from an MP4 file
GF_ISOFile *movie = gf_isom_open("input.mp4", GF_ISOM_OPEN_READ, NULL);
u32 track_id = gf_isom_get_track_id(movie, 1);
gf_isom_extract_track(movie, track_id, "output_track.mp4", NULL);
gf_isom_close(movie);
// Example 3: Adding chapter markers to an MP4 file
GF_ISOFile *movie = gf_isom_open("input.mp4", GF_ISOM_OPEN_EDIT, NULL);
GF_TextSample *text = gf_isom_new_text_sample();
gf_isom_text_add_text(text, "Chapter 1", 0);
gf_isom_add_chapter(movie, 0, 0, text, "en");
gf_isom_delete_text_sample(text);
gf_isom_close(movie);

Getting Started

To get started with GPAC:

  1. Install GPAC:

    • On Ubuntu: sudo apt-get install gpac
    • On macOS with Homebrew: brew install gpac
    • For other platforms, visit the official GPAC website for installation instructions
  2. Use MP4Box command-line tool:

    # Add H.264 video and AAC audio to create an MP4 file
    MP4Box -add video.h264 -add audio.aac output.mp4
    
    # Extract audio track from an MP4 file
    MP4Box -raw 2 input.mp4
    
  3. For programmatic usage, include GPAC headers in your C/C++ project and link against the GPAC library.

Competitor Comparisons

47,343

Mirror of https://git.ffmpeg.org/ffmpeg.git

Pros of FFmpeg

  • Wider format support and more comprehensive multimedia processing capabilities
  • Larger community and more frequent updates
  • Better performance for video encoding and transcoding tasks

Cons of FFmpeg

  • Steeper learning curve due to complex command-line interface
  • Larger codebase, which can be more challenging to navigate and contribute to
  • Less focus on interactive multimedia applications compared to GPAC

Code Comparison

FFmpeg (video encoding example):

ffmpeg -i input.mp4 -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k output.mp4

GPAC (video encoding example):

MP4Box -add input.mp4 -new output.mp4

Summary

FFmpeg is a more comprehensive multimedia framework with broader format support and better performance for video processing tasks. It has a larger community and more frequent updates. However, it has a steeper learning curve and a more complex codebase.

GPAC, on the other hand, focuses more on interactive multimedia applications and has a simpler interface for basic tasks. It may be easier to get started with for beginners, but it has fewer features and less community support compared to FFmpeg.

The choice between the two depends on the specific requirements of your project and your level of expertise in multimedia processing.

15,068

VLC media player - All pull requests are ignored, please use MRs on https://code.videolan.org/videolan/vlc

Pros of VLC

  • Wider range of supported formats and codecs
  • More mature and feature-rich media player functionality
  • Larger community and more active development

Cons of VLC

  • Larger codebase, potentially more complex for contributors
  • Less focused on multimedia framework capabilities

Code Comparison

VLC (media playback):

static void Play(vout_thread_t *vout)
{
    vout_control_Hold(vout->p);
    vout_control_Push(&vout->p->control,
                      VOUT_CONTROL_PLAY,
                      NULL);
    vout_control_Release(vout->p);
}

GPAC (scene composition):

GF_Err gf_scene_get_time(GF_Scene *scene, Double *scene_time)
{
    if (!scene || !scene_time) return GF_BAD_PARAM;
    *scene_time = scene->simulation_time;
    return GF_OK;
}

VLC focuses on media playback controls, while GPAC emphasizes scene composition and timing. VLC's codebase is more oriented towards player functionality, whereas GPAC provides a framework for multimedia applications. Both projects serve different primary purposes, with VLC being a full-featured media player and GPAC offering a more flexible multimedia toolkit.

19,088

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.

Pros of XBMC

  • Larger and more active community with frequent updates and contributions
  • More comprehensive media center functionality, including live TV and PVR support
  • Extensive add-on ecosystem for customization and extended features

Cons of XBMC

  • Heavier resource usage due to its full-featured nature
  • Steeper learning curve for development and customization
  • Less focused on multimedia processing and streaming protocols compared to GPAC

Code Comparison

XBMC (C++):

bool CVideoPlayer::OpenDemuxStream()
{
  if (m_pDemuxer)
  {
    m_pDemuxer->Open(m_item.GetDynPath(), m_pInputStream, m_pDvdDemux);
    return true;
  }
  return false;
}

GPAC (C):

GF_Err gf_isom_open_progressive(const char *fileName, u64 start_range, u64 end_range, GF_ISOFile **the_file, u64 *BytesMissing)
{
    GF_Err e;
    GF_ISOFile *movie;
    *BytesMissing = 0;
    movie = gf_isom_new_movie();
    e = gf_isom_open_file(movie, fileName, GF_ISOM_OPEN_READ | GF_ISOM_OPEN_PROGRESSIVE, start_range, end_range);
    if (e) {
        gf_isom_delete(movie);
        return e;
    }
    *the_file = movie;
    return GF_OK;
}
11,644

cross-platform (Qt), open-source (GPLv3) video editor

Pros of Shotcut

  • More user-friendly interface for video editing tasks
  • Broader range of built-in video effects and transitions
  • Active community with frequent updates and feature additions

Cons of Shotcut

  • Limited to video editing functionality, less versatile than GPAC
  • Larger resource footprint, potentially slower on older hardware
  • Less extensive codec support compared to GPAC's comprehensive multimedia capabilities

Code Comparison

GPAC (C language):

GF_Err gf_isom_set_brand_info(GF_ISOFile *movie, u32 brand, u32 minVersion)
{
    if (!movie) return GF_BAD_PARAM;
    movie->brand = brand;
    movie->minor_brand_version = minVersion;
    return GF_OK;
}

Shotcut (C++ language):

void MainWindow::onOpenVideo(Mlt::Producer* producer)
{
    if (!producer || !producer->is_valid())
        return;
    setCurrentFile(QString::fromUtf8(producer->get("resource")));
    producer->set("video_delay", 0);
    open(producer);
}

The code snippets demonstrate different focuses: GPAC handles low-level multimedia file operations, while Shotcut manages high-level video editing tasks through its user interface.

The swiss army knife of lossless video/audio editing

Pros of LosslessCut

  • User-friendly GUI for easy video cutting and trimming
  • Cross-platform support (Windows, macOS, Linux)
  • Focuses on lossless cutting, preserving original video quality

Cons of LosslessCut

  • Limited to basic cutting and trimming operations
  • Lacks advanced features like encoding and streaming
  • Smaller community and fewer contributors

Code Comparison

GPAC (C language):

GF_Err gf_isom_set_brand_info(GF_ISOFile *movie, u32 brand, u32 minVersion)
{
    if (!movie) return GF_BAD_PARAM;
    movie->brand = brand;
    movie->minorVersion = minVersion;
    return GF_OK;
}

LosslessCut (JavaScript):

export async function cutMultiple({ filePath, segments }) {
  const ffmpegArgs = ['-i', filePath, '-c', 'copy'];
  segments.forEach(({ start, end }, i) => {
    ffmpegArgs.push('-ss', start, '-to', end, `cut_${i}.mp4`);
  });
  await runFfmpeg(ffmpegArgs);
}

GPAC is a comprehensive multimedia framework with a wide range of features, including encoding, streaming, and playback. It's written in C and offers low-level control over multimedia operations. LosslessCut, on the other hand, is a specialized tool for lossless video cutting, built with Electron and JavaScript. It provides a simpler, more focused user experience but with fewer advanced features compared to GPAC.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Build Status Tests

Build Status Tests

Build Status Tests

Build Status Tests

Build Status Tests

Build Status Build Status

Coverage Coverage

License OpenHub

GPAC Introduction

Current version: 2.5-DEV

Latest Release: 2.4

GPAC is an open-source multimedia framework focused on modularity and standards compliance. GPAC provides tools to process, inspect, package, stream, playback and interact with media content. Such content can be any combination of audio, video, subtitles, metadata, scalable graphics, encrypted media, 2D/3D graphics and ECMAScript. GPAC is best-known for its wide MP4/ISOBMFF capabilities and is popular among video enthusiasts, academic researchers, standardization bodies, and professional broadcasters.

For more information, visit https://gpac.io

GPAC is distributed under the LGPL v2.1 or later, and is also available, for most of it, under a commercial license.

Please ! cite ! our work in your research:

Features

GPAC can process, analyse, package, stream, encode, decode and playback a wide variety of contents. Selected feature list:

  • Audio: MPEG audio (mp1/2/3, aac), AC3, E-AC3, Opus, FLAC, …
  • Video: MPEG 1 / 2 / 4 (H264/AVC) / H (HEVC), VVC, AV1, VP9, Theora, ...
  • Subtitles: WebVTT, TTML (full, EBU-TTD, …), 3GPP/Apple Timed Text, …
  • Encryption: CENC, PIFF, ISMA, OMA, ...
  • Containers: MP4/fMP4/CMAF/Quicktime MOV/ProRes MOV, AVI, MPG, OGG, MKV, ...
  • Streaming: MPEG-2 Transport Stream, RTP, RTSP, HTTP, Apple HLS, MPEG-DASH, ATSC 3.0 ROUTE, ...
  • Supported IOs: local files, pipes, UDP/TCP, HTTP(S), custom IO
  • Presentation formats: MPEG-4 BIFS, SVG Tiny 1.2, VRML/X3D
  • JS scripting through QuickJS for both SVG/BIFS/VRML and extending GPAC framework tools
  • 3D support (360 videos, WebGL JS filters…)
  • Inputs: microphone, camera, desktop grabbing
  • Highly configurable media processing pipeline
  • Python and NodeJS bindings

Features are encapsulated in processing modules called filters:

  • to get the full list of available features, you can run the command line gpac -h filters or check filters' wiki.
  • to get the full list of playback features, check the dedicated wiki page.

Tools

MP4Box

MP4Box is a multi-purpose MP4 file manipulation for the prompt, featuring media importing and extracting, file inspection, DASH segmentation, RTP hinting, ... See MP4Box -h, man MP4Box or our wiki.

gpac

GPAC includes a filter engine in charge of stream management and used by most applications in GPAC - read this post for more discussion on how this impacts MP4Box. The gpac application is a direct interface to the filter engine of GPAC, allowing any combination of filters not enabled by other applications. See gpac -h, man gpac, man gpac-filters or our wiki for more details.

Getting started

Download

Stable and nightly builds installers for Windows, Linux, OSX, Android, iOS are available on gpac.io.

If you want to compile GPAC yourself, please follow the instructions in the build section of our wiki.

Documentation

The general GPAC framework documentation is available on wiki.gpac.io, including HowTos.

GPAC tools are mostly wrappers around an underlying library called libgpac which can easily be embedded in your projects. The libgpac developer documentation is available at doxygen.gpac.io, including documentation of JS APIs, Python APIs and NodeJS APIs.

Testing

GPAC has a test suite exercising most features of the framework. The test suite is in a separate repository https://github.com/gpac/testsuite/, but is available as a submodule of the GPAC main repository. To initialize the testsuite submodule, do git submodule update --init.

For more details on the test suite, read this page and check the testsuite readme.

Per-commit build and tests results are available.

Support, ongoing tasks and bugs

Please use github for feature requests and bug reports. When filing a request there, please tag it as feature-request.

Contributing

A complex project like GPAC wouldn’t exist and persist without the support of its community. Please contribute: a nice message, supporting us in our communication, reporting issues when you see them… any gesture, even the smallest ones, counts.

If you want to contribute to GPAC, you can find ideas at GSoC page or look for a good first issue. In any doubt please feel free to contact us.

Team

GPAC is brought to you by an experienced team of developers with a wide track-record on media processing.

The project is mainly developed in the MultiMedia group of Telecom Paris with the help of many great contributors.

GPAC has a peculiar story: started as a startup in NYC, GPAC gained traction from research and a nascent multimedia community as it was open-sourced in 2003. Since then we have never stopped transforming GPAC into a useful and up-to-date project, with many industrial R&D collaborations and a community of tens of thousands of users. This makes GPAC one of the few open-source multimedia projects that gathers so much diversity.

Roadmap

Users are encouraged to use the latest tag or the master branch.

V2.X

Targets:

  • DASH event support
  • Web GUI
  • QUIC support
  • ROUTE file repair support
  • FLUTE support
  • Rust Bindings