sagiadinos / garlic-player

Digital Signage Player based on SMIL
https://garlic-player.com
GNU Affero General Public License v3.0
88 stars 17 forks source link

Error when playing videos: has an unknown content-type or file type: binary/octet-stream extension: mp4 #27

Closed jf133 closed 2 years ago

jf133 commented 2 years ago

Hi -- I'm seeing these errors when trying to play videos from AWS S3, why would that be? (s3 address below has been redacted):

has an unknown content-type or file type: binary/octet-stream extension: mp4

Example of an error:

`

error2021-12-23T08:59:17-05:00ContentManagerFETCH_FAILED

`

Using this smil with prefetch from examples (URLs redacted). (btw, also wondering if there's a way to put an image or text on the screen if there was an error like above)

<?xml version="1.0" encoding="UTF-8"?>
<smil>
    <head>
        <meta http-equiv="Refresh" content="30"/>
        <layout>
            <root-layout width="3840" height="2160"/>
            <region xml:id="fullScreen" width="3840px" height="2160px" left="0px" top="0px" z-index="0" backgroundColor="#000" />
        </layout>
    </head>
    <body systemComponent="http://www.w3.org/1999/xhtml">
        <par>
            <seq end="__prefetchEnd.endEvent">
              <seq repeatCount="indefinite">
                <!-- Play waiting prompt or media files that are already in the cache -->
                <img src="https://xxxx.s3.amazonaws.com/xxxx/splash.jpg" />
              </seq>
            </seq>

            <seq>
              <!-- Load files while first loop plays -->
              <prefetch src="https://xxxx.s3.amazonaws.com/xxxx/sample_1920x1080.mp4" type="video/mp4" />

              <!-- Special item that sends out the __prefetchEnd.endEvent event when it ends -->
              <seq id="__prefetchEnd" dur="1s"/>
            </seq>

            <seq begin="__prefetchEnd.endEvent" repeatCount="indefinite">
              <!-- Play loaded files -->
              <video src="https://xxxx.s3.amazonaws.com/xxxx/sample_1920x1080.mp4" type="video/mp4" />
            </seq>
      </par>
    </body>
</smil>
jf133 commented 2 years ago

Found the problem:

When uploading to AWS S3 without specifying the content type, S3 will make a guess however, on the way out i see from the logs "binary/octet-stream" -- If I explicityly pass the content_type when uploading the object it will work.