Media Functions

From TNG_Wiki
Jump to: navigation, search


Videos (flv) Install & Setup

There are two methods to setup flv videos to work in TNG V9

flv videos are videos encoded specially for web use to be small in size and possible to stream , it is the format used by youtube and vimeo. You will need to encode your videos using separate tools to make them appropriate for use with TNG. There are output functions in most video editing programs and there are also some free encoding programs available for example Riva Flv Encoder


The difference between the two methods is that the Videos hosted externally means that the videos are available to more people that you maybe want them to be and when the link is clicked the user is sent to an external website over which you have little control how it looks. External links are useful if you want to link to somebody else's video, But remember to ask permission first. With Native Hosting , you have full control over who sees the video and the user stays on your website and you have full control over how it looks.


Hosted on other website

1. Video files hosted (stored) on a third party website like youtube or vimeo

To setup a video which is externally hosted you will need to upload the video to the external website like youTube or Vimeo and copy the URL (web address) for the video to tell TNG where it is, or get the URL for video you want to link to. The URL is the text in the webaddress box at the top of most browsers.
TNG External Video Setup Screen


Note It is recommended to supply your own thumbnail for videos as the system will normally take the first frame of the video , which may not be what you want
To create a thumbnail either use the video editing program you used to create the flv video to export the frame you want as a jpg file or you can use the snapshot function of vlc media player to generate an image file from any frame in your video.


Hosted on your own website

2. Video files hosted (stored) on your own website

To get native video functionality (videos hosted by your own website) working you will first need to get a copy of the javascript application flowplayer from Flow Player download site as it is not distributed with TNG as it is a separately licenced product. There is however an open source ( free version ) which you can use.
Step 1
Download the free version from the above website
This will get you a file like flowplayer-3.2.9.zip which will contain all the files you will need.
Step 2
Unzip and FTP Upload all the files downloaded into a new directory flvsupport under the main tng directory
It should look something like this
flvsupport directory
Step 3
Synchronize TNG code to files uploaded
For the current version of TNG (V9.0.2) you need to match the code in the file showmedialib.php with the files you have uploaded
in later versions it may be changed so that you don't have to modify the file showmedialib.php
In TNG Version 9.0.2
change the code at lines 442 and 452 to match files you uploaded in Step 2
See code segment below
Your Image Caption
In later versions
to avoid having to change the distribution files the version numbers will be removed from the code so
remove the version numbers from the .swf and .js files in the directory flvsupport
Step 4
Upload your flv video and link to Individual(s)
TNG Native Video Setup Screen


Note It is recommended to supply your own thumbnail for videos as the system will normally take the first frame of the video , which may not be what you want
To create a thumbnail either use the video editing program you used to create the flv video to export the frame you want as a jpg file or you can use the snapshot function of vlc media player to generate an image file from any frame in your video.

Related Links

Riva Flv Encoder
Flow Player download site
vlc media player