Project

General

Profile

URL problems when importing IPTV to TVH

Added by Cleiton Oppenheimer over 3 years ago

Hello everyone.

I have a IPTV Server which needs user and password to be embedded in the URL.

The problem is that I have a Symbol in the password. After some research, I found that I could substitute the symbol '#' to '%23' and it will pass with the URL.

Testing it with Chrome and VLC worked and I was finally able to play the IPTV stream

When I import it as Automatic IPTV Network, it will get the 401 Error. For some reason the ULR field inside TVH is not recognizing the user/pass in the URL. When I saved the content of the IPTV list into a file and loaded it with "file:///" as the URL, TVH was able to load the muxes, but the muxes will not find any service, since they have the user/pass with the URL.

I don't know what else could I try here. Maybe any kind of translating inside linux, so that I point it to a local URL, for example http://localhost/channel1 and it gets translated to http://user:password%[email protected]:9981/stream/channelid/1149999023?ticket=4A36A68AC305E9FB501779AB47997D4DC0343CA7&profile=pass

Any hint with this?

By the way, I'm using build 4.3-1967~geb59284b8

Thanks


Replies (15)

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

Would there be another way to user credentials in the URL that might accept the symbol? Something like --user=@dmin --password=p@ssw0rd (security is not a concern here, since everything runs over VPNs).

I have just tried 02 other IPTV sources from the same server:
1- Without user/password everything works normal
2- User/Pass without any special character also works normal

So the issue really is really related with TVH reading the symbol in the string.

Unfortunately, it's out of my reach to get other user/password (without special character) for this IPTV.

RE: URL problems when importing IPTV to TVH - Added by saen acro over 3 years ago

What server is one you take playlist?

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

It's a "black box" running an old and modified Version of TVH.

I am able to access TVH WebPage of the server and perform some modifications. But, most of them are reset to "factory" once a day. The box runs a script for this "recovery" (I believe). I am able to set */* user and password and it works. Also I was able to create user/pass = test/test and it also works.

The point is, I want a workaround for not having to create user/password everyday. Unfortunately the box is not accessible through SSH/Telnet and the HDMI output is broken so that I could handle the "recovery script" or create another script that would add user/password to TVH automatically scheduled.

The box is able to provide IPTV, but its default user/password (which does not get lost everyday) contain special character. So it is preventing me to import it into another TVH which is my main server (and I can do any kind of trick, if necessary).

tvh.PNG (37 KB) tvh.PNG

RE: URL problems when importing IPTV to TVH - Added by saen acro over 3 years ago

Add ip access restriction to star user and get playlist as "http://tvh:9981/playlist/channels"

Build normal vesion for this "black box"

post details of build "mostrar detalhes"

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

Will this playlist work later when the star user and pw is no longer available in the box? As I described, unfortunately the box "resets" some settings once a day, and the user/password is one of the settings that are erased every day.

See build details:

Configure arguments:
  --prefix=/data/local/tvheadend --host=arm-linux --disable-avahi --disable-v4l --enable-dvbcsa --enable-libav --enable-ffmpeg_static --disable-dvbscan --platform=linux --enable-android --enable-sbox --enable-nxvpu --disable-dbus_1

Compiler:
  Using C compiler:                        /tools/ADT/arm-linux-androideabi-4.8/android-14/bin/arm-linux-androideabi-gcc
  Using C flags:                           -DSBOX -DANDROID -DCONFIG_DVB_S2_EXT -DCONFIG_DVB_MWDVB_HW_PID_FILTER_OPERATION -DNEXELL -I/hard2/keyman/sbox_ep002_work/tvheadend/lib/openssl/include -I/hard2/keyman/sbox_ep002_work/tvheadend/lib/dvbcsa/include -I/hard2/keyman/sbox_ep002_work/tvheadend/lib/iconv
  Using LD flags:                          -llog -L/hard2/keyman/sbox_ep002_work/tvheadend/lib/openssl/lib -L/hard2/keyman/sbox_ep002_work/tvheadend/lib/dvbcsa/lib -ldvbcsa -L/hard2/keyman/sbox_ep002_work/tvheadend/lib/iconv -liconv
  Build for arch:                          arm

Binaries:
  Using PYTHON:                            python
  Using GZIP:                              gzip
  Using BZIP2:                             bzip2

Options:
  cwc                                      yes
  capmt                                    yes
  constcw                                  yes
  linuxdvb                                 yes
  satip_server                             yes
  satip_client                             yes
  hdhomerun_client                         no
  hdhomerun_static                         no
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  no
  timeshift                                yes
  trace                                    yes
  imagecache                               yes
  avahi                                    no
  zlib                                     yes
  libav                                    yes
  ffmpeg_static                            yes
  libx264                                  yes
  libx264_static                           yes
  libx265                                  no
  libx265_static                           no
  libvpx                                   yes
  libvpx_static                            yes
  libtheora                                yes
  libtheora_static                         yes
  libvorbis                                yes
  libvorbis_static                         yes
  libfdkaac                                no
  libfdkaac_static                         no
  nvenc                                    no
  qsv                                      no
  libmfx_static                            no
  inotify                                  yes
  epoll                                    yes
  uriparser                                no
  ccache                                   no
  tvhcsa                                   yes
  bundle                                   no
  dvbcsa                                   yes
  dvben50221                               no
  kqueue                                   no
  dbus_1                                   no
  android                                  yes
  tsdebug                                  no
  gtimer_check                             no
  slow_memoryinfo                          no
  libsystemd_daemon                        no
  bintray_cache                            yes
  sbox                                     yes
  nxvpu                                    yes
  W_unused_result                          yes
  atomic64                                 yes
  atomic_time_t                            yes
  gmtoff                                   yes
  py_gzip                                  yes
  bin_pkg_config                           yes
  bin_xgettext                             yes
  bin_msgmerge                             yes
  bin_gzip                                 yes
  bin_bzip2                                yes
  ssl                                      yes
  linuxdvbapi                              yes
  upnp                                     yes
  libogg_static                            yes
  inotify_h                                yes
  mpegts                                   yes
  mpegts_dvb                               yes

Packages:
  openssl                                  1.0.1f
  zlib                                     1.2.8

Installation paths:
  Prefix:                                  /data/local/tvheadend
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               ${datadir}/man

RE: URL problems when importing IPTV to TVH - Added by saen acro over 3 years ago

Is this some Android box?

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

Indeed, but since HDMI is "burned" there is nothing that can be changed "blindly".

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

SSH would be possible after installing some tricks in Android. Since no video output is working, there is nothing I can do.

Thinking about TVH, is there any kind of URL that can be used to create username and password? If it is possible, I can work with a script running outside the box, to "create" a new username/password everyday. Example:

http://ip.tvh:port/createusername=test/createpassword=test

RE: URL problems when importing IPTV to TVH - Added by saen acro over 3 years ago

You need to use API https://github.com/dave-p/TVH-API-docs
Do you try to activate SAT>IP server, and manage it from second TVH as client?

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

I will start reading API. Seems like to be possible to do something there

/api/serverinfo shows:

{"sw_version":"0.0.0~unknown","api_version":18,"name":"Tvheadend","capabilities":["caclient","tvadapters","satip_client","satip_server","trace","libav"]}

I am already using SAT>IP to use the DVB channels and it is working very well.

The point of using IPTV, is that I'm trying to use also the IPTV channels provided with the box (that I don't have a clue about the source, but are being served well by this android box and TVH).

Any hint regarding adding username/password through the API?

This seems to be what I should use:
https://github.com/dave-p/TVH-API-docs/wiki/Access

Unfortunately I'm not an expert on it...

RE: URL problems when importing IPTV to TVH - Added by saen acro over 3 years ago

Try SAT>IP, no users no passwords.

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

SAT>IP works only with "real tuners" (see picture). I am already using the DVB-S2 tuner as SAT>IP and it is working.

The IPTV content is not forwarded as SAT>IP. These are the content that I'm trying to export.

I'm trying to learn about the API... Something like:
curl --data 'enabled=true&username=test&password=test' 'http://admin::9981/api/passwd/entry/create'

But no success so far.

RE: URL problems when importing IPTV to TVH - Added by Cleiton Oppenheimer over 3 years ago

@saen acro

Thanks for pointing me to API.

I successfully could create new user and password using it. And now, I plan to add it to a bash script in other machine that will add user/password every 24 hours.

For everyone that might need this:

curl --data 'conf={"enabled": true,"username":"*","streaming":true}' 'http://user:password@TVHip:port/api/access/entry/create'

curl --data 'conf={"username":"*","password":""}' 'http://user:password@TVHip:port/api/passwd/entry/create'

Thanks

RE: URL problems when importing IPTV to TVH - Added by saen acro over 3 years ago

It is nice to hear that someone is reading and not waiting for everything to be served on a silver plate.

    (1-15/15)