Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (http://stream-recorder.com/forum/forumdisplay.php?f=4)
-   -  

i24NEWS Live

(http://stream-recorder.com/forum/showthread.php?t=23954)

j_cool 06-17-2018 01:43 PM

i24NEWS Live


 
https://en.wikipedia.org/wiki/I24NEWS

They are not much arround on the internet.

http://uk.play.tv/live-tv/1110/i24-news-uk/

This is m3u8 url from http shiffer:

"https://edge-01.playmedia-cdn.net/origin02/amlst:i24-eng/playlist.m3u8?dar=ws&t=18ddf1b11ff0fbb27659a265b39 d112682c0d61962b62eacd7f69f98b392579cedb609bb3033b 737c4d6cc309dbbbb0e4ccc969004171b8764b6915f5c6229f 39bb0faf84e5e19c781546086987227be8fb5651d121608b7d a4940ededc50c74513ae3673049acfd9b33bbe246e3ab75721 8e96d0263ebb7e5a784349608c55c0f05e3434b243351"

It is similar to what was before on dailymotion:

https://www.dailymotion.com/i24news-en

Problem with that m3u8 url is that it doesn't last long, it is changing after a few minutes.

Any idea how to get this m3u8 url with CURL or some other means without opening the browser ?

troller12 06-18-2018 04:12 AM

Re: i24NEWS Live


 
Hi j_cool,

Code:

http://uk.play.tv/player/play/i24-news-uk/?format=hls&language=en
if you call this address then you get json content with entire streamlink you can use.Just need to read it right (format) (see it FF).Not sure about the command you can use with CURL now.Just check that out or maybe you can use anything else to read the content etc.

greetz

j_cool 06-18-2018 12:16 PM

Re: i24NEWS Live


 
Troller,

you put Streamlink to shame.

They have a plugin for play.tv and it doesn't work more often than it does work.

[cli][info] Found matching plugin play for URL http://uk.play.tv/player/play/i24-news-uk/
[plugin.play][error] invalid username
error: No playable streams found on this URL: http://uk.play.tv/player/play/i24-news-uk/
Press any key to continue . . .

Here is what I make out of "http://uk.play.tv/player/play/i24-news-uk/?format=hls&language=en"

i24.au3

Code:

#include <AutoItConstants.au3>
$s = "http://uk.play.tv/player/play/i24-news-uk/?format=hls^&language=en"
Local $iPID = Run('cmd.exe /c curl.exe ' & $s,'',@SW_HIDE,$STDOUT_CHILD)
ProcessWaitClose($iPID)
Local $s = StdoutRead($iPID)
$s = StringReplace($s,'\/','/')
$s = StringReplace($s,'{"url":"','')
$s = StringReplace($s,'"}','')
$s = StringReplace($s,'\u0026','&')
$header = '--http-header-fields="Accept-Encoding: gzip, deflate","Accept-Language: en-GB,en;q=0.5","Connection: keep-alive","Origin: http://uk.play.tv","Referer: http://uk.play.tv/live-tv/1110/i24-news-uk/","User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0"'
$s = $header & ' "' & $s & '"'
ShellExecute('mpv.exe',$s,'','','')

Replace mpv.exe with another player if you want and specify full path if it is not in %PATH%.
curl should also be on %PATH%, if it is not specify path in script.

Code:

#include <AutoItConstants.au3>
$s = "http://uk.play.tv/player/play/i24-news-uk/?format=hls^&language=en"
Local $iPID = Run('cmd.exe /c curl.exe ' & $s,'',@SW_HIDE,$STDOUT_CHILD)
ProcessWaitClose($iPID)
Local $s = StdoutRead($iPID)
$s = StringReplace($s,'\/','/')
$s = StringReplace($s,'{"url":"','')
$s = StringReplace($s,'"}','')
$s = StringReplace($s,'\u0026','&')
$s = '"' & $s & '"'
ShellExecute('C:\path\YOURPLAYER.exe',$s,'','','')

Save this code as txt file and name it i24.au3

Download autoit-v3.zip from https://www.autoitscript.com/site/autoit/downloads/ and extract it.



Open i24.au3 with scite.exe ( autoit editor and compiler ) and compile i24.au3 to get i24.exe by pressing Ctrl+F7
or choosing compile from tools menu.



Double click on i24.exe and here is screenshot of player working.


j_cool 06-21-2018 06:01 PM

Re: i24NEWS Live


 
Troller,

How can I work out what parameters come after url to get json output, like: ?format=hls&language=en

I tried to replicate your trick on "http://play.tv/live-tv/908/i24-news-english/?format=hls&language=en" and result:

message : "Une erreur est survenue. Veuillez réessayer un peu plus tard."

That url plays the same stream as "http://uk.play.tv/player/play/i24-news-uk/" and params ?format=hls&language=en don't work.



Html source:

Code:

App.Data = {"playerParameters":{
"initialize":"http:\/\/play.tv\/player\/initialize\/i24-news-english\/",
"play":"http:\/\/play.tv\/player\/play\/i24-news-english\/","lang":"en",
"autoPlay":true,"assets":{"player":"http:\/\/play.tv\/assets\/swf\/player.swf",
"clipboard":"http:\/\/play.tv\/assets\/swf\/zeroclipboard.swf"},
"tracking":{"label":"i24 News English"}
,"features":{"progress":{"enabled":false,"options":{"url":"http:\/\/play.tv\/player\/broadcast\/i24-news-english\/","preload":{"progress":"","startAt":"","endAt":"","program":{"title":"","genre":"","subgenre":""}}}},"requireCheck":{"enabled":false,"options":{"url":"http:\/\/play.tv\/player\/check\/"}},"channelLogo":{"enabled":false},"whiteLabel":{"enabled":false},"volume":{"enabled":true},"bitrate":{"enabled":true},"popup":{"enabled":true,"options":{"url":"http:\/\/play.tv\/live-tv\/908\/i24-news-english\/?popup=1"}},"switchHd":{"enabled":false},"sales":{"enabled":false,"options":{"url":"http:\/\/play.tv\/nos-offres\/","first":{"url":"http:\/\/play.tv\/nos-offres\/pack-premium\/","alias":"pack-premium"},"second":{"url":"http:\/\/play.tv\/nos-offres\/pack-informations\/","alias":"pack-informations"}}},"export":{"enabled":true,"options":{"embedCode":"<iframe width=\"610\" height=\"384\" src=\"http:\/\/play.tv\/player\/embed\/i24-news-english\/\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"><\/iframe>","linkTo":"http:\/\/play.tv\/live-tv\/908\/i24-news-english\/"}},"facebook":{"enabled":true,"options":{"url":"http:\/\/play.tv\/player\/share\/i24-news-english\/"}},"twitter":{"enabled":true,"options":{"url":"http:\/\/play.tv\/player\/share\/i24-news-english\/"}}}},"uniroll":{"flashUrl":"http:\/\/play.tv\/uniroll\/assets\/swf\/uniroll-0.16.4.swf","requestUrl":"http:\/\/play.tv\/uniroll\/request\/","version":"0.16.4","zoneUid":"prerollliveplaytvuk","requestParams":{"tid":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1Mjk2MjA1NTgsImN1c3RvbUNvbnRlbnQiOiJ7XCJhY2NvdW50SWRcIjowLFwiY2hhbm5lbElkXCI6OTA4LFwiZG9tYWluXCI6XCJwbGF5LnR2XCIsXCJpc1NlY3VyZVwiOmZhbHNlLFwiaXNUZXN0XCI6ZmFsc2UsXCJ1c2VySXBcIjpcIjg2LjE4Mi41NC4xMDlcIixcInZlcnNpb25cIjpcIjAuMTYuNFwiLFwiem9uZVVpZFwiOlwicHJlcm9sbGxpdmVwbGF5dHZ1a1wiLFwiY29uZmlnXCI6ZmFsc2V9In0.mTE12HJ5IpwIcdLZXaYjb-NV1U9Vm4rwix41tmDUgR0EVqg4_M2T1ldwcIBEajoB7u5TOdAkYTVkhmEalfWOww"},"forceHtmlVideo":true},"streamLanguage":"fr","uniadsParameters":{"adblocker":"adb=1","lang":"en","channelId":908,"appZone":"play-tv-uk.preroll","features":{"rollAds":{"enabled":true},"skipAds":{"enabled":false,"options":{"url":"http:\/\/play.tv\/nos-offres\/pack-premium\/","alias":"pack-premium"}}}}}

Result from "initialize":

Code:

curl.exe -H "Referer: http://play.tv/live-tv/908/i24-news-english/" "http://play.tv/player/initialize/i24-news-english/"
{"hasHd":false,"id":908,"imageUrl":"https:\/\/static.playmedia-cdn.net\/img\/tv_channels\/908_medium.png",
"productsUrl":"\/nos-offres\/","products":[{"alias":"pack-premium","label":"-","price":0,
"url":"\/nos-offres\/pack-premium\/"},{"alias":"pack-informations","label":"-","price":0,
"url":"\/nos-offres\/pack-informations\/"},{"alias":"prepaid-1m","label":"Play TV Premium","price":0,
"url":"\/nos-offres\/prepaid-1m\/"},{"alias":"prepaid-6m","label":"Play TV Premium","price":0,
"url":"\/nos-offres\/prepaid-6m\/"},{"alias":"prepaid-unlimited","label":"Play TV Premium","price":0,
"url":"\/nos-offres\/prepaid-unlimited\/"}],
"streams":{"fr":{
"flash":{"bitrates":[{"label":"0.8 Mbps","value":800,"default":true},{"label":"0.3 Mbps","value":300}]},
"rtsp":{"bitrates":[{"label":"0.8 Mbps","value":800,"default":true},{"label":"0.3 Mbps","value":300}]},
"hds":{"bitrates":[{"label":"0.8 Mbps","value":800,"default":true},{"label":"0.3 Mbps","value":300}]},
"dash":{"bitrates":[{"label":"0.8 Mbps","value":800,"default":true},{"label":"0.3 Mbps","value":300}]},
"hls":{"bitrates":[{"label":"0.8 Mbps","value":800},{"label":"0.3 Mbps","value":300},{"label":"Auto","value":0,"default":true}]}}}}

Result from "play":

Code:

curl.exe -H "Referer: http://play.tv/live-tv/908/i24-news-english/" "http://play.tv/player/play/i24-news-english/?format=hls^&language=en"
{"message":"Une erreur est survenue. Veuillez r\u00e9essayer un peu plus tard."}


j_cool 06-22-2018 10:21 AM

Re: i24NEWS Live


 
Streamlink plays this url: "http://play.tv/live-tv/908/i24-news-english/"

[cli][info] Found matching plugin playtv for URL http://play.tv/live-tv/908/i24-news-english/
[cli][info] Available streams: 300k (worst), 800k (best)
[cli][info] Opening stream: 800k (hls)
[cli][info] Starting player: mpv.exe

This is how plugin starts:

class PlayTV(Plugin):
FORMATS_URL = 'http://playtv.fr/player/initialize/{0}/'
API_URL = 'http://playtv.fr/player/play/{0}/?format={1}&language={2}&bitrate={3}'

and I don't get json output in browser with these urls:

"http://playtv.fr/player/play/i24-news-english/?format=hls&language=en&bitrate=800"

"http://play.tv/player/play/i24-news-english/?format=hls&language=en&bitrate=800"

message "Une erreur est survenue. Veuillez réessayer un peu plus tard."

troller12 06-22-2018 12:00 PM

Re: i24NEWS Live


 
Hi j_cool,

in the pagesource of each channel of that site you can find a streamlanguage info.
Code:

http://play.tv/live-tv/908/i24-news-english/
"streamLanguage":"fr"

http://play.tv/live-tv/30/fashion-tv/
"streamLanguage":"en"

If you check that first then you know what language you can use to call it with language paramter for the json link.

If the language dosent work then you get 400 Bad Request as response back instead of 200 OK.

If I see it right then only fr & en language types are used.Just switch to other language (en or fr) if one of them did fail (400 Bad Request) and and request json link again.Just try it again.

greetz

j_cool 06-22-2018 04:21 PM

Re: i24NEWS Live


 
"http://play.tv/player/play/i24-news-english/?format=hls&language=fr"

"https://edge-01.playmedia-cdn.net/origin02/amlst:i24-eng/playlist.m3u8?dar=ws&t=18ddf1b11ff0fbb27659a265b39 d112682c0d61962b62eacd7f69f98b392579cedb609bb3033b 737a26dd88d3f316d99f7db3997e5e5902e7a8d3721f17be66 c5dc01f6cedf270698ed0781b9d8edad2aa39228847ba5b7da dce1071f41d32d8c17a0fed892bde49d79c66f2a797d044138 f1a559835d85b59457f1e11ba8cd0accee0e3b69a8d9b"

This works with language=fr even though broadcast language is english.

Sometimes common sense does not work.

Streamlink's plugin has got it right and I got it wrong.

After reading your post, I'll get it right as well.

Cheers.

j_cool 01-26-2019 02:15 PM

Re: i24NEWS Live


 
There is a change in how website works now.


Before, this url : "http://play.tv/player/play/i24-news-english/?format=hls&language=fr"

would return:

"https://edge-01.playmedia-cdn.net/origin02/amlst:i24-eng/playlist.m3u8?dar=ws&t=18ddf1b11ff0fbb27659a265b39 d112682c0d61962b62eacd7f69f98b392579cedb609bb3033b 737a26dd88d3f316d99f7db3997e5e5902e7a8d3721f17be66 c5dc01f6cedf270698ed0781b9d8edad2aa39228847ba5b7da dce1071f41d32d8c17a0fed892bde49d79c66f2a797d044138 f1a559835d85b59457f1e11ba8cd0accee0e3b69a8d9b"


now it returns token:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJod HRwczpcL1wvZWRnZS0wNy5wbGF5bWVkaWEtY2RuLm5ldFwvb3J pZ2luMDJcL2FtbHN0OmkyNC1lbmdcL3BsYXlsaXN0Lm0zdTg_Z GFyPXdzJnQ9MThkZGYxYjExZmYwZmJiMjc2NTlhMjY1YjM5ZDE xMjY1MmJjZDcyMWE2MDAxM2RiYTYwMmZmODY4ODRiNGM3MGI2Z WEwOWFiM2M1OGEwMDQ4OWJiODU2ODM5YWM4MGYyNTJiYTM3NWI 0NjdiOWJkNjA2ZTY0Yzk3YTE5ZjZlNTNkMDM3MDQ5NGRmOTI3N zA5OGI0ZTczNGE1NWRhZjBkZjMxM2IyMGJhYWY3OWQ5ZDMyMmV kZjc2NjFkYWJkNThlZmQyMmRhNGExM2Q3MGQxMTUzNDhiMDI0N mU4ZDk3ZDNhZjU1NjRiYTk1YmU5ODIzOTZmNzZlOGU4MGQwYTE zNTRkNTgwNzMyZDdhM2U5NmJmM2U4NWM0YTBkNmY3YjVlNTQyZ TE1YjY1N2ZmYjkyNDY4ZmFkNjFkOGY4MmE2ODkzNGNjMGIyNDV kZWUwZDI1ZTM5YWExNGQ3YTkzNzBhMiJ9.01GGNxuxMTGnojj3 OMxXsr1G29RnFxAAoTqjire4xd0



I can get playlist.m3u8 and chunklist with http sniffer:

"https://edge-04.playmedia-cdn.net/origin02/amlst:i24-eng/playlist.m3u8?dar=ws&t=18ddf1b11ff0fbb27659a265b39 d1126ffdd3cce03753c70f0e586f6fcbb26e0e129430af2a4c bb3fafb828154207864cd43e35d6b2b78941c49bbb2a19663f e0d456519fec444f8a157e88243ec470ae1bc7e5d082592638 458b613629bdf862c3868d5f170977ca0039e7399318be0279 87877700458a4046e6d7260e89d9e60ae6fc7b114066d441f1 a7ac98f621348e941674896794dc4ca00257f5a0f0fbe5158e c001dc66c0f53071868d26c7a"

"https://edge-04.playmedia-cdn.net/origin02/amlst:i24-eng/chunklist_w890278171_b800000.m3u8?dar=ws&t=18ddf1b 11ff0fbb27659a265b39d1126ffdd3cce03753c70f0e586f6f cbb26e0e129430af2a4cbb3fafb828154207864cd43e35d6b2 b78941c49bbb2a19663fe0d456519fec444f8a157e88243ec4 70ae1bc7e5d082592638458b613629bdf862c3868d5f170977 ca0039e7399318be027987877700458a4046e6d7260e89d9e6 0ae6fc7b114066d441f1a7ac98f621348e941674896794dc4c a00257f5a0f0fbe5158ec001dc66c0f53071868d26c7a"


playlist doesn't play with MPV.

chunklist does play with MPV and chunklist is good for few minutes only. Stream plays for longer time once it is started.

Why playlist does not play in MPV and chunklist plays?

and how to get playlist now after changes in how website works?

j_cool 01-27-2019 01:29 AM

Re: i24NEWS Live


 
Maybe something can be put together from these parameters:

http://play.tv/live-tv/908/i24-news-english/?popup=1

Code:

      App.Data = App.Data || {}
      App.Data = {
    "playerParameters": {
        "initialize": "http://play.tv/player/initialize/i24-news-english/",
        "play": "http://play.tv/player/play/i24-news-english/",
        "lang": "en",
        "autoPlay": true,
        "assets": {
            "player": "http://play.tv/assets/swf/player.swf",
            "clipboard": "http://play.tv/assets/swf/zeroclipboard.swf"
        },
        "tracking": {
            "label": "i24 News English"
        },
        "features": {
            "progress": {
                "enabled": false,
                "options": {
                    "url": "http://play.tv/player/broadcast/i24-news-english/",
                    "preload": {
                        "progress": "",
                        "startAt": "",
                        "endAt": "",
                        "program": {
                            "title": "",
                            "genre": "",
                            "subgenre": ""
                        }
                    }
                }
            },
            "requireCheck": {
                "enabled": false,
                "options": {
                    "url": "http://play.tv/player/check/"
                }
            },
            "channelLogo": {
                "enabled": false
            },
            "whiteLabel": {
                "enabled": false
            },
            "volume": {
                "enabled": true
            },
            "bitrate": {
                "enabled": true
            },
            "popup": {
                "enabled": true,
                "options": {
                    "url": "http://play.tv/live-tv/908/i24-news-english/?popup=1"
                }
            },
            "switchHd": {
                "enabled": false
            },
            "sales": {
                "enabled": false,
                "options": {
                    "url": "http://play.tv/nos-offres/",
                    "first": {
                        "url": "http://play.tv/nos-offres/pack-premium/",
                        "alias": "pack-premium"
                    },
                    "second": {
                        "url": "http://play.tv/nos-offres/pack-informations/",
                        "alias": "pack-informations"
                    }
                }
            },
            "export": {
                "enabled": true,
                "options": {
                    "embedCode": "<iframe width=\"610\" height=\"384\" src=\"http://play.tv/player/embed/i24-news-english/\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"></iframe>",
                    "linkTo": "http://play.tv/live-tv/908/i24-news-english/"
                }
            },
            "facebook": {
                "enabled": true,
                "options": {
                    "url": "http://play.tv/player/share/i24-news-english/"
                }
            },
            "twitter": {
                "enabled": true,
                "options": {
                    "url": "http://play.tv/player/share/i24-news-english/"
                }
            }
        }
    },
    "uniroll": {
        "flashUrl": "https://play.tv/uniroll/assets/swf/uniroll-0.16.4.swf",
        "requestUrl": "https://play.tv/uniroll/request/",
        "version": "0.16.4",
        "zoneUid": "prerollliveplaytvuk",
        "requestParams": {
            "tid": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1NDg1NzY2ODEsImN1c3RvbUNvbnRlbnQiOiJ7XCJhY2NvdW50SWRcIjowLFwiY2hhbm5lbElkXCI6OTA4LFwiZG9tYWluXCI6XCJwbGF5LnR2XCIsXCJpc1NlY3VyZVwiOnRydWUsXCJpc1Rlc3RcIjpmYWxzZSxcInVzZXJJcFwiOlwiODYuMTgyLjU0LjIxMVwiLFwidmVyc2lvblwiOlwiMC4xNi40XCIsXCJ6b25lVWlkXCI6XCJwcmVyb2xsbGl2ZXBsYXl0dnVrXCIsXCJjb25maWdcIjpmYWxzZX0ifQ.KxeSB9JCSANQP8DE4zP9KrDWkjcF7GK_efK_4hFZh3DVBaSxHFlBxuRKe4jUbLEpDBI27XPOiwMaW-5NUS7w5A"
        },
        "forceHtmlVideo": true
    },
    "streamLanguage": "fr",
    "uniadsParameters": {
        "adblocker": "adb=1",
        "lang": "en",
        "channelId": 908,
        "appZone": "play-tv-uk.preroll",
        "features": {
            "rollAds": {
                "enabled": true
            },
            "skipAds": {
                "enabled": false,
                "options": {
                    "url": "http://play.tv/nos-offres/pack-premium/",
                    "alias": "pack-premium"
                }
            }
        }
    }
}


troller12 01-28-2019 11:30 AM

Re: i24NEWS Live


 
Hi,

you can still use the same URL as before.In this new case it will return a mixed string and no direct URL anymore.The new string you get back constists three strings.First one and second string parts are encoded in Base64.So you just need to decode the middle string to get whole URL to the stream to see in JSON format.Just search the "." in the whole string = end marker and spilt them.
Example:
Code:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
eyJ1cmwiOiJodHRwczpcL1wvZWRnZS0wMi5wbGF5b...YSJ9.
-q9Slt3u3BDBim_tFxoz3S-ee73HjxruLbfp0cCVbG4

Now deocde first 2 strings with Base64 and you get this...
Code:

{"typ":"JWT","alg":"HS256"}
Code:

{"url":"https:\/\/edge-02.playmedia-cdn.net\/origin02\/amlst:i24-eng\/playlist.m3u8?dar=ws&t=18ddf1b11ff0fbb276......."}
Now format the raw JSON (to remove \) and use it.Just try to use your AutoIt stuff etc you know.Send some feedback whether it works for you.

greetz


All times are GMT -6. The time now is 12:03 AM.