amzn / fire-app-builder

Fire App Builder is a framework for building java media apps for Fire TV, allowing you to add your feed of media content to a configuration file and build an app to browse and play it quickly.
Other
184 stars 259 forks source link

Configure Feed with Vimeo #56

Open gtstuntzb opened 4 years ago

gtstuntzb commented 4 years ago

Hello! I am trying to configure my feed using a Vimeo xml feed and am wondering if there is any known recipe to get it to load properly from Vimeo. Mine just keeps crashing when I build it and I KNOW it has to do with my recipe.

Here's an example of my xml feed:

<item>
            <title>Harry Potter World</title>
            <pubDate>Tue, 03 Mar 2020 21:13:59 -0500</pubDate>
            <link>https://vimeo.com/395345323</link>
            <guid isPermaLink="false">https://vimeo.com/395345323</guid>
            <media:category>All</media:category>
            <media:content url="https://vimeo-prod-skyfire-std-us.storage.googleapis.com/01/4069/15/395345323/1679895187.mp4?GoogleAccessId=GOOGLW2TRT7BCCZZO5AX&amp;Expires=1583291971&amp;Signature=0SmzmlqkqKwBHYVCuijVSBfGQ1Q%3D" language="en-US" fileSize="10026208" duration="16" medium="video" isDefault="true">
                <media:title type="plain">Harry Potter World</media:title>
                <media:thumbnail url="https://i.vimeocdn.com/video/861592243_800x450.webp"></media:thumbnail>
                <media:credit role="author" scheme="urn:ebu">Roger Rabbit</media:credit>
            </media:content>
        </item>

And my recipe: { "cooker": "DynamicParser", "format": "xml", "model": "com.amazon.android.model.content.Content", "translator": "ContentTranslator", "modelType": "array", "query": "//item[./title='$$par0$$']", "queryResultType": "[]$", "matchList": [ "title/#text@mTitle", "guid/#text@mId", "description/#text@mDescription", "link/#text@mUrl", "media:content/media:thumbnail/#attributes/url@mCardImageUrl", "media:content/media:thumbnail/#attributes/url@mBackgroundImageUrl" ] }

I believe the problem is that the "link" in my xml feed (https://vimeo.com/395345323) doesn't link directly to the video, but rather to the Vimeo page the that video is on. The actual video has a very similar web address -----------> https://player.vimeo.com/video/395345323

Both have the same ending (395345323). I'm pretty new to coding - is there a way I can tell the code to begin with "https://player.vimeo.com/video/" and then call the LAST part from the xml file "395345323" ?

Thanks for your help!

StevenEsqTwo commented 4 years ago

Hi gtstuntzb: I am a total novice but I have some experience with Vimeo streaming for Roku. Having said that, the hard links to the video (as opposed to the page) generally look like this:

https://player.vimeo.com/external/292600544.hd.mp4?s=1633420d5cb7339e5906b47c3721da7a27b79f60&profile_id=175

The HLS streams look like his: https://player.vimeo.com/external/292600544.m3u8?s=46385d2fb33a0792fef2d93eb7b369e8b5cf77b5

You can find the hard links by navigating to the "settings" page for each video and select Distribution ----> Video File Links. That will reveal a number of options for hard linking the video for external playback.

Hope that helps!

gtstuntzb commented 4 years ago

Thanks for the help!

I'm using the media feed to upload entire showcases at a time. Your response helped me realize that I could try using a json feed instead of the xml, since the video link is more similar to the ones you shared. When I get around to trying it I will share the results.

gtstuntzb commented 4 years ago

I am finding that the main issue with using the JSON feed from Vimeo (the one generated under Showcases --> #ShowcaseName --> TV apps --> Roku) is that it does not contain all of the necessary information including thumbnails, descriptions, showcase name/categories, etc.

With that said, has anyone had success importing the XML feed generated on Vimeo at Showcases --> #ShowcaseName --> TV apps --> amazon fire TV ?

Thanks!