3 Getting Started - Reference Documentation
Authors: Ryan Vanderwerf, Peter N. Steinmetz
Version: 0.3
3 Getting Started
This section will guide you through creating a basic application to store and stream videos. It assumes that the Prerequesites are installed on the server where the Grails application is running.Installing the plugin.
For Grails 2.x add the following toBuildConfig.groovy
:grails.project.dependency.resolution = {
plugins {
compile ">>
}
}
install-plugin gvps
.Configuration.
The plugin is configured using a block in theConfig.groovy
file. Insert the following:video { location = "/tmp/" // location for storage of videos, can be on a shared drive yamdi { path = "/usr/bin/yamdi" // FLV metadata injector (IF TYPE= FLV) } ffmpeg { fileExtension = "flv" // use flv or mp4 conversionArgs = "-b 600k -r 24 -ar 22050 -ab 96k" path = "/usr/bin/ffmpeg" makethumb = "-an -ss 00:00:03 -an -r 2 -vframes 1 -y -f mjpeg" } ffprobe { path = "/usr/bin/ffprobe" // finds length of movie params = "" } flowplayer { version = "3.1.2" // use empty string for no version on file } swfobject { version = "" // used for jw-flv player, empty to not specify version } qtfaststart { path = "/usr/sbin/qt-faststart" // if ffmpeg.fileExtension == mp4 used to rearrange metadata } }
Run the application.
At this point, you should have a basic running application which will allow creation, conversion, and viewing of videos. First run the application withgrails run-app
, then access the MovieController to create a video. This should then appear in the Movie List
and be viewable.