Warning: Use of undefined constant fb_replace_wp_version - assumed 'fb_replace_wp_version' (this will throw an Error in a future version of PHP) in /usr/home/heximal/data/www/heximal.ru/public/blog/wp-content/plugins/replace-wp-version/fb-re_wpversion.php on line 39
Watching IPTV on iPhone and iPad | heximal blog

Warning: Cannot modify header information - headers already sent in /usr/home/heximal/data/www/heximal.ru/library/Heximal/Lang.php on line 43
Home > Misc > Watching IPTV on iPhone and iPad

Watching IPTV on iPhone and iPad

Warning: count(): Parameter must be an array or an object that implements Countable in /usr/home/heximal/data/www/heximal.ru/public/blog/wp-content/plugins/wp-syntax/wp-syntax.php on line 83

Recently I’ve made a greate effort (basicaly applying to myself) – I’ve tuned up my wi-fi router Linksys WRT54G2 for sharing IPTV. In fact, the sharing is not only for the iPad abd iPhone, but for other devices as well, and the article is named to attract search traffic) The main goal of the experiment was to make my mac-computer able to view iptv. Although a TV as itself is pure evil, sometimes it is fun to watch in parallel with any news, educational, or sports, cartoons… As personally for me, it’s a kind of relax for the brain sometimes. And so what do we have at the moment: wifi-router Linksys WRT54G2, ISP Interzet (this is not a principle, again, it’s mentioned mostly for search engines), the iMac, Windows-PC computer and a bunch of gadgets – iPhone, iPad, androids.

Several times I tried to reach this problem, I thought it was fully covered, but every time I ran an insufficiency of information. I could’t say there was no info at all, just it was too fragmented. This time I decided to go until the end. As a result of the success I thought that is not a good idea to put it and don’t forget next ime. Maybe someone will find this article useful…
I’ve got Linksys WRT54G2 right afer its predecessor, netgear, after a short lifecycle has broken. Unfortunately, Linksys did not want to show the iptv right “out of the box”. Not really did not want to, but produced something like

Defenitily there we can see the problem of data inconsistency probably due to UDP nature of iptv. That is, the problem is that the packets reach the computer in the wrong order. I tried to flash the standard firmware from Cisco, but something told me that wouldn’t not help. I was right.
Meanwhile, I remembered a story told by my colleague about the history of routers LinkSys, and that there are alternative firmwares (not from the manufacturer), which provide a much more advanced functionality. One of them is DD-WRT. I’m not gonna write a long tutorial about flashing dd-wrt to Lynksys but can say – it’s absolutely possible since our router is compatible with dd-wrt firmware. Я не буду описывать процесс перепрошивки (на сайте dd-wrt есть отличная инструкция), скажу лишь, что Linksys WRT54G2 совместим c dd-wrt.
Ok, what’s next?
You need to get a playpist of you ISP somewhere. It can looks inside like this:


#EXTINF:-1,Первый канал

#EXTINF:-1,Россия 1


Well, it’s all quite clear. The URL of kind udp://@ tells a media player an address of UDP-stream. As the reaction the player should start listening to specified UDP-port. Broadcaster will send a broadcast to all subscribers – who need to be taken away.
By the way, you’re already able to watch an IPTV. Make sure that the router is not enabled fpr filtering multicast. To do this, go to the router console, web browser (default is, go to the section Security -&gt Firewall
Make sure the Filter Multicast checkbox is uncheked.

Launching our player. On my Mac I’m using VLC, and by the way, the same for Windows-PC, so I will consider I’m covering two problmes touched in this article at the same time. Next we open the playlist and it should work!

The problems begin with the Wi-Fi devices. The router starts broadcasting UDP-traffic by air, which makes browsing the network via Wi-Fi almost impossible. What can we do? The only option is to include Multicast filtering back. But how to watch tv in this case? There is a solution, and the name of it is UDPXY. The thing is that the dd-wrt is a full-fledged Linux. UDPXY – daemon is a program that converts udp-stream into http, so that the link of kind udp ://@ becomes, for example, 1234, and it works with enabled Filter Multicast enabled.
How to install UDPXY on Linksys WRT54G2? In the right way we must take the source code, compile the architecture WRT54G2 … it’s terrible. It is much easier to take already compiled binary, upload to the router and run. Let’s do that. Go to the web interface of the router to the section Administration -&gt Commands

and inserting

cd /tmp 
sleep 30 
wget "http://heximal.ru/download/udpxy" 
sleep 30 
chmod +x udpxy 
/tmp/udpxy -a -p 81 -m 10.208.X.X -B 1Mb -M 30

then click for Run Commands. But first we need to specify apropriate udpxy parameters:
-a – ip-ip-address of your router (hint: you can obtain it in the top-right corner of web interface of router)
-p – tcp port of router
-m – IP-address of your router within the ISP network.
-B – buffer memory size. It’s recommended to set 1Mb (you sohuld bear in mind there are only 16Mb)
-M – interval in seconds for sending repeating igmp-request foк getting iptv stream.

You can also click Save Startup, then this series of commands will be executed each time you start the router. Byt the way, you can perform these commands using telnet.
What exactly is going on here? Udpxy binary downloaded from the internet site (I’ve decided to keep it outside because currently I don’t have a computer that is always on and is guaranteed to give the router a file at any time). Unfortunately, we have to do it each time, as far as udpxy is not installed in the standard firmware dd-wrt software for obvious reasons.There are lot of progams for dd-wtr, and it’s not possible to include them all to a standart assembly. Even though the router is the WRT54G2 Flash memory (4MB), it’s used only for storing the system image that is copied to RAM (16Mb) on startup, it means that the file system is mounted in the memory. As the result, after each restart all files previosly saved to the virtual disk will be erased.
This issue can be resolved by making own custom dd-wrt assembly which will include udpxy, but it needs a lot of body movements.
Let us consider the option of downloading from the Internet udpxy server on each startup – it’s quite acceptable.
One can make sure the udpxy works well if opens the following URL in web-browser:

We can sert the Filter Multicast checkbox in router firewall settings and then open URLs of kind instead of udp://@

Now I want to say a couple of words about how to watch all of this on mobile gadgets like iPhone, iPad, Android.
Well, we need some specific apps, cap! I found a couple of good apps for iOS in the AppStore. They are OPlayer and GoodPlayer. They’re able to play http-streaming. OPLayer has quite friendly user interface. Launch it, tap Open URL, add URL of kind and them watch.

However, I did not find how to download playlist – had to add channels manually.

And one more thing. OPlayer didn’t want to launch on my iPad, so
I had to fork out for GoodPlayer, which is even cooler due to a bunch of some obscure settings)

There is a good solution for Android devices as well. It even allows to load playlist)

Categories: Misc Tags: ,
  1. Никита
    October 3rd, 2012 at 23:49 | #1

    наканецто! наканецто я смогу смотреть iptv на macOS
    автор, огромнейшее тебе спасибо прям глубокий тебе поклон

    я где-то читал что на маке порты начиная с 1001 до какогото там 2000 что ли забиты , и получить к ним права может только root пользователь, а у меня добрая половина каналов висит на порте 1001 , так что твоя статья была оочень полезной и нужной.

  2. Антон
    March 11th, 2013 at 20:26 | #2

    Лично я смотрю тв на bilink.tv и ни разу не жаловался. Мои любимые каналы, цена копеешная, качество отличное. По очереди смотрю на айпаде и компе. Пока варианта лучше не нашел

  3. Максим
    March 11th, 2013 at 21:59 | #3

    Недавно открыл для себя Bilink.TV. Вроде нормально работает. Хорошая подборка каналов и цена нормальная. Плюс также на компе могу смотреть.

  4. Андрей
    March 22nd, 2013 at 19:36 | #4

    Не пробовал смотреть через гаджеты, но сейчас смотрю IPTV онлайн через Bilink, говорят он только на территории Украины работает, но я пока лучше сервиса по стоимости не находил

  5. Доброжелатель
    June 26th, 2013 at 12:24 | #5

    Антон, Максим, Андрей ты затрахал на всех сайтах свою херню пишешь

  6. Дмитрий
    August 18th, 2013 at 19:29 | #6

    Достаточно просто установить плеер, поддерживающий чтение плей-листов формата m3u (у меня стоит goodplayer, к сожалению он платный (100 руб.) стоит ) скачать такой плей лист с сайта и закинуть его в программу через iTunes и будет вам счастье)))

  7. August 18th, 2013 at 20:11 | #7

    Видимо, вы не совсем внимательно прочитали статью. goodplayer я упоминал – это действительно хорошая программа. Суть в том, что если раздавать iptv по wifi, это очень сильно забивает эфир. Поэтому и существуют такие инструменты как udpxy