nasflix for Roamio and mini

Discussion in 'Developers Corner' started by nasflix, Apr 9, 2015.

  1. Apr 9, 2015 #1 of 50
    nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015

    Advertisements

    For those interested in trying out a new app:

    nasflix is a Opera TV Store application designed specifically for the TiVo Roamio & TiVo Mini to allow streaming of movies and videos from a network-attached storage (NAS) device.

    The server for this app must be installed on a Windows computer accessible on your local network and configured to point to your backup folder(s). The server is a Java application with an embedded Jetty server that uses ffmpeg to stream Blu Ray and DVD main movie backups. The .bat file to start the server will log the address to enter for the opera tv store app.

    Here is some more background on the app for those interested in trying it out:

    1. The opera app store does not allow AJAX calls, images, JS, or CSS to load from an IP address on the local network. The Web Socket protocol and HTML video tag do not have the same restriction. This allows the application to load data over Web Sockets and stream video using the video tag over a local network.

    2. The video is streamed using fragmented mp4. This allows most recent Blu Rays encoded in h264 to be streamed without transcoding the video. Audio is always transcoded in 5.1 at the most.

    3. When video is not transcoded, ffmpeg does not correctly skip to specific spots in the video for some backups. This is really annoying when trying to resume a movie or skip ahead. I'm not sure there is much I can do about this at the moment. If you care less about video quality and more about functionality, you can set the configuration as noted on the web site to always transcode video.

    4. Streaming assumes the backup is the main movie only with main audio only. If subtitles are on the backup, transcoding will be used to display the subtitles correctly. If you want to disable subtitles to get the best video quality, you can set com.nasflix.transcode.subtitles=false in the server config file.

    5. The Opera app store relies on settings that TiVo applies to define how memory is handled. When the app was originally created about this time last year, TiVo Roamio and mini would crash about an hour into HD video playback. This was resolved in updates over the summer, but 20.4.6 broke it. I contacted TiVo Support but they do not have an ETA for a fix. I'm not sure what has changed, but 20.4.7 does not resolve the issue. This only happens for Blu Ray streaming and at about an hour into the movie. I assume there is some type of memory leak or something going on.

    6. The app should be showing up for TiVo Roamio and TiVo mini v2 devices as of April 1st. I'm still working with Opera and TiVo to find out why it is not showing up for TiVo mini v1.

    7. It took over 3 months just to get Opera and TiVo to approve the app and have it kind of show up in the app store. Depending how the TiVo Plex app turns out, I may or may not continue to maintain this due to how painful the process is and how buggy the app store can be.

    8. The FF/RWD and CH UP/DOWN can be used to skip around the movie. The pause button will stop the movie and persist the option to resume.

    9. The server uses a folder.jpg and movie.info file under each backup folder to display the cover image and get details for the movie. There are better ways to get this data, but that is the way I coded it for now due to my use of xbmc over the past several years.

    10. More information is available at nasflix.com.

    If you try the app out and have questions, I will try to answer them here.
     
  2. Apr 9, 2015 #2 of 50
    davidblackledge

    davidblackledge Registered l√úser

    563
    36
    Sep 9, 2008
    NM
    I can't tell you how much I appreciate you sharing this with us! I'm eager to hear how it works out for people.
    This sounds suspiciously like the debunked 1.1GB streaming limit in HME. Somebody else can elucidate, but I believe the issue there was with the streaming source not providing the necessary keep-alive data or timeouts or something. Perhaps that's the same issue here.
    I'm totally impressed that you even got TiVo to talk to you, and even more so that they actually approved an app! Kudos to you!
     
  3. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    51,822
    6,341
    Apr 17, 2000
    Nevada
    This sounds pretty cool. Does it support menus? Or does it just play the main movie? What does it do with say TV show DVDs that have multiple titles all about the same length?
     
  4. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    Menus are not supported. It is assumed that the backup is the main movie only, but ffmpeg will play the playlist with the longest amount of time for a Blu Ray if I remember correctly. If you have a backup of TV shows and the playlist is configured to play them all one after another I would think it will play. For DVDs, whatever is in the VIDEO_TS folder for the backup is played. The video files are just concatenated together and streamed out.
     
  5. rjtrudel

    rjtrudel New Member

    13
    0
    Sep 23, 2008

    Advertisements

    Is it possible to work from a Mac?
     
  6. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    It is possible to run on a Mac, but the zip file I have out there right now only includes the windows version of ffmpeg.

    Also, there appears to be some confusion around my statements on what devices the app is currently showing up on.

    Just to be clear, the app itself has always worked on the Roamio and minis with the exception of the app store crashing for Blu Rays with the bug that 20.4.6 introduced.

    Here is the break down that I am seeing for the app actually showing up:

    Premiere - Have no idea, I don't own one and don't know anyone that does so the app may or may not show up in the app store. If someone that has one wants to chime in, please do. I just can't promise the video will stream correctly since I have never tested the app on this device.

    Roamio - The app should show up regardless of being on 20.4.6 or 20.4.7. My Roamio is running 20.4.7 and I had a friend test with theirs running 20.4.6. The app shows up for both.

    Mini v1 - I've tested all my mini v1s. One running on 20.4.7 and the others running on 20.4.6. The app does not show up on any of my v1 minis.

    Mini v2 - I have two of these and the app shows up on both of them. They are both still running 20.4.6.

    As a side note, one of my v2 minis actually has a totally new design for the app store itself. I'm not sure what is triggering the new design to kick in since both v2 minis were bought from the same place and both are on 20.4.6.
     
  7. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    51,822
    6,341
    Apr 17, 2000
    Nevada
    How does it deal with subtitles? Are forced subtitles encoded into the video? A lot of movies use forced subtitles as a way to show subs when someone is speaking a foreign language. Without them the movie can become unwatchable.
     
  8. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    51,822
    6,341
    Apr 17, 2000
    Nevada
    Also don't TiVos have a maximum bitrate of about 25Mbps they can play? I seem to remember this coming up in the Plex thread. Or maybe the StremBaby one. If that's the case some BDs might exceed that if you don't recode.
     
  9. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    Forced subs are encoded into the video stream since ffmpeg does not have any OCR support. The way the server is coded at the moment, it only expects subs to be on the backup when the forced subs are needed. For example, The Godfather II.

    ffmpeg does not have a bitstream filter that I know of for subs, so the video must be transcoded when subs are present.

    TiVo documents a maximum bitrate, but I have not had any problems playing blu ray backups at their max with no transcoding. Almost all new Blu Rays are h264 encoded now, so the server basically just does a video copy and transcodes the audio. VC1 encoded Blu Rays are transcoded to h264, but the transcoding is more restricted by the computer the server is running on than the TiVo being able to play it.
     
  10. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    I'll have to try and see what my highest Mbps blu ray is. Kill Bill Vol. 1 is 30.06 Mbps and plays fine.
     
  11. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    I'm a bit late to the party. But cool app.
     
  12. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    51,822
    6,341
    Apr 17, 2000
    Nevada
    I'm not really up on BD. Do they not use forced subs too? If so then how do you know ahead of time so you can decide if a recode is needed or not?

    Also how does the TiVo handle 24fps BD video? Does it kick over into passthrough mode? Or does it change to the interface resolution?
     
  13. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    Every movie is different. Some use forced subs while others have the subs in the video stream. Blu Ray uses PGS subs. This is a graphic based sub format that needs to be overlayed the video when transcoded. ffmpeg will do this if you pass the correct parameters. ffmpeg also has a forced sub flag.

    When backing up a movie, you really need to test the movie to find out if the movie has forced subs or not, then rip the subs if needed.

    As for the video playback, Blu Ray backups stream at 1920 x 1080 / 24p when passthrough is enabled. Audio is transcoded to a max of 5.1 aac due to ffmpeg not being able to handle anything beyond 5.1.
     
  14. moyekj

    moyekj Well-Known Member

    12,176
    827
    Jan 23, 2006
    Mission...
    I'd like to give it a whirl, thanks for submitting this!
    So the actual video file structure has to be in DVD or BD format? Is there a way to get straight mp4, mkv, mpeg2 files to be recognized?

    EDIT:
    As a test I used VideoRedo to create a VIDEO_TS structure of a short 5 minute mpeg2 clilp. However I just get a dark screen and no sound when attempting to play via nasflix and clicking pause immediately brings me back to the title page. Is there a way to set debug mode for collecting more detailed logs of what is happening?
    (This is using Roamio Pro w/ 20.4.7 and running nasflix server on a Windows 8.1 machine using a local drive path to DVD title and using Java jre1.8.0_40).

    Will try a full length DVD movie next to see if I make any progress.

    No luck on full length movie either. Pressing return in dark screen I see timeline at bottom but nothing ever plays.
     
    Last edited: Apr 11, 2015
  15. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    Thanks for taking the time to try this out. Here is a small sample DVD clip you can test to verify you get audio and video.

    EDIT: removed link

    Can you try this and let me know your results please?
     
    Last edited: Apr 11, 2015
  16. moyekj

    moyekj Well-Known Member

    12,176
    827
    Jan 23, 2006
    Mission...
    Yes, that works.

    I've uploaded a sample of 1 that is not working for me:
    https://drive.google.com/file/d/0B0SMFC97ymdENHV5LVp6al9tM00/view?usp=sharing

    I suspect it's perhaps because there is a DVD menu being used. I'll have to see if I can get VRD to produce one without a menu.
    (Note that VideoLAN VLC plays my samples and yours all without a problem).

    So currently there is no way to play straight video files without DVD or BD structure?
     
  17. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    I assume you are correct that the video does not play due to the menu.

    You can set the following property in the config file:

    com.nasflix.transcode.extensions=mp4,mkv,avi

    If the title folder is not a Blu Ray or DVD structure, any files found in the title folder with the specified extensions are streamed out. I have not fully tested all formats so I can't say for sure that ffmpeg will be able to transcode to h264 correctly for tivo to play.
     
  18. moyekj

    moyekj Well-Known Member

    12,176
    827
    Jan 23, 2006
    Mission...
    Tested using straight files with the above and it works, thanks. Is there any way to override the transcoding options being used? For the titles I tried transcodes used ffmpeg with "super_fast" preset and crf=20 and quality was pretty marginal. With server I'm using there's plenty of horsepower so could use a lower crf to improve quality if possible.
     
  19. moyekj

    moyekj Well-Known Member

    12,176
    827
    Jan 23, 2006
    Mission...
    Another note. Documentation refers to the information file as movie.info, but it looks like only movie.nfo works. Until I downloaded your sample and noticed .nfo instead of .info I wasn't seeing any metadata displayed for my titles.
     
  20. nasflix

    nasflix New Member

    22
    0
    Apr 3, 2015
    movie.nfo is correct. I'll update the page as soon as I can.

    Here are some additional settings you can play with.

    #
    # If the video should be copied instead
    # of transcoded when possible
    #
    com.nasflix.transcode.copy=true

    #
    # The ffmpeg transcode CRF
    #
    com.nasflix.transcode.rate=18

    #
    # The ffmpeg transcode present
    #
    com.nasflix.transcode.preset=superfast

    #
    # Enable subtitles to be recognized and transcoded
    # into the video if present
    #
    com.nasflix.transcode.subtitles=true

    #
    # File extensions that should be treated as video
    # if the DVD or Blu Ray structure is not found
    #
    com.nasflix.transcode.extensions=mp4,mkv,avi
     

Share This Page

spam firewall

Advertisements