Forums » Tutorial and setups »
Adding Tokenised IPTV to Tvheadend
Added by ian massey about 6 years ago
Vaders for example no longer uses a .ts link instead it now uses a token
Can someone help me with what to add and where to add it to this line to be able to use pipe please ?
The token used prevents it from scanning in like it normally does when just using a .ts link.
pipe:///usr/bin/ffmpeg -user-agent Mozilla/5.0 -re -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 300 -i http://vapi.vaders.tv/play/2790.ts?token=eyJ1c2VybmFtZkDFhmxpbmNzYXQiLCJwYXNzd29yZCI6InNhdGVsbGl0ZSJ9 -vcodec copy -acodec copy -metadata service_provider=sports -metadata service_name=sports -f mpegts -tune zerolatency pipe:1
Ive changed the above token slightly because it contains my login details.
Replies (5)
RE: Adding Tokenised IPTV to Tvheadend - Added by ian massey about 6 years ago
Anyone ?
I still cannot figure out how to pipe a url containing a token.
Surely this is possible ?
RE: Adding Tokenised IPTV to Tvheadend - Added by Hiro Protagonist about 6 years ago
Try putting the URL in single quotes: 'http://blah.blah/play.ts?token=blahblah'
Possibly the ? is messing things up.
You should be able to test with ffmpeg on the command line - just use everything between the pipe:// and pipe:1
If it works, you should see something like this:
Input #0, hls,applehttp, from 'http://blah.blah/play.ts?token=blahblah':
Duration: N/A, start: 47108.986311, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
Metadata:
variant_bitrate : 0
Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc
Metadata:
variant_bitrate : 0
At least one output file must be specified
RE: Adding Tokenised IPTV to Tvheadend - Added by ian massey about 6 years ago
Thanks for the reply.
Sadly adding single quotes didn't work and neither did double quotes either, with the command line returning all sorts if unreadable junk and constant audio beeps.
Still using single quotes but purposely removing the output format to prevent the unreadable junk on screen and to force an error, of course returned Unable to find a suitable output format, but after ignoring that error, the 2nd error it returned was an invalid argument error.
I too figured the ? might be the issue, but when its removed the command line returns 401 authentication error so the token isn't being sent.
Placing the -token= command in place of the ? was deemed an unrecognisable command.
If I remove the ? and use a space instead I get Unrecognized option 'token'.
Error splitting the argument list: Option not found
If it is the ? at fault what syntax does ffmpeg use in its place ?
Many IPTV Servers are now starting to use the token method and more will surely follow in a relatively short time, so finding out how to send a token using ffmpeg, is becoming more and more important.
RE: Adding Tokenised IPTV to Tvheadend - Added by ian massey about 6 years ago
Ok I've finally managed to get it to scan in.
I did us your quote suggestion, but it also seems that Tvheadend is being blocked, so I also had to add a Kodi header too.
Many thanks. I might start adding headers by default for all IPTV Servers. To be honest though I would have thought that Kodi was the one that they would have preferred to stop, but thinking about it, Tvheadend can reshare and they don't want that.
Anyway all sorted.
Cheers.
RE: Adding Tokenised IPTV to Tvheadend - Added by brimur brimur almost 6 years ago
FYI tokens are now handled from v4.2.6 onwards