Setting http-user-agent when restreaming HLS stream

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
InfernoZeus
New Cone
New Cone
Posts: 3
Joined: 22 Feb 2009 14:06

Setting http-user-agent when restreaming HLS stream

Postby InfernoZeus » 12 Oct 2013 03:50

I'm trying to restream a HLS stream, which has a #EXT-X-KEY set in the m3u8. The only way to get that key is to change the user agent.

This works if I set it in "Open Network Stream" under "Edit Options" like so:

:http-user-agent=xxx

but when I try to restream the feed (no transcoding or anything fancy), it seems to ignore the same identical flag.

Is this just not possible with VLC, or is there a trick to get it working?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Setting http-user-agent when restreaming HLS stream

Postby Jean-Baptiste Kempf » 15 Oct 2013 12:36

How are you restreaming the feed?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

InfernoZeus
New Cone
New Cone
Posts: 3
Joined: 22 Feb 2009 14:06

Re: Setting http-user-agent when restreaming HLS stream

Postby InfernoZeus » 15 Oct 2013 12:45

Media -> Stream -> Network tab, Enter m3u8 URL, add the http-user-agent to "Edit Options", and then go through the Stream Output 'wizard'.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Setting http-user-agent when restreaming HLS stream

Postby Jean-Baptiste Kempf » 15 Oct 2013 12:59

Look at the last page with the big sout option edition. Add it before the :sout part
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

InfernoZeus
New Cone
New Cone
Posts: 3
Joined: 22 Feb 2009 14:06

Re: Setting http-user-agent when restreaming HLS stream

Postby InfernoZeus » 15 Oct 2013 13:14

Ah, before. I think I already tried it after with no luck. Does the User Agent string need to be encoded somehow? In the SD lua script, I've got

http-user-agent=AppleCoreMedia/1.0.0.8C148 (iPad; U; CPU OS 4_2_1 like Mac OS X; en_us)

which works fine as it's in quotes, but how do I cope with the spaces in the wizard? Can I just put quotes around the whole user-agent like this:

:http-user-agent="AppleCoreMedia/1.0.0.8C148 (iPad; U; CPU OS 4_2_1 like Mac OS X; en_us)"

Edit: Just tried it, and it works perfectly! Thanks so much for the help :D

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Setting http-user-agent when restreaming HLS stream

Postby Jean-Baptiste Kempf » 21 Oct 2013 10:29

VLC options are always with quotes.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 99 guests