vlc and videolan - syp 2016 regensburg€¢ mobile (android, ios, winrt, windows phone, tizen, tvos)...

57
VLC and VideoLAN what you might know, what you should know and what you don’t know Felix Paul Kühne – [email protected] IEEE Region 8 Student & Young Professional Congress 2016

Upload: phamthuy

Post on 03-May-2018

219 views

Category:

Documents


2 download

TRANSCRIPT

VLC and VideoLANwhat you might know, what you should know

and what you don’t know

Felix Paul Kühne – [email protected] IEEE Region 8 Student & Young Professional Congress 2016

Felix Paul Kühne• Contributor to VideoLAN since 2003

• Author of VLC-Mac 2.0

• Author of VLC-iOS 2.0 and VLC-tvOS

• Medic

• Software Developer and Project Leadat VideoLabs SAS, Paris, France

• Treasurer and former secretary of the VideoLAN non-profit organization

History & Overview

Ecole Centrale Paris

VIAVIA Centrale Réseaux

• Campus student association

• Internet access through RENATER

Network Upgrade

• How to pay for our network?

• Justify the needs of a bigger network?

Video Streaming!

1998 Reboot

• Modularity

• Cross-Platform

• 2nd year project

2001

• Publication as open source

• Licensed under GPLv2

VLC 0.2.70Qt interface (1st gen), April 2001, GNOME Desktop

Port to BeOSVLC 0.6.x, August 2003 (initial release: December 1999)

Port to Mac OS XVLC 0.3.x / 0.4.x, February 2003 (Initial release: April 2001)

Port to Microsoft WindowsVLC 0.5.x, February 2003 (initial release: June 2001)

Apple Design Award Runner-upJune 2003

Early industrial support

Input features• Support for DVDs

• region independent

• prevents forced chapters and subtitles (if desired)

• Blu Ray

• HD-DVD

• Network Streams

• Unicast, Multicast, all flavors of adaptive streaming

• External hardware

• Cameras, TV input, …

Download statistics and installed base

• 2.2.4 for desktop released June 5th

• 49.6M downloads on Windows, 4.4M on OS Xtotal 180M on Windows, 17M on OS X

• ~ 23M/month — 66% updates

• Windows Phone: 3M — Windows Store: 12M

• iOS: 11M

• Android: 65M

More than 2.2B over

lifetime

Who are those users?

Break-through?• 0.8.6 release series in 2006 - 2008

• more than 117M downloads

• 10x more than previous releases

• major press coverage

• last release of the wxWidgets interface

VideoLAN association• Non-profit organization launched in 2009

• Members: VLC’s core developers — 0 employees!

• Supports

• Travel

• Sprints and VideoLAN Dev Days

• Legal

• Hardware and services

Contributors

• core team of 10 people

• 700 over lifetime

• 130 per year

• partially volunteers, partially consultants

Collaboration

• Quarterly team meetings throughout Europe

• Additional topic specific sprints

• IRC and mailing-lists

• git deployment since early 2007

What is VLC?

1 source file

Architecture

libvlc

VLC VLMC Your appVLC for …

libvlccore

Access Demuxer

Video output

Audio output

Muxer

Decoder

EncoderAccess output

Interface

Renderer

Architecture

Protocol Format

VideoCodec

SubtitlesCodec

AudioCodec

Metadata

VideoFilters

Renderers

AudioFilters

VideoOutput

AudioOutput

Our code in your app

libvlc• Stable C API and ABI

• Bindings in C++, C#, Objective-C, Java, Python

• Steadily improved - 40 new API calls in v3.0

• Cross platform

• Proven and tested code used by millions

Playback with libvlc#include <vlc/vlc.h>

void play(const char *url, void *drawable){ libvlc_instance_t *vlcInstance = libvlc_new(0, “”); if (vlcInstance == NULL) return;

libvlc_media_player_t *player = libvlc_media_player_new(vlcInstance); libvlc_media_player_set_nsobject(player, drawable);

libvlc_media_t *media = libvlc_media_new_location(vlcInstance, url); libvlc_media_player_set_media(player, media);

libvlc_media_player_play(player); }

Playback with VLCKit

#import <VLCKit/VLCKit.h>

@interface ViewController () { VLCMediaPlayer *_player; } @end

Playback with VLCKit@implementation ViewController

- (void)viewDidLoad{ _player = [[VLCMediaPlayer alloc] init]; _player.drawable = self.videoOutputView; VLCMedia *media = [VLCMedia mediaWithURL:[NSURL URLWithString:@“http://…”]]; _player.media = media; [super viewDidLoad]; }

- (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [_player play]; }

@end

libvlc deployment• Windows

• precompiled binaries on videolan.org

• VLCKit / MobileVLCKit / TVVLCKit

• multiple precompiled Cocoapods available

• Android

• library needs to be compiled

Licensing

• Full playback stack distribution under Lesser GNU General Public License version 2.1 or later

• Compatible with any App Store terms of service

• Compatible with proprietary apps and plugins

• Notable exception: DVD playback, UIs

Do people really do that?

Your code in libvlc

How to start• Pick your favorite platform

• desktop(Windows, Linux, BSD, OS X, OS/2, …)

• mobile(Android, iOS, WinRT, Windows Phone, Tizen, tvOS)

• Get our code and compile it.

• We are there for you.

Development• source code management using git

• git.videolan.org

• code.videolan.org

• sharing patches using mailing-lists

• pull requests will come!

• discussion on IRC

• bug and feature tracking on http://trac.videolan.org/vlc/timeline

Architecture

libvlc

VLC VLMC Your appVLC for …

libvlccore

Access Demuxer

Video output

Audio output

Muxer

Decoder

EncoderAccess output

Interface

Renderer

–VLC devs, 1998

Every feature is a module!

Let’s write a module

Module definition#include <vlc_common.h> #include <vlc_aout.h> #include <vlc_filter.h> #include <vlc_plugin.h>

static int Open (vlc_object_t *); static block_t *Process (filter_t *, block_t *);

vlc_module_begin () set_shortname ("Karaoke") set_description ("Simple Karaoke filter") set_category (CAT_AUDIO) set_subcategory (SUBCAT_AUDIO_AFILTER)

set_capability ("audio filter", 0) set_callbacks (Open, NULL) vlc_module_end ()

Open functionstatic int Open (vlc_object_t *obj) { filter_t *filter = (filter_t *)obj;

if (filter->fmt_in.audio.i_channels != 2) { msg_Err (filter, "voice removal requires stereo"); return VLC_EGENERIC; }

filter->fmt_in.audio.i_format = VLC_CODEC_FL32; filter->fmt_out.audio = filter->fmt_in.audio; filter->pf_audio_filter = Process; return VLC_SUCCESS; }

Worker functionstatic block_t *Process (filter_t *filter, block_t *block) { const float factor = .70710678 /* 1. / sqrtf (2) */; float *spl = (float *)block->p_buffer;

for (unsigned i = block->i_nb_samples; i > 0; i--) { float s = (spl[0] - spl[1]) * factor;

*(spl++) = s; *(spl++) = s; }

return block; }

Production example: SAT>IP• Open standard based on RTSP, UPnP and HTTP

published by SES S.A.

• Stream satellite television (DVB-S2) on the home network via unicast and multicast

• One module of 800 LoC added

• runs on any supported platform,no adaptation needed

• One switch added to the existing UPnP discovery module

Additional open-source SDK

• runs on iOS, tvOS, Android, Android TV

• 1200 LoC for iOS and tvOS

• 1500 LoC for Android and Android TV

• identical libvlc code base

• Public this fall

Do people really do that?

Advanced or little known features

Extensions• written in lua

• highly customizable

• Use cases:

• automatic subtitle downloads

• Context information from imdb, wikipedia or Allociné

• Sharing on Twitter

• available for download on addons.videolan.org

Service discoveries &playlist parsers

• Detects media automatically:

• Local files • Network services • Internet services

• Resolves links to YouTube, Dailymotion, Vimeo, Apple Trailers, ...

• Highly customizable

• Written in lua • Publish and get them from addons.videolan.org

Screen Casting

Wall filter & netsync

Web Interface

libcaca video output

Questions

www.videolan.orgFelix Paul Kühne

[email protected]

IEEE Region 8 Student & Young Professional Congress 2016