VideoLAN::LibVLC::Media - Playable media stream
version 0.05
This object wraps libvlc_media_t, which is an open stream of playable media. It can be created from a file descriptor, path, or URL ("location"). Specify one of those options to the constructor, and also a library instance in the "libvlc" attribute.
libvlc_media_t
A quick and easy way to create media objects is with "new_media" in VideoLAN::LibVLC, which auto-detects the type of thing you are trying to open.
File name of media. One of 3 possible constructor parameters
URI of media. Does not need to be a URI object. One of 3 possible constructor parameters.
File descriptor of media file. Must be a "real" file handle with a defined fileno.
fileno
Hashref of metadata tags extracted from the media file. These are not available (undef) until after the media has been parsed, which is a blocking operation that depends on the decoder thread. See "parse".
Some tags are only supported by newer versions of libvlc. The current possible list is:
Title Artist Genre Copyright Album TrackNumber Description Rating Date Setting URL Language NowPlaying Publisher EncodedBy ArtworkURL TrackID TrackTotal Director Season Episode ShowName Actors AlbumArtist DiscNumber DiscTotal
my $media= VideoLAN::LibVLC::Media->new( libvlc => $vlc, location => $url, # path => $filename, # specify only one fd => $handle, # );
Parse the media stream
Michael Conrad <mike@nrdvana.net>
This software is copyright (c) 2019 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install VideoLAN::LibVLC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VideoLAN::LibVLC
CPAN shell
perl -MCPAN -e shell install VideoLAN::LibVLC
For more information on module installation, please visit the detailed CPAN module installation guide.