Porting VLC on Android - DroidCon Paris 2014

45
VideoLAN VLC port to Android Jean-Baptiste Kempf mardi 23 septembre 2014

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

Page 1: Porting VLC on Android - DroidCon Paris 2014

VideoLAN

VLC port to Android

Jean-Baptiste Kempf

mardi 23 septembre 2014

Page 2: Porting VLC on Android - DroidCon Paris 2014
Page 3: Porting VLC on Android - DroidCon Paris 2014
Page 4: Porting VLC on Android - DroidCon Paris 2014

Ecole Centrale Paris

Page 5: Porting VLC on Android - DroidCon Paris 2014

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!

Page 6: Porting VLC on Android - DroidCon Paris 2014

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)

Page 7: Porting VLC on Android - DroidCon Paris 2014

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

Page 8: Porting VLC on Android - DroidCon Paris 2014

VideoLAN

VLC

Volunteers

Page 9: Porting VLC on Android - DroidCon Paris 2014

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

Page 10: Porting VLC on Android - DroidCon Paris 2014

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

Page 11: Porting VLC on Android - DroidCon Paris 2014

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

Page 12: Porting VLC on Android - DroidCon Paris 2014

Stupidity level :Over 9000

STUPIDITY At MAX

Page 13: Porting VLC on Android - DroidCon Paris 2014

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.

Page 14: Porting VLC on Android - DroidCon Paris 2014

Rule #2

Rule #2

In multimedia, everyone thinks he understands everything...

But actually noone does...

Page 15: Porting VLC on Android - DroidCon Paris 2014

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!

Page 16: Porting VLC on Android - DroidCon Paris 2014

The Cone

Page 17: Porting VLC on Android - DroidCon Paris 2014

VLC

Page 18: Porting VLC on Android - DroidCon Paris 2014
Page 19: Porting VLC on Android - DroidCon Paris 2014

1 every 6 MacTop 15 Windows

900 000 per day

More than 1.5B over VLC lifetime

Most used French software

Page 20: Porting VLC on Android - DroidCon Paris 2014

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 ...

Page 21: Porting VLC on Android - DroidCon Paris 2014
Page 22: Porting VLC on Android - DroidCon Paris 2014

VLC 0.6.1

Page 23: Porting VLC on Android - DroidCon Paris 2014
Page 24: Porting VLC on Android - DroidCon Paris 2014
Page 25: Porting VLC on Android - DroidCon Paris 2014
Page 26: Porting VLC on Android - DroidCon Paris 2014
Page 27: Porting VLC on Android - DroidCon Paris 2014

LibVLCEngine

LGPL

Page 28: Porting VLC on Android - DroidCon Paris 2014

libVLC

libVLCcore

VLC VLMC Applications

Interface

MKVOggMuxDemuxer

x264VorbisTheoraDecoder

FiltersAoutVout

Modules ModulesModulesModules

Page 29: Porting VLC on Android - DroidCon Paris 2014

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

Page 30: Porting VLC on Android - DroidCon Paris 2014

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++

Page 31: Porting VLC on Android - DroidCon Paris 2014

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

Page 32: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 33

Android

Page 33: Porting VLC on Android - DroidCon Paris 2014

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

Page 34: Porting VLC on Android - DroidCon Paris 2014

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

Page 35: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 36

Project start

Page 36: Porting VLC on Android - DroidCon Paris 2014

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

Page 37: Porting VLC on Android - DroidCon Paris 2014

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

Page 38: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 39

Page 39: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 40

Video

Page 40: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 41

Evolution

Page 41: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 42

Evolution

Page 42: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 43

Audio v2

Page 43: Porting VLC on Android - DroidCon Paris 2014

23 sept. 2014 Jean-Baptiste Kempf 44

Video v2

Page 44: Porting VLC on Android - DroidCon Paris 2014

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

Page 45: Porting VLC on Android - DroidCon Paris 2014

Thank You

[email protected]

Jean-Baptiste Kempf