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
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
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?
1998 Reboot
• Modularity
• Cross-Platform
• 2nd year project
2001
• Publication as open source
• Licensed under GPLv2
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
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
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
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
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
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
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
www.videolan.orgFelix Paul Kühne
IEEE Region 8 Student & Young Professional Congress 2016