Proposal Recording internet streams

Discussion in 'ZIDOO X9S' started by grapenose, Jul 15, 2017.

  1. grapenose

    grapenose Member

    Is it possible to record an internet stream.
    ie When streaming an app such as BBC iplayer is it possible to record that for later use.
     
  2. n_p

    n_p Active Member

    Yes, but not for you.
    Also, yes, but not for much longer.

    Here is the run down. The ENTIRE Kodi streaming plugin scene is set up to find direct video links from streaming hosts. You are talking about 200 programmers or more looking into just this on a host by host basis. If a video runs ins Kodi, its usually as simple as playing a video, then looking into the kodi log file at /sdcard/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log which usually displays the direct link, if possible.

    If not, and a link works in Kodi, theres always Jdownloader and Video Download Helper (Chrome/Firefox Plugin) to get it from the source link, that should be visible in the log file.
    To use Jdownloader or Video Download Helper you pretty much need a PC.

    There are two exceptions though. First, there are Video streaming protocols that prevent this, some of which are not supported by Kodi by default. There are special Kodi builds that support some of them - but here we are getting into "hazzle" territory. Second, its somewhat commonplace these days for some content producers to distribute their videos in html style players as m3u playlists, with the video being cut up in hundreds or thouands of small video files. Those arent fun to deal with either.

    Now to the "not much longer" part.

    All of this works, because there is no encryption standard for videos in browsers. The people who put videos online, most of the time, know that their audience isn't tech savvy enough to install ANYTHING, much less a browser plugin, so unless they are Netflix and a few handfull of other companies who can afford to develop their own web player solution, they usually let their videos stream unencrypted. This is basically why Kodis streaming plugins work. At all.

    This is changing. The W3C just recently was lobbied enough by industry interests, that they agreed to add a DRM solution for video to html (the architecture of the internet). Which means, that two years from now - every up to date browser will support DRM encrypted videos, and most companies will shift to DRM based video delivery solutions to "get more money out of their audience". At that point its the start of a cat and mouse game, which means, its game over for - "simple".

    Now to the not for you part - you want a button to press. You dont get that. *cookie?*
    The reason why you dont get that is, that there is a legal difference between downloading and streming in most territories. Also if there was one, people like you would tell their friends "look how easy" and thereby ruin the ecosystem for filehosts thats based on adviews.

    But as of now - "if there is a Kodi plugin for that source" holds true, there is a stong possibility that the video also can be downloaded/recorded.

    Also, because you asked about "recording from an app". Every app besides Kodi, pretty much is a DRM scheme in a box. Companies create apps, as a distribution mechanism, simply because they are closed source and you cant look at what they are doing "internally". Every time you say "app" and smile that unknowing smile, you dont know that apps were basically invented as a closed package to sell you stuff. ANd the answer to "can I look into where an app is getting..:" is no - pretty much all of the time. Kodi is an exception as it is open source. Other apps, as a general rule - NEVER, ever, are.
     
    Last edited: Jul 15, 2017
  3. n_p

    n_p Active Member

    Also, as HDCP currently is broken, and Amazon sells HDMI switches that strip it from the signal, (but for whatever reason no one is suing the vendors, because - DRM is just worth establishing, when you can screw over a customer, heck - don't touch vendors that deal in that stuff, like Amazon...) you can use a second Android box, run it through an HDMI switch that strips HDCP, then record it with the X9S through its HDMI recording feature.

    Which is set up for a non AV signal level (dont ask Zidoo why, they dont know better...), so the colors will be all washed out.

    But of course you dont want to do that - because that also only works in real time, actually is work, and lowers the source quality - so lets not act like this would be a viable solution...
     
    Last edited: Jul 15, 2017
    grapenose likes this.
  4. grapenose

    grapenose Member

    Thank you for your thoughtful reply.
    This is what I thought, though I didn't know that a HDMI switch would strip the DRM.
    I can already record BBC iplayer using get-iplayer, so this was just an example.
    Would like to make more use of X9S. It is hopeless for some streaming apps which seem to think it is rooted.
    Will try recording a HDMI stream to see how washed out the colours are.
    Bought this as a replacement for a MINIX, which I now regret.
     
  5. n_p

    n_p Active Member

    Ok, then lets take it a step further. To get the Kodi log file, enable ADB in the X9S's settings, then use adb (google XDA adb quick installer) from a PC to copy the file over. To do that you use the command line.

    adb connect IP.ADD.RE.SS (to connect to the X9S)
    adb devices (to look if the connection was successful)
    adb pull /sdcard/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log ~/Desktop

    (If you are on windows you have to replace ~/Desktop with a Windows path like C:\Users\USERNAME\Desktop)

    adb disconnect (to disconnect)

    Once youve done that successfully and can browse the log file in a Text editor on your PC, you can automate those steps by writing a script file (google shell scripting or Windows .bat scripting (if on Windows), so the next time you do it, you just have to double click on the script. :)

    Kodi (the streaming plugin scene) and Jdownloader are good "places" to start, because they have people working in the background, writing scripts to extract those links from webpages.

    edit: As for the HDMI splitters that strip HDCP, some do, some dont. You read Amazon user reviews to find out. (Or look up the "record everything" thread in this forum, where one is listed, afair...)
     
    Last edited: Jul 16, 2017
  6. freeroc

    freeroc Active Member

    The most direct way to record streaming video online is to record the screen, which avoid any restriction.
    I heard about a website which made all the screen-record things integrated and simplified, it is www.tubeninja.net.
    But after all, they have none business with android media box.
     
  7. n_p

    n_p Active Member

    First - no
    Second - dont pander to "most simple way" solutions
    Third - where do I start...

    Screen recording is not the solution. First, Android doesnt allow you to hook into system audio without rooting your device. Newsflash, less than 1% of Android users root their devices, because apparently its "hard" for todays userbase. Second you end up with a video that has to be edited down which creates additional overhead. Third, Android screen recording dosnt honor source framerate.

    But then the Website you posted has NOTHING to do with screen recording in the first place, even if you don't seem to have noticed. All it does is to take the open source JDownloader (presumably) scraper database, and make a web frontend around it. This is problematic because of three things.

    First - when you take away distributed scraping, and make it a "web service", all it takes is to block one IP to prevent it from happening.

    The service "host" has no incentive to keep all scrapers working, so if a few websites block it - it does nothing, and the user doesnt get a result. This, btw is also why you seldomly see a full list of supported hosts on these websites.

    Second - I know its all the rage amongst millenials to get their dependencies up on "services" - but then, thats in general an incredibly dumb thing. We scrambled for ages to get people enough general purpose comuputing power to enable them to do things, and as soon as they got it, they opted to throw it away and go for the server/user modell instead, because they were baited with "more easy" and "you only have to look at those ads".

    The same way you advertise for services to be "more easy" solutions that dont require users to install open source software, could get you fired from your job - because if thats the case, then no one needs Zidoo anymore - just buy an Amazon Fire Stick for a third of the price and only use Netflix. Much more easy, right? Wrong. Get people to use software, not services - everybody benefits from it in the long term. (Less centralization.)

    Third - Where do you get the source links? We've established, that you dont get them from most apps, and on an Android TV box, you dont use the browser - bcause its interface isnt set up to be used with a remote, and even navigating with an air mouse is a hazzle.

    Also, please stop recommending "things you heard of, but have no idea how they work or why". I know that most people would go with a popular solution over a sound one, but some folks like me try to combat that approach whenever possible.

    I know "Download Services" are all the rage amongst the "grown up with a smartphone" crowd, but at the same time they are maybe the worst compromise you can think of - exploitative in nature, there to capture an audience that doesnt know any better.

    So in the statement above -

    "Its most easy" is used as a hook -
    Screen recording is used to fake technical expertise -
    a website is recomended because of hearsay -

    and the problem isnt adequatly adressed.

    if thats your contribution to an issue - just dont say anything and everyone will be better off. Especially dont say anything if you are sporting an administrator tag, because people tend to believe you because of reputation (by proxy) alone.
     
    Last edited: Jul 17, 2017
  8. grapenose

    grapenose Member

    A bit hard on Freeroc but your points are valid.
    In Australia we have a commercial company Fetch TV which supplies a box that records their streams for later use.
    However you have to buy the box and subscribe to their content.Can't be used for just any streams.
     
  9. Nice Monkey

    Nice Monkey Well-Known Member Beta test group

    You can use a Xtreamer eXpress media player with HDCP on HDMI-IN turned OFF in developers settings to record any HDMI source as far as I am aware. It is a kind of hidden. Not using it myself.
    The recording quality restrictions for Video and Audio are identical to Zidoo HDMI-IN (I think, did not try).
     
    Last edited: Jul 18, 2017
  10. grapenose

    grapenose Member

    Tried the HDMI IN using a source with HDCP and would not record. Ran the content through a HDMI splitter (Video and Sound) and recorded with no problems. Picture was not that bad but it lost a lot of sharpness.
    Not what I really wanted though. Will investigate Kodi as a possibility to capture streams but would like the Zidoo to do it.
     

Share This Page