We're using cookies to make this site more secure, featureful and efficient.

Videos on my.strathspey

Preliminaries

ACE content on my.strathspey can embed YouTube videos, but if you’d rather not post your videos to YouTube, you can host them on the my.strathspey system directly. Please do not upload them to your page, because this means downloads would need to go through the content management system – which would work, but would tie up system resources and make the system slower for other users. Instead, upload them to the “media server”, where they will be made available for straight HTTP without the content management system’s overhead.

For the time being, the only way of accessing the media server is via specially-arranged FTP. If you want to upload videos, Anselm will be more than pleased to add a _media directory to your FTP area that will point to the media server, such that stuff you put into that directory will not be available through the content management system but from the media server instead. Generally, if your sub-site on my.strathspey is called foobar then a file called XYZ.mp4 you put into your _media directory will be available from http://media.strathspey.org/media/foobar/XYZ.mp4. If your user name is johndoe then the media URL for the same file under the auspices of your personal site will be http://media.strathspey.org/media/u/johndoe/XYZ.mp4 This works not just for video but also for other large data files such as MP3 tracks. – We don’t expect everyone to do this, which is why at the moment we don’t create this link from the CMS to the media server for everybody. This policy might change in the future.

Video encoding

For best results with the widest selection of browsers, videos hosted on my.strathspey should be available in two formats, WEBM (VP8 video with Ogg Vorbis audio) and MP4 (H.264/MPEG-4 AVC video with AAC audio). You may get away with offering just one of these, but if you do, it should probably be MP4.

The general idea is the following:

  • Small is generally better, both from a width/height POV but also from a file size POV. People on wireless or mobile connections will thank you for it. For 16:9 video, 640×360 is a good size and often looks reasonable when viewed at full screen size, too (it is similar to SD television).

  • Use a constant frame rate and de-interlace your video. Good bit rates are 400 to 1000 kbits/s for video and 40 to 80 kbits/s for audio.

  • Make sure your video uses square pixels. If you’re using a DV (tape) video camera to take 16:9 video, the actual pictures will still be 720×576 pixels on the tape/in the video file, i.e., squashed up so everyone will look very tall and skinny. These videos get unsquashed when they’re being watched but not on my.strathspey.

You can use ffmpeg to create these formats from approximately whatever you have on hand. We use Flowplayer to display these videos and there is further information on the Flowplayer web site.

Embedding videos in ACE content

Once you have uploaded a video (e.g., XYZ.mp4 and/or XYZ.webm) to your media directory, you can embed it in an ACE document using a tag like

<<video:media/foobar/XYZ>>

This will display the video inside FlowPlayer, scaled to 640×360 pixels. If you would prefer your video to appear at a different size, append this to the magic link:

<<video:media/foobar/XYZ|1280,720>>

(FlowPlayer will scale your video as required.)

If you want your video to appear floating to the left or right of a paragraph with text flowing around it, use

<<video:media/foobar/XYZ||left>>

(or right). You can of course also specify the size as above.

Feel free to embed multiple videos in the same page.

Splash picture

When the page embedding the video is loaded, the FlowPlayer instance will by default show a blank screen. If that bothers you (it would probably bother me), you can get it to display a preview picture from the video instead. You can produce one very easily using ffmpeg with a command like

ffmpeg -i XYZ.mp4 -f image2 -ss 0 -vframes 1 XYZ.jpg

Upload the XYZ.jpg file to where you uploaded the XYZ.mp4 file and the video player should pick this up.

Hope this helps! Contact Anselm if you have further questions.

Recently seen

Sign in to see recent visitors!