Hello,
I want to use m3u file (local file) with libvlc, how can i do that please?
Thank you.
Code: Select all
using(var libVLC = new LibVLC())
{
var media = new Media(libVLC, "https://www.youtube.com/watch?v=dQw4w9WgXcQ", FromType.FromLocation);
await media.Parse(MediaParseOptions.ParseNetwork);
using (var mp = new MediaPlayer(media.SubItems.First()))
{
var r = mp.Play();
Console.ReadKey();
}
}
Code: Select all
final Media media = new Media(mLibVLC,
Environment.getExternalStorageDirectory().getAbsolutePath()+
"/Download/modele.m3u");
mMediaPlayer.setMedia(media);
media.release();
mMediaPlayer.play();
Code: Select all
196 16367-16367/org.videolan.java_sample D/VLC: [00000075fbd86090/3fef] libvlc input: Creating an input for 'modele.m3u'
2022-08-27 14:35:47.201 16367-16457/org.videolan.java_sample D/VLC: [00000075fbd86090/4049] libvlc input: using timeshift granularity of 50 MiB
2022-08-27 14:35:47.201 16367-16457/org.videolan.java_sample D/VLC: [00000075fbd86090/4049] libvlc input: using default timeshift path
2022-08-27 14:35:47.202 16367-16457/org.videolan.java_sample D/VLC: [00000075fbd86090/4049] libvlc input: `file:///storage/emulated/0/Download/modele.m3u' gives access `file' demux `any' path `/storage/emulated/0/Download/modele.m3u'
2022-08-27 14:35:47.202 16367-16457/org.videolan.java_sample D/VLC: [00000075e9f28810/4049] libvlc input source: creating demux: access='file' demux='any' location='/storage/emulated/0/Download/modele.m3u' file='/storage/emulated/0/Download/modele.m3u'
2022-08-27 14:35:47.202 16367-16457/org.videolan.java_sample D/VLC: [00000075e9f28950/4049] libvlc demux: looking for access_demux module matching "file": 7 candidates
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [00000075e9f28950/4049] libvlc demux: no access_demux modules matched
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45d10/4049] libvlc stream: creating access: file:///storage/emulated/0/Download/modele.m3u
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45d10/4049] libvlc stream: (path: /storage/emulated/0/Download/modele.m3u)
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45d10/4049] libvlc stream: looking for access module matching "file": 25 candidates
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45d10/4049] libvlc stream: using access module "filesystem"
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45e90/4049] libvlc stream: looking for stream_filter module matching "prefetch,cache_read": 26 candidates
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45e90/4049] libvlc stream: Using stream method for AStream*
2022-08-27 14:35:47.203 16367-16457/org.videolan.java_sample D/VLC: [000000760be45e90/4049] libvlc stream: starting pre-buffering
2022-08-27 14:35:47.204 16367-16457/org.videolan.java_sample D/VLC: [000000760be45e90/4049] libvlc stream: received first data after 0 ms
2022-08-27 14:35:47.204 16367-16457/org.videolan.java_sample D/VLC: [000000760be45e90/4049] libvlc stream: pre-buffering done 258 bytes in 0s - 1749 KiB/s
Return to “Development around libVLC”
Users browsing this forum: No registered users and 27 guests