Porting VLC on Android - DroidCon Paris 2014

Post on 10-Jun-2015

264 views 4 download

Tags:

description

http://fr.droidcon.com/2014/agenda/ http://fr.droidcon.com/2014/agenda/detail?title=Porting+VLC+on+Android VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files, discs and streams. VLC runs on most platforms and is developed by volunteers. This talk will explain how we ported VLC to Android using the NDK, the issues we faced and how we solved most of them. It will also detail the future of VLC on the Android platform. Speaker : Jean-Baptiste Kempf, VideoLan Jean-Baptiste Kempf is the president of the VideoLAN non-profit organization and one of the main developers of VLC. Jean-Baptiste led some of the ports of VLC on mobile devices, including the Android port, and is the current release manager of VLC.

Transcript of Porting VLC on Android - DroidCon Paris 2014

VideoLAN

VLC port to Android

Jean-Baptiste Kempf

mardi 23 septembre 2014

Ecole Centrale Paris

23 sept. 2014 Jean-Baptiste Kempf 5

VIA

VIA Centrale Réseaux➣ Campus student association➣ Internet acces through RENATER➣ Token Ring

Network Upgrade➣ How to pay for our new network?➣ How to justify the needs for a faster network?➣ 1995 : let's do video streaming!

23 sept. 2014 Jean-Baptiste Kempf 6

Early history

1995 – 96 first project➣ 2 years to complete

1998 project reboot➢ Open Source➢ Modularity➢ Cross-Platform➢ Network oriented➢ Student project

2001 License Change➣ ECP headmaster Agreement➣ GPL v2 (or later)

23 sept. 2014 Jean-Baptiste Kempf 7

VideoLAN Projects

VideoLan Client, VLC media player, VLC

VideoLan Server, VLS (dead)

VLCS (dead)

libdvdcss (DVD CSS decryption)

libdts, libdca (DTS decoding)

x264 (H.264 encoding)

libdvbpsi (TS files management)

libdvdplay (dead)

libdvbcsa (dvb encryption decoding)

VLMA (VLC automation)

VLC Skin designer

libbluray, libaacs (BluRay playback)

DVBlast, Multicat (DVB streaming solution)

VLMC (Video editor)

x262, x265

VideoLAN

VLC

Volunteers

23 sept. 2014 Jean-Baptiste Kempf 9

Collaboration

Collaboration➢ Teams meeting once per year➢ Using git since early 2007➢ Use of trac, phpBB and mediawiki and only FOSS➢ IRC and Mailing Lists

VLC Contributors➢ Core Team 5~10 people➢ 700 over the lifetime➢ 150 per year

23 sept. 2014 Jean-Baptiste Kempf 10

Association VideoLAN

Creation➣ 2009, decided in the VDD '08➣ Libre/Free Software and Multimedia

Members➣ VLC's core developers➣ Important members

Supports➣ Hardware for development➣ Travel, Servers, Legal➣ VideoLAN Dev Days

23 sept. 2014 Jean-Baptiste Kempf 11

Open Source/Free Software

➢ What is Open Source➢ Cuisine➢ Trust➢ Study

➢ What is Free Software➢ 4 Freedoms➢ Actual communities

Stupidity level :Over 9000

STUPIDITY At MAX

Rule #1

Rule #1

In multimedia, if there is a stupid way to do something, someone will do it (badly) and

complain until it is standard and supported.

Rule #2

Rule #2

In multimedia, everyone thinks he understands everything...

But actually noone does...

23 sept. 2014 Jean-Baptiste Kempf 15

Multimedia : Everything is broken

NIH syndrom

42 ways !

Container➣ All containers are between complete crap to somehow broken, except mp4 / mkv➣ The worst are AVI, FLV and Ogg

Codec➣ Many codecs have bad designs➣ Most codecs are badly used when encoded➣ Wrong containers➣ Too many codecs and profiles➣ Subtitles! Metadata!

The Cone

VLC

1 every 6 MacTop 15 Windows

900 000 per day

More than 1.5B over VLC lifetime

Most used French software

23 sept. 2014 Jean-Baptiste Kempf 21

VLC

Support for DVDs➣ Region independent➣ Prevents forced subtitles (if desired)

… Blu Rays➣ By default, non-encrypted only

… network streams➣ Unicast, multicast, adaptive streaming

… external hardware➣ Cameras, TV input, Satellite, ASI/SDI ...

VLC 0.6.1

LibVLCEngine

LGPL

libVLC

libVLCcore

VLC VLMC Applications

Interface

MKVOggMuxDemuxer

x264VorbisTheoraDecoder

FiltersAoutVout

Modules ModulesModulesModules

23 sept. 2014 Jean-Baptiste Kempf 30

Architecture

Small Core➣ libVLCCore➣ Light➣ Memory, Network and Thread handling➣ Module loading➣ Clock / Synchronization

Simple Multimedia Framework➣ LibVLC➣ bindings for C++, C#, Objective-C, Java,

lua, Perl and Python

23 sept. 2014 Jean-Baptiste Kempf 31

VLC

Completely modularized➣ About 300 modules in a default installation

➣ Codecs, IO, outputs, (de)muxers, filters, ...➣ Interested in adding new features ? Add a module.

820,000 lines of code➣ 120k in the core➣ 700k for modules

80 external librairies➣ Codecs, Output, Effects, Network➣ 7M lines of code

➣ 50 % C, 41 % C++

23 sept. 2014 Jean-Baptiste Kempf 32

Protocol FormatVideoCodec

SubtitlesCodec

AudioCodec

MetaData

Video Output

Audio Output

Video Filters

Audio Filters

Text Renderer

Codec

Muxer

Encoder Encoder

StreamInterfaces

Network-oriented graph

23 sept. 2014 Jean-Baptiste Kempf 33

Android

23 sept. 2014 Jean-Baptiste Kempf 34

100 % Open Source

➢ 2.1+

Full video player

➢ All codecs, formats, protocols

➢ Hardware and multicore decoding

Full audio player

➢ Media library & Indexing

➢ Audio Background service

VLC for Android

23 sept. 2014 Jean-Baptiste Kempf 35

Project start

➢ Start➢ Free Nexus One➢ Nov 2010➢ First working version in Feb 2011

➢ GsoC➢ Summer 2011➢ First working UI

23 sept. 2014 Jean-Baptiste Kempf 36

Project start

23 sept. 2014 Jean-Baptiste Kempf 37

VLC for Android issues

➢ Shared Modules

➢ Bionic

➢ pthread ➢ wchar_t, off_t

➢ Audio modules

➢ lipsync➢ YUV / RGB

➢ Size

➢ Arch➢ FPU / NEON

Technical issues

23 sept. 2014 Jean-Baptiste Kempf 38

Release in July 2012

➣ Beta on Google Play

➣ Limited countries

➣ ARMv7 only

➣ Numerous crashes

➣ Good feedback

➣ GPLv3

Release

23 sept. 2014 Jean-Baptiste Kempf 39

23 sept. 2014 Jean-Baptiste Kempf 40

Video

23 sept. 2014 Jean-Baptiste Kempf 41

Evolution

23 sept. 2014 Jean-Baptiste Kempf 42

Evolution

23 sept. 2014 Jean-Baptiste Kempf 43

Audio v2

23 sept. 2014 Jean-Baptiste Kempf 44

Video v2

23 sept. 2014 Jean-Baptiste Kempf 45

Release 1.0.0 !

➢ Numbers

➢ 37M installed➢ 20M active

➢ Next

➢ Hardware acceleration➢ OMX➢ Mediacodec native

➢ SMB, UpnP, Facebook➢ Android TV➢ Android-L

Now

Thank You

jb@videolan.org

Jean-Baptiste Kempf