Difference between revisions of "LibVLC"
(Add more instructions to compile and use libVlc) |
m (Misc.) |
||
(21 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{Lowercase}} | {{Lowercase}} | ||
− | The | + | The '''libVLC''' (VLC {{SDK}}) media framework can be embedded into an application to get multimedia capabilities. |
− | Since VLC is based on | + | Since VLC is based on libVLC, one should be able to have the same features that {{VLC}} has. |
The libVLC media framework is already used by several applications; see [[LibVLC_Users|who uses libVLC?]] | The libVLC media framework is already used by several applications; see [[LibVLC_Users|who uses libVLC?]] | ||
Line 8: | Line 8: | ||
== Documentation == | == Documentation == | ||
− | Please refer to the [ | + | Please refer to the [https://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html Doxygen documentation], which is the reference documentation. |
− | ''Make sure that the documentation matches the LibVLC version.'' (if not, you can build it from the source code) | + | <u>''Make sure that the documentation matches the LibVLC version.''</u> (if not, you can build it from the source code) |
Some further topics are covered here: | Some further topics are covered here: | ||
− | * [[ | + | * [[LibVLC Memory Management]] explained: covers the basics on the <code>_new()</code>, <code>_retain()</code>, <code>_release()</code>. |
− | * [[ | + | * [[LibVLC Media List Management]] explained: covers the basics on setting up a playlist. |
* [[GenerateLibFromDll|Generate a .lib for using libVLC on Windows]] (before libVLC 2.1.0) | * [[GenerateLibFromDll|Generate a .lib for using libVLC on Windows]] (before libVLC 2.1.0) | ||
== Compiling == | == Compiling == | ||
− | To build LibVLC you need [[ | + | To build LibVLC you need [[VLC source code]] and follow [[Compile_VLC|VLC compilation instructions]] since LibVLC it is directly shipped in VLC source code.<br /> |
You will find headers in vlc-src/include/vlc and libvlc.so binaries in the ''hidden'' folder vlc-src/lib/.libs.<br /> | You will find headers in vlc-src/include/vlc and libvlc.so binaries in the ''hidden'' folder vlc-src/lib/.libs.<br /> | ||
− | When using your custom LibVLC build you will need to define the environment variable VLC_PLUGIN_PATH pointing to VLC modules located in vlc-src/modules. | + | When using your custom LibVLC build you will need to define the environment variable <var>VLC_PLUGIN_PATH</var> pointing to VLC modules located in vlc-src/modules. |
== Examples == | == Examples == | ||
Line 28: | Line 28: | ||
* [[LibVLC_Tutorial|Current version (1.1.x and later)]] | * [[LibVLC_Tutorial|Current version (1.1.x and later)]] | ||
* Gtk Player: {{VLCSourceFile|name=doc/libvlc/gtk_player.c}} | * Gtk Player: {{VLCSourceFile|name=doc/libvlc/gtk_player.c}} | ||
− | * Qt Player: {{VLCSourceFile|name=doc/libvlc/QtPlayer}} | + | * Qt Player: {{VLCSourceFile|name=doc/libvlc/QtPlayer/player.cpp}} |
* WxWidgets Player: {{VLCSourceFile|name=doc/libvlc/wx_player.cpp}} | * WxWidgets Player: {{VLCSourceFile|name=doc/libvlc/wx_player.cpp}} | ||
Line 38: | Line 38: | ||
=== More complex examples === | === More complex examples === | ||
− | * | + | * {{VLCSourceFolder|p=libvlc-demos.git|vlcinfo|l=MediaInfo clone}} |
− | * | + | * {{VLCSourceFolder|p=libvlc-demos.git|webcam|l=Webcam / Cheese clone}} |
=== libVLC on Android === | === libVLC on Android === | ||
− | * [https:// | + | * [https://code.videolan.org/videolan/libvlc-android-samples LibVLC on Android sample] |
− | === VLCKit for Cocoa (iOS/ | + | === VLCKit for Cocoa (iOS/macOS) === |
You can find details on features and implementation on a [[VLCKit|designated page]]. | You can find details on features and implementation on a [[VLCKit|designated page]]. | ||
− | ==== | + | ==== macOS ==== |
− | * [ | + | * [https://code.videolan.org/videolan/VLCKit/tree/master/Examples/macOS/BasicPlayerWithPlaylist Simple playlist player for macOS]. |
− | * [ | + | * [https://code.videolan.org/videolan/VLCKit/tree/master/Examples/macOS/iPodConverter iPod Converter for macOS]. |
− | * [ | + | * [https://code.videolan.org/videolan/VLCKit/tree/master/Examples/macOS/FlashVideoDownloader Flash Video Downloader for macOS]. |
==== iOS ==== | ==== iOS ==== | ||
− | * [ | + | * [https://code.videolan.org/videolan/VLCKit/tree/master/Examples/iOS/SimplePlayback Simple player for iOS]. |
− | * [ | + | * [https://code.videolan.org/videolan/VLCKit/tree/master/Examples/iOS/DropIn-Player Drop-in player for integration in iOS apps]. |
+ | |||
+ | === Crossplatform .NET/Mono support with LibVLCSharp === | ||
+ | * [https://code.videolan.org/videolan/LibVLCSharp/tree/master/Samples Simple playback samples (iOS/Android/Mac/Windows/Xamarin.Forms)]. | ||
+ | * [https://code.videolan.org/mfkl/libvlcsharp-samples Advanced samples]. | ||
=== Outdated samples === | === Outdated samples === | ||
* [[LibVLC_Tutorial_0.9|Versions 0.9.x and 1.0.x]] | * [[LibVLC_Tutorial_0.9|Versions 0.9.x and 1.0.x]] | ||
* [[LibVLC_Tutorial_086c|Version 0.8.6]] | * [[LibVLC_Tutorial_086c|Version 0.8.6]] | ||
− | * [[LibVLC_Visual_C|Visual C++]] '' (uses "old" legacy API) '' | + | * [[LibVLC_Visual_C++|Visual C++]] '' (uses "old" legacy API) '' |
* [[IceVLCPlayer|VCL component for Delphi]] (out-of-date) | * [[IceVLCPlayer|VCL component for Delphi]] (out-of-date) | ||
== Language & platform bindings == | == Language & platform bindings == | ||
LibVLC is a C library. It has bindings to the following languages and frameworks: | LibVLC is a C library. It has bindings to the following languages and frameworks: | ||
− | * C++, using the | + | * C++, using the [https://code.videolan.org/videolan/libvlcpp libvlcpp] library |
* The [[Web plugin]] for ActiveX (e.g. MSIE) and NPAPI (e.g. Firefox) | * The [[Web plugin]] for ActiveX (e.g. MSIE) and NPAPI (e.g. Firefox) | ||
− | * [http:// | + | * [http://WebChimera.org WebChimera] browser plugin with [http://nwjs.io/ NW.js] support |
− | * [[ | + | * [https://github.com/RSATom/WebChimera.js WebChimera.js] - another way to bind libvlc to node.js/io.js/NW.js/Electron |
+ | * [[VLCKit|Objective-C/Swift for iOS and macOS]] | ||
+ | * [[Perl bindings|Perl]] | ||
* [[PythonBinding|Python]] | * [[PythonBinding|Python]] | ||
* [http://phonon.kde.org/ Phonon (Qt/KDE) in C++] | * [http://phonon.kde.org/ Phonon (Qt/KDE) in C++] | ||
− | * [[Java bindings]] | + | * [[Java bindings|Java]] |
− | * [ | + | * [https://code.videolan.org/videolan/vlc-android/tree/master/libvlc/jni Java/Scala/Kotlin/JNI Android] |
− | * [ | + | * [https://code.videolan.org/videolan/libvlcsharp C#/F#/.NET] |
+ | * [https://code.videolan.org/videolan/vlc-winrt/tree/master/modules/libvlcppcx C++/CX] | ||
+ | * [https://github.com/adrg/libvlc-go Go] | ||
+ | * [https://github.com/garkimasera/vlc-rs Rust] | ||
* [http://github.com/RSATom/QmlVlc QmlVlc] - Qt 5 QML binding | * [http://github.com/RSATom/QmlVlc QmlVlc] - Qt 5 QML binding | ||
− | * [ | + | * [https://github.com/vlc-qt/vlc-qt VLC-Qt] - Qt bindings |
* [[wxVLCBackend|wxWidgets MediaCtrl backend]] also in C++ | * [[wxVLCBackend|wxWidgets MediaCtrl backend]] also in C++ | ||
* [[Using libvlc with Delphi]] | * [[Using libvlc with Delphi]] | ||
* [http://sourceforge.net/projects/paslibvlc/ Pascal/Delphi] | * [http://sourceforge.net/projects/paslibvlc/ Pascal/Delphi] | ||
− | * . | + | * [http://wiki.tcl-lang.org/48382 Tcl] |
* [[ActiveX]] with the built-in VLC browser plugin for MSIE (obsolete) | * [[ActiveX]] with the built-in VLC browser plugin for MSIE (obsolete) | ||
− | [[Category:LibVLC]] | + | [[Category:LibVLC|*]] |
Revision as of 09:26, 27 March 2019
The libVLC (VLC SDK) media framework can be embedded into an application to get multimedia capabilities.
Since VLC is based on libVLC, one should be able to have the same features that VLC media player has.
The libVLC media framework is already used by several applications; see who uses libVLC?
Contents
Documentation
Please refer to the Doxygen documentation, which is the reference documentation.
Make sure that the documentation matches the LibVLC version. (if not, you can build it from the source code)
Some further topics are covered here:
- LibVLC Memory Management explained: covers the basics on the
_new()
,_retain()
,_release()
. - LibVLC Media List Management explained: covers the basics on setting up a playlist.
- Generate a .lib for using libVLC on Windows (before libVLC 2.1.0)
Compiling
To build LibVLC you need VLC source code and follow VLC compilation instructions since LibVLC it is directly shipped in VLC source code.
You will find headers in vlc-src/include/vlc and libvlc.so binaries in the hidden folder vlc-src/lib/.libs.
When using your custom LibVLC build you will need to define the environment variable VLC_PLUGIN_PATH pointing to VLC modules located in vlc-src/modules.
Examples
Playback
- Current version (1.1.x and later)
- Gtk Player: doc/libvlc/gtk_player.c
- Qt Player: doc/libvlc/QtPlayer/player.cpp
- WxWidgets Player: doc/libvlc/wx_player.cpp
Rendering and streaming
- Use LibVLC in an SDL application
- Stream into a memory zone
- Generate thumbnails using LibVLC: doc/libvlc/vlc-thumb.c
- Quick DVD ripper: doc/libvlc/libvlc_DVD_ripper.c
More complex examples
libVLC on Android
VLCKit for Cocoa (iOS/macOS)
You can find details on features and implementation on a designated page.
macOS
iOS
Crossplatform .NET/Mono support with LibVLCSharp
Outdated samples
- Versions 0.9.x and 1.0.x
- Version 0.8.6
- Visual C++ (uses "old" legacy API)
- VCL component for Delphi (out-of-date)
Language & platform bindings
LibVLC is a C library. It has bindings to the following languages and frameworks:
- C++, using the libvlcpp library
- The Web plugin for ActiveX (e.g. MSIE) and NPAPI (e.g. Firefox)
- WebChimera browser plugin with NW.js support
- WebChimera.js - another way to bind libvlc to node.js/io.js/NW.js/Electron
- Objective-C/Swift for iOS and macOS
- Perl
- Python
- Phonon (Qt/KDE) in C++
- Java
- Java/Scala/Kotlin/JNI Android
- C#/F#/.NET
- C++/CX
- Go
- Rust
- QmlVlc - Qt 5 QML binding
- VLC-Qt - Qt bindings
- wxWidgets MediaCtrl backend also in C++
- Using libvlc with Delphi
- Pascal/Delphi
- Tcl
- ActiveX with the built-in VLC browser plugin for MSIE (obsolete)