Playing local video files in a feature/media work

7 views
Skip to first unread message

Travis Huinker

unread,
Jul 10, 2017, 3:32:51 PM7/10/17
to Reason Discussion
Has anyone looked into playing a local video file within a feature, or rather the media work module? Right now the media work module provides two options of either a YouTube or Vimeo file. Curious as if anyone has added functionality to simply display a custom option, as in a local video file on the server. I'm looking into utilizing the media work functionality with the feature module to display an automatic-starting and looping video in the feature's background for our homepage.

Thanks.

Matt Ryan

unread,
Jul 11, 2017, 11:52:46 AM7/11/17
to reason-discussion
You could try enabling the Zencoder media integration. That ships uploaded media off to the Zencoder cloud transcoding service and then either delivers the transcoded media to an Amazon s3 bucket (what we do) or fetches them back to the Reason server (not what we do, but there is some code that looks like it's supposed to do that at reason_4.0/lib/core/classes/media/media_file_storage/reason_file_storage.php). The local storage option has not been actively used recently by anyone that I know of, so I would not guarantee that it will simply work -- but trying it is fairly simple in that it entails just some settings changes and signing up for a test Zencoder account.

settings/media_integration/media_settings.php:
Add 'zencoder' to $GLOBALS['NEW_MEDIA_WORK_INTEGRATION_LIBRARIES'] and $GLOBALS['UPLOADABLE_MEDIA_WORK_INTEGRATION_LIBRARIES']. 

settings/media_integration/zencoder_settings.php:
Set ZENCODER_FILE_STORAGE_OPTION to 'reason'.
Set ZENCODER_FULL_ACCESS_KEY to the API key you get from Zencoder.

Matt

On Mon, Jul 10, 2017 at 2:32 PM, Travis Huinker <huin...@luther.edu> wrote:
Has anyone looked into playing a local video file within a feature, or rather the media work module? Right now the media work module provides two options of either a YouTube or Vimeo file. Curious as if anyone has added functionality to simply display a custom option, as in a local video file on the server. I'm looking into utilizing the media work functionality with the feature module to display an automatic-starting and looping video in the feature's background for our homepage.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/reason-discussion.
For more options, visit https://groups.google.com/d/optout.

Travis Huinker

unread,
Jul 11, 2017, 3:59:09 PM7/11/17
to Reason Discussion
Thanks for the response.

I was able to get the Zencoder option displaying in Reason and uploaded a sample video file. One question I had was if I do set the "ZENCODER_FILE_STORAGE_OPTION" to "reason" and not "s3", do I need to still set up a Zencoder account and key?


On Tuesday, July 11, 2017 at 10:52:46 AM UTC-5, Matt Ryan wrote:
You could try enabling the Zencoder media integration. That ships uploaded media off to the Zencoder cloud transcoding service and then either delivers the transcoded media to an Amazon s3 bucket (what we do) or fetches them back to the Reason server (not what we do, but there is some code that looks like it's supposed to do that at reason_4.0/lib/core/classes/media/media_file_storage/reason_file_storage.php). The local storage option has not been actively used recently by anyone that I know of, so I would not guarantee that it will simply work -- but trying it is fairly simple in that it entails just some settings changes and signing up for a test Zencoder account.

settings/media_integration/media_settings.php:
Add 'zencoder' to $GLOBALS['NEW_MEDIA_WORK_INTEGRATION_LIBRARIES'] and $GLOBALS['UPLOADABLE_MEDIA_WORK_INTEGRATION_LIBRARIES']. 

settings/media_integration/zencoder_settings.php:
Set ZENCODER_FILE_STORAGE_OPTION to 'reason'.
Set ZENCODER_FULL_ACCESS_KEY to the API key you get from Zencoder.

Matt
On Mon, Jul 10, 2017 at 2:32 PM, Travis Huinker <huin...@luther.edu> wrote:
Has anyone looked into playing a local video file within a feature, or rather the media work module? Right now the media work module provides two options of either a YouTube or Vimeo file. Curious as if anyone has added functionality to simply display a custom option, as in a local video file on the server. I'm looking into utilizing the media work functionality with the feature module to display an automatic-starting and looping video in the feature's background for our homepage.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reason-discuss...@googlegroups.com.
To post to this group, send email to reason-d...@googlegroups.com.

Matt Ryan

unread,
Jul 11, 2017, 4:06:55 PM7/11/17
to reason-discussion
Yes. There are two separate services at play here.

-- Transcoding: Handled by Zencoder, to ensure that the needed formats for html5 playback are present and appropriate compression levels are applied. Reason doesn't have an on-the-server solution for this part, so you will need Zencoder API keys. Note that for testing purposes Zencoder has a free testing plan where you just get the first few seconds of each file. Once you have things working you can switch over to the paid version (the lowest tier you only pay by usage for if you are only doing a handful of videos this way it should be minimal cost).

-- Storage: This can either be AWS/S3 or locally on the Reason server. If you do it locally you shouldn't need any Amazon API keys.

Matt

To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.

Travis Huinker

unread,
Jul 11, 2017, 4:20:45 PM7/11/17
to Reason Discussion
Ok, that makes sense! Thanks.

I'm not having luck with either the "reason" or "s3" options in uploading a video. It keeps resulting in "there was an error in the upload process". I'm seeing this Reason error at the top of the screen:

Warning: upload_max_filesize in php.ini is less than Reason setting MEDIA_MAX_UPLOAD_FILESIZE_MEGS; using upload_max_filesize as max upload value at …/var/reason_package/reason_4.0/lib/core/classes/media/zencoder/media_work_content_manager_modifier.php:558

Matt Ryan

unread,
Jul 11, 2017, 4:26:41 PM7/11/17
to reason-discussion
You need to set at least those two settings (the upload size limitation in php.ini and MEDIA_MAX_UPLOAD_FILESIZE_MEGS in reason_settings.php) to adequately large levels, with MEDIA_MAX_UPLOAD_FILESIZE_MEGS the smaller of the two.

There are a few other php.ini settings that may need to be enlarged as well, like post_max_size, which should be as big or bigger than upload_max_filesize.

See this thread:

Matt

To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages