Page 1 of 1

Setting http-user-agent when restreaming HLS stream

Posted: 12 Oct 2013 03:50
by InfernoZeus
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?

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

Posted: 15 Oct 2013 12:36
by Jean-Baptiste Kempf
How are you restreaming the feed?

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

Posted: 15 Oct 2013 12:45
by InfernoZeus
Media -> Stream -> Network tab, Enter m3u8 URL, add the http-user-agent to "Edit Options", and then go through the Stream Output 'wizard'.

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

Posted: 15 Oct 2013 12:59
by Jean-Baptiste Kempf
Look at the last page with the big sout option edition. Add it before the :sout part

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

Posted: 15 Oct 2013 13:14
by InfernoZeus
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

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

Posted: 21 Oct 2013 10:29
by Jean-Baptiste Kempf
VLC options are always with quotes.