Page 1 of 1

custom user agent option with ffmpeg

PostPosted: Fri Jan 04, 2013 8:29 pm
by Illico
For TF1 plugin, I parsed an http direct link, but I need to set a specific useragent and cookie.
Is it possible to provide it to ffmpeg contentUrl ?

I try this on my TF1.grrovy plugin without success:

contentUrl = httpDirectLink+"|User-Agent="+URLEncoder.encode(USER_AGENT)+'&Cookie='+URLEncoder.encode('seen='+fileId)

Re: custom user agent option with ffmpeg

PostPosted: Fri Jan 04, 2013 8:33 pm
by zip
You can set User agent on the ContentURLContainer.
Cookie - not possible for FFmpeg, you can only make URL requests with a cookie from the plugin.

Re: custom user agent option with ffmpeg

PostPosted: Fri Jan 04, 2013 8:41 pm
by Illico
zip wrote:You can set User agent on the ContentURLContainer.

Thanks, I will check that.
zip wrote:Cookie - not possible for FFmpeg, you can only make URL requests with a cookie from the plugin.

yes I already used that:
final USER_AGENT = 'Mozilla/5.0'
final COOKIES = ['windows8visit':'true']
String webPage = openURL(linkUrl, USER_AGENT, COOKIES)