Is there a tool in libvlc to process URL redirects ?

This forum is about all development around libVLC.
pcouderc
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2013 07:15

Is there a tool in libvlc to process URL redirects ?

Postby pcouderc » 18 May 2020 20:07

Some streams use HTML redirects such as http://www.radioswissclassic.ch/fr/live/aacp.m3u which redirects to http://stream.srg-ssr.ch/m/rsc_fr/aacp_96 .
This works fine in vlc, but I have not found the equivalent in libvlc.
Maybe an event, but I have not found it...
Thanks
PC

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: Is there a tool in libvlc to process URL redirects ?

Postby mfkl » 18 May 2020 20:58

You need to parse the root item (m3u) and then play one of its sub items, same for youtube. C# example: https://code.videolan.org/videolan/LibVLCSharp/-/blob/3.x/docs/how_do_I_do_X.md#how-do-i-play-a-youtube-video
https://mfkl.github.io

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is there a tool in libvlc to process URL redirects ?

Postby Rémi Denis-Courmont » 18 May 2020 21:24

Redirections are handled automatically. Playlists not.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

pcouderc
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2013 07:15

Re: Is there a tool in libvlc to process URL redirects ?

Postby pcouderc » 21 May 2020 19:28

I have found no example on the net to do that. Should I use libvlc_media_parse_with_options ?
I suppose it has been done many times....


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests