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 17, 2014 #21 of 457
    jgametest

    jgametest New Member

    117
    0
    Oct 30, 2013
    Air PlayIt Server is created for Mac and Windows users as a way of Transcoding for live playback or to pull a copy to the app found within the AppStore or GooglePlay. There is even an option to make the server available as WEB interface within the application which then is tied to it's own Custom or default port with IP address. If the technology it uses could be broken down maybe it could be used. I did notice last time I used it the installation included FFMPEG similar to what is used with Streambaby.

    Details about Airplayit

    http://airplayit.com/
     
  2. Jan 17, 2014 #22 of 457
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Transcoding is to M3U8/M3U (i.e. HLS) format which is not (currently) supported by TiVo Opera browser.
     
  3. Jan 17, 2014 #23 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
  4. Jan 17, 2014 #24 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
    The problem is that the MOOV atom contains byte offsets to individual chunks of data in the file. There is no way to know the exact position of these chunks ahead of time because you have no way of knowing how big each individual frame will be. Even if you used a CBR encoding method the size of each individual frame would still vary making it impossible to guess.
     
  5. Jan 17, 2014 #25 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
    Hmmm... I forgot about fragmented MP4 files. They're only supported by some players though. Although it's easy to created a fragmented MP4 in ffmpeg, so it should be easy enough to test if they work in the TiVo browser. Just add...
    Code:
    -movflags frag_keyframe
    to the ffmpeg commandline when outputting the MP4 file.

    Edit: You might also need to set the H.264 encoder options to output IDR frames at specific intervals for that to work properly. (I'd recommend every 2 seconds)


    Edit: This page has a more robust explanation about how to create a fragmented MP4 file in FFmpeg...

    http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg
     
  6. Jan 17, 2014 #26 of 457
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Tried a sample ffmpeg encode with:
    -movflags frag_keyframe

    Both VLC and TiVo Opera browser only play the 1st fragment (I used -g 52 for keyframe). mediainfo sees total length of video as 1st fragment only.

    Next tried the following:
    -movflags frag_keyframe+empty_moov

    Neither VLC or TiVo Opera browser could play it at all.
     
  7. Jan 17, 2014 #27 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
    Try the ismv format instead. It's basically a fragmented MP4 but with an extra index file, kind of like HLS.

    This is apparently what Microsoft Smooth Streaming is, and that's listed as supported in Opera Media Streaming docs.
     
  8. Jan 17, 2014 #28 of 457
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Tried with the following:
    -movflags frag_keyframe -f ismv

    VLC can play it, TiVo Opera errors out as unsupported.
     
  9. Jan 17, 2014 #29 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
    Did you try...

    frag_keyframe+empty_moov

    ?
     
  10. Jan 18, 2014 #30 of 457
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    -movflags frag_keyframe+empty_moov -f ismv

    VLC plays, TiVo Opera unsupported.
     
  11. Jan 18, 2014 #31 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
  12. Jan 18, 2014 #32 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    So, netflix communicates via HTTPS. I tried to decrypt using man-in-the middle techniques, but it appears the app has smart enough certificate handling where that won't work.

    I also verified that TechCrunch and MovieFone seem to be using just normal .mp4 files.

    It looks like we could be SOL here until Tivo gives us some more information regarding their SDK.

    Edit: I was able to get the video file decoded. Here is an ASCII readout of the header from the netflix video file:

    ... ftypmp42....isomiso2dashiso6...luuidNetflixPiffStrm!.........`It...........
    [................].............C.......]....^..%.......40k.i....free...................Luuid....~C.A..!!..d2.........km.Netflix Media Library Version 1.0.1755.....mmoov...xmvhd.........kna.....kna............................................................@...................................trak...htkhd.........kna.....kna................................................................@..............Amdia...,mdhd.........kna.....kna............U......4hdlr........soun............Audio Media Handler.....minf....smhd...........$dinf....dref............url ........stbl....stts............ctts...........Astsd...........1ec-3...............................
    dec3p........stsc............stsz................stco...........<mvex....mehd.......
    [...... trex............................sidx.........................
     
  13. Jan 20, 2014 #33 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
    Those are MP4 atoms. So apparently Netflix uses MP4. But since it's adaptive bitrate it must use a fragmented MP4 system like SmoothStream or MPEG-Dash. IIRC the website uses Silverlight for streaming right? SIlverlight uses SmoothStream, so that's probably what it is. But the Netflix app on TiVo doesn't use Opera, so that's probably some custom implementation.

    What bout YouTube? Does it do adaptive streaming on the TiVo? If your network starts to slow does it automatically drop to a lower resolution? Or does it stall and stutter? If it does adaptive streaming then there must be some way to do it via Opera and there is hope for us. If not then static MP4s are the only option and we're basically SOL.

    Dan
     
  14. Jan 20, 2014 #34 of 457
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    If you have an actual decrypted Netflix video file (how did you get that?) then please run mediainfo on it and post the output here. I assumed lately they were using mpeg2 TS container for TiVos with H.264 video & AC3 audio. As Dan203 posted the above implies mp4 container. The original Netflix on TiVo implementation years ago I think was using asf container with VC-1 video & 2-channel WMA9 audio.
     
  15. Jan 21, 2014 #35 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Well I just have a streaming version of it. I was able to trick the netflix client into using http instead of https using some arp spoofing and an SSL interception program that returns HTTP links when HTTPS is requested. Then I just ran tcpdump.

    I assume its unencrypted because of the header, but I'm sure it has all kinds of additional DRM.

    Would media info work on a partial file?
     
  16. Jan 21, 2014 #36 of 457
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    I think it should. Worth a try anyway.
     
  17. Jan 21, 2014 #37 of 457
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,461
    170
    Apr 17, 2000
    Nevada
    Based on your dump the MOOV atom is at the start of the file so it should work. It should work even if the data is encrypted as most of the info about the file is stored at the container level and that does not appear to be encrypted.
     
  18. Jan 21, 2014 #38 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Hmm. Stupidly I got rid of my capture file. And for whatever reason, I can't get it to work again. Netflix keeps timing out. One thing I did notice is that it seems to be video by video. When I had it working, I tried a different video and it looked like it was returning a "ismv" file, which as I understand it is smooth streaming. I'll keep at it. Hopefully, I can get this to work.
     
  19. Jan 21, 2014 #39 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Ok here is a capture of the ismv file, still working on trying to get mp4.

    [​IMG]


    Edit. I'm don't think there ever was an MP4, I think I must have just picked up in the middle of the ismv file.
     
  20. Jan 21, 2014 #40 of 457
    ntlord

    ntlord New Member

    183
    0
    Nov 30, 2013
    Here are the rest of the details:

    General
    Count : 284
    Count of stream of this kind : 1
    Kind of stream : General
    Kind of stream : General
    Stream identifier : 0
    Inform : MPEG-4 (Base Media): 225 MiB, 2h 10mn
    Count of video streams : 1
    Video_Format_List : AVC
    Video_Format_WithHint_List : AVC
    Codecs Video : AVC
    Complete name : /Users/[*removed]/Desktop/138716156.ismv
    Folder name : /Users/[*removed*]/Desktop
    File name : 138716156
    File extension : ismv
    Format : MPEG-4
    Format : MPEG-4
    Format/Extensions usually used : mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v
    Commercial name : MPEG-4
    Format profile : Base Media
    Internet media type : video/mp4
    Codec ID : iso2
    Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html
    Codec : MPEG-4
    Codec : MPEG-4
    Codec/Extensions usually used : mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v
    File size : 236043450
    File size : 225 MiB
    File size : 225 MiB
    File size : 225 MiB
    File size : 225 MiB
    File size : 225.1 MiB
    Duration : 7824483
    Duration : 2h 10mn
    Duration : 2h 10mn 24s 483ms
    Duration : 2h 10mn
    Duration : 02:10:24.483
    Overall bit rate mode : VBR
    Overall bit rate mode : Variable
    Overall bit rate : 241338
    Overall bit rate : 241 Kbps
    Stream size : 7760723
    Stream size : 7.40 MiB (3%)
    Stream size : 7 MiB
    Stream size : 7.4 MiB
    Stream size : 7.40 MiB
    Stream size : 7.401 MiB
    Stream size : 7.40 MiB (3%)
    Proportion of this stream : 0.03288
    HeaderSize : 172206
    DataSize : 2184
    FooterSize : 235869060
    IsStreamable : Yes
    Encoded date : UTC 2013-09-14 01:53:10
    Tagged date : UTC 2013-09-14 01:53:10
    File last modification date : UTC 2014-01-22 00:21:03
    File last modification date (local) : 2014-01-21 19:21:03

    Video
    Count : 272
    Count of stream of this kind : 1
    Kind of stream : Video
    Kind of stream : Video
    Stream identifier : 0
    StreamOrder : 0
    Inform : 233 Kbps, 320*240 (16:9), at 23.976 fps, AVC (Main@L3.0) (CABAC / 3 Ref Frames)
    ID : 2
    ID : 2
    Format : AVC
    Format/Info : Advanced Video Codec
    Format/Url : http://developers.videolan.org/x264.html
    Commercial name : AVC
    Format profile : Main@L3.0
    Format settings : CABAC / 3 Ref Frames
    Format settings, CABAC : Yes
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3
    Format settings, ReFrames : 3 frames
    Internet media type : video/H264
    Codec ID : encv / avc1 / avc1
    Codec ID/Info : Advanced Video Coding
    Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html
    Codec : AVC
    Codec : AVC
    Codec/Family : AVC
    Codec/Info : Advanced Video Codec
    Codec/Url : http://developers.videolan.org/x264.html
    Codec/CC : encv
    Codec profile : Main@L3.0
    Codec settings : CABAC / 3 Ref Frames
    Codec settings, CABAC : Yes
    Codec_Settings_RefFrames : 3
    Duration : 7824483
    Duration : 2h 10mn
    Duration : 2h 10mn 24s 483ms
    Duration : 2h 10mn
    Duration : 02:10:24.483
    Bit rate mode : VBR
    Bit rate mode : Variable
    Bit rate : 233403
    Bit rate : 233 Kbps
    Maximum bit rate : 352000
    Maximum bit rate : 352 Kbps
    Width : 320
    Width : 320 pixels
    Height : 240
    Height : 240 pixels
    Pixel aspect ratio : 1.333
    Display aspect ratio : 1.778
    Display aspect ratio : 16:9
    Rotation : 0.000
    Frame rate mode : CFR
    Frame rate mode : Constant
    Frame rate : 23.976
    Frame rate : 23.976 fps
    Frame count : 187600
    Resolution : 8
    Resolution : 8 bits
    Colorimetry : 4:2:0
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8
    Bit depth : 8 bits
    Scan type : Progressive
    Scan type : Progressive
    Interlacement : PPF
    Interlacement : Progressive
    Bits/(Pixel*Frame) : 0.127
    Stream size : 228282727
    Stream size : 218 MiB (97%)
    Stream size : 218 MiB
    Stream size : 218 MiB
    Stream size : 218 MiB
    Stream size : 217.7 MiB
    Stream size : 218 MiB (97%)
    Proportion of this stream : 0.96712
    Encoded date : UTC 2013-09-14 01:53:10
    Tagged date : UTC 2013-09-14 01:53:10
    Encryption : Encrypted
    Buffer size : 470000
     

Share This Page