1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Plex HTML5 App WorldWide Request

Discussion in 'Developers Corner' started by jgametest, Dec 17, 2013.

  1. Jan 21, 2014 #41 of 457
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    That's very interesting. Strange how there is no audio information. Looks like this means TiVo can play back ismv format. Will have to see if I can get an ismv encoding pushed to TiVo (probably have to trick pyTivo to let it through as is).
     
  2. Jan 22, 2014 #42 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,512
    180
    Apr 17, 2000
    Nevada
    That makes sense. The website uses Silverlight, which is SmoothStream. However Neflix uses a custom app, so it could be a proprietary implimentation.

    Does anyone know if the YouTube app does adaptive streaming? Meaning will it change resolution based on your network speed? Or AOL On or Moviefone? That would tell us if some sort of fragmented MP4 is supported in Opera.
     
  3. Jan 22, 2014 #43 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    The audio stream is sent in a different GET request. It's called an "isma" file. I didn't decode that, but I probably could if you wanted me to.
     
  4. Jan 22, 2014 #44 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    I can capture the youtube .mp4 later on tonight, I have no idea how to determine if it is adaptive streaming, but I can run it through mediainfo, if that will help?
     
  5. Jan 22, 2014 #45 of 457
    jgametest

    jgametest New Member

    117
    0
    Oct 30, 2013
    Keep in mind this is how Streambaby was born from the old Youtube application. It's possible we could learn a lot from the new format and provide a valuable feature to the group. I was doing some side work running an Airplayit server from my primary IP and port. When pushing this address into KMTTG web the screen was showing up as Black background and blue hyperlinks obviously could not navigate. So this lead me to input the address manually with EntertheWebz and it loaded the formatted page in correct form showing me my entire list with playback option of Live Conversion or Play. When I choose conversion it loaded lots of Html codes indicating the info was bouncing all over the place but nothing hit AirPlayit as a conversion request. Hmm, so I tried live playback for a minute my TiVo thought about the request and in the bottom left of my screen it said processing then it timed out and said failed source. The video playback was .mp4 and .avi neither was understandable by the built in codec of EntertheWebz. I have reached out to David the developer to see if there is a way we can use a live open source codec that could emulate this ability but that could take time to find such a thing. Perhaps there is a web version of FFMPEG as an HTML5 compatible device. Not sure if it's possible but makes you think. I will keep hunting and if I come across a lead will let you know.:up:
     
  6. Jan 22, 2014 #46 of 457
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Interesting. So on TiVo side it must be muxing audio and video together on the fly I would guess into TS container. It would be useful to see audio specs as well, though we're pretty sure it must be AC3.

    pyTivo pushes are not going through currently and I couldn't get my ismv encoding to play via Streambaby raw method so no luck getting TiVo to play ismv directly yet for me.
     
  7. Jan 22, 2014 #47 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    I'm not at all familiar with HME. But what about some sort of hybrid frankenapp that uses a combo of HTML5 and HME.

    As I understand it, kmttg has the ability to both launch HTML5 url's and HME apps. What if a specialized web server was created which would serve up an HTML5 plex app, but once a video is selected, it would ping this web server with the request, which in turn would launch an HME video player window that would use the plex transcoder for the file?

    I get that there is still the 1.1g limitation, but is better than nothing, right? My only issue is I suspect it would be crazy slow.

    How does the HME protocol work? I seem to be having trouble finding documentation on the video side of things.
     
  8. Jan 23, 2014 #48 of 457
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    If you're going to go HME route and live with the 1.1GB limitation then may as well just use Streambaby. HME also eliminates the Mini from being used as a client as well. Note that via Streambaby you can also push videos instead of streaming them to get past the 1.1GB limitation and there's a "vidmgr" app out there that does that as well (using pyTivo to push) but with fancier metadata viewing options, but none of those work for a Mini. The nice thing about an Opera based solution is that it does work with the Mini and doesn't have the delays in starting video playback that HME solutions have.

    I do envision eventually if an html-based solution is found that it may be useful to wrap HME around it so as to have a way to launch html from the TiVo itself instead of using kmttg or the like. i.e. The only purpose of HME is to be an html launch point from "Apps & Games" for the application, and that would work for a Mini as well.
     
  9. Jan 23, 2014 #49 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Exactly what I was thinking. I didn't have a chance to decode the youtube stuff yet, but I'll post it up, when I do.
     
  10. Jan 23, 2014 #50 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Ok, I think there might be some good news with respect to youtube. Take a look at this media info:

    General
    Complete name : /Users/[*removed*]/Desktop/videoplayback.mp4
    Format : dash
    Codec ID : dash
    File size : 64.0 KiB
    Duration : 5s 5ms
    Overall bit rate : 105 Kbps
    Encoded date : UTC 2014-01-19 14:11:10
    Tagged date : UTC 2014-01-19 14:11:10

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L2.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 5s 5ms
    Bit rate : 241 Kbps
    Width : 426 pixels
    Height : 240 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.098
    Stream size : 147 KiB
    Encoded date : UTC 2014-01-19 14:11:10
    Tagged date : UTC 2014-01-19 14:11:10

    Here is the GET

    GET /videoplayback?clen=7411046&burst=40&algorithm=throttle-factor&signature=93B3116767BD39A3EDEBC08819C6C6C51DE1E761.7C348E3AAD34F21E7D56AF8F432313D80A5433F7&source=youtube&gir=yes&fexp=917000%2C930005%2C909207%2C906434%2C916612%2C901476%2C936910%2C936913%2C907231&factor=1.25&key=yt5&lmt=1390227070849331&dur=244.578&ipbits=0&sver=3&id=0d8bbf6c66d98a24&ip=68.55.5.176&sparams=algorithm%2Cburst%2Cclen%2Cdur%2Cfactor%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Csource%2Cupn%2Cexpire&itag=133&mv=m&mt=1390524907&ms=au&upn=3fnOVmqOxqY&expire=1390548037&cpn=ayacBtj7J4PEbYRR&alr=yes&mime=video%2Fmp4&ratebypass=yes&ptk=7minutesinheaven%2Buser&oid=c3gpN_mwQ_w5xpWDAmNysQ&ptchn=310aJFjr6Gn9mGZjMZ2VTQ&pltype=content&range=0-65535&keepalive=yes&fr=yes HTTP/1.1
    User-Agent: Opera/9.80 (Linux mips) Presto/2.12.407 Version/12.50 , TiVo-Device/20.3.8-USA-6 (TiVo, TCD848000, wired)
    Host: r1---sn-jvhj5nu-p5q6.googlevideo.com
    Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
    Accept-Language: en
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    Origin: https://www.youtube.com
     
  11. Jan 23, 2014 #51 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
  12. Jan 24, 2014 #52 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,512
    180
    Apr 17, 2000
    Nevada
    Cool find! MPEG-Dash is a an open standard similar to SmoothStream, but with a slightly different playlist format. Still uses fragmented MP4 files though. If we can figure out how to get dash files out of FFmpeg then a streaming server might actually be possible. Although I'm not sure about AC3 audio. It might be limited to 2ch AAC, which could be another reason why Netflix doesn't use Opera.
     
  13. Jan 24, 2014 #53 of 457
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Took me a little while to figure out what you were saying plays. The "Demo Player" link followed by "oops_cenc" specifically is what you need to follow. For those that want to try it, you can use Q,A,W,S keys on Slide remote or your keyboard with kmttg on the virtual remote tab to navigate around the web page somewhat. Q, A keys jump between links, W, S keys between headers.
     
  14. Jan 24, 2014 #54 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    So based on my research Plex is capable of outputting mpeg-dash (it's what it uses for Chromecast). I played around with it a bit last night, and I got it somewhat working, but I couldn't get it to output what looks like a fully complete MPD file. At least, it wasn't nearly as complete as the test MPD files that player I found was using.

    I don't have a chromecast, but I might purchase one this weekend and play around with it, and see if I can intercept the calls it is making to Plex. What's interesting about chromecast is that it works similar to Opera SDK in that it is basically just a chrome web browser.
     
  15. Jan 25, 2014 #55 of 457
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    Sorry if this is an obviously ignorant question...

    But couldn't we build a nice looking interface to browse media using the HTML5 interface and then initiate Stream Baby Stream to play the video?

    I would much rather use the TiVo video playback tools anyway.

    Would this work on the mini?
     
  16. Jan 25, 2014 #56 of 457
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    No. HME streaming is actually copying to a TiVo buffer which Mini doesn't have. Thus, for example, streambaby doesn't work on Mini (the browsing part does, starting video stream does not). Only way to stream to a Mini is via its Opera browser.
    If you're just looking for a nicer front end than streambaby then perhaps "vidmgr" will suit your needs. It's an HME front end to pyTivo push. (Obviously won't work on a Mini either).
     
  17. Jan 25, 2014 #57 of 457
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    I have looked at it before...

    What I would REALLY like is for TiVo to see / handle my PyTiVo share as a modern TiVo with the HDUI and Streaming et al...

    But not really expecting it! :)
     
  18. Jan 25, 2014 #58 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Ok, so I went out and bought a chromecast. A couple of things:

    This is a sample MPD file generated by plex:

    <MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="static" minBufferTime="PT10S" mediaPresentationDuration="PT0H42M20S" maxSegmentDuration="PT10S">
    <Period start="PT0S" duration="PT0H42M20S">
    <AdaptationSet segmentAlignment="true">
    <SegmentTemplate timescale="1" duration="5" initialization="dash/065f63df4d9795ed/$RepresentationID$/initial.mp4" media="dash/065f63df4d9795ed/$RepresentationID$/$Number$.m4s" startNumber="0"/>
    <Representation id="video" mimeType="video/mp4" bandwidth="2000000" codecs="avc1.42c00d"/>
    </AdaptationSet>
    <AdaptationSet segmentAlignment="true">
    <SegmentTemplate timescale="1" duration="5" initialization="dash/065f63df4d9795ed/$RepresentationID$/initial.mp4" media="dash/065f63df4d9795ed/$RepresentationID$/$Number$.m4s" startNumber="0"/>
    <Representation id="audio" mimeType="audio/mp4" bandwidth="384000" codecs="mp4a.40.2">
    <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
    </Representation>
    </AdaptationSet>
    </Period>
    </MPD>

    1. This is the webpage the chromecast hits: http://www.plexapp.com/chromecast/production/index.html

    2. The webpage uses this obsfucated javascript: http://www.plexapp.com/chromecast/production/js/plex.js

    I deobsfucated using this: http://jsbeautifier.org/

    3. After looking at the javascript you can tell that Plex is doing some super complicated things like parsing the mp4 file.

    4. The MPD file is not compliant and appears to have placeholder variables in it e.g., $Representation. If you search through the javascript, you can see that it has some logic to replace them.

    At this point, I think the easiest thing to do is to figure out how to kick off a video using the Plex html web page. But that might be above my Javascript understanding.
     
  19. Jan 25, 2014 #59 of 457
    jgametest

    jgametest New Member

    117
    0
    Oct 30, 2013
    Unless you are a Plex Pass subscriber you will not be able to see the full effect of the ChromecastApp. As a paid subscriber they grant full access to their products before they decide to release to the general public.

    https://plex.tv/subscription/about
    Monthly $3.99 Yearly $29.99 Lifetime $74.99

    They just recently released an updated Plex Home Theater which replaced The Plex Media Center. Personally I'm still on the fence if in March if I will switch to Roku. We will be cable cutting on the 31st of January. But hey Brighthouse should not be too sad, I'm still paying for 20 MBPS and the Digitial Phone.
     
  20. Jan 25, 2014 #60 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    There is no paid app for chromecast. I do have Plexpass. But that won't matter from what we are trying to do. The plex JavaScript I pointed to is the key, as it's responsible for parsing the MPD file and playing the mp4 chunks.
     

Share This Page