If you are lucky, VODServer may already support your favorite streaming video service. The best way to try is with http://vodserver:port/playFromPage?url=url to page containing video. This will try to find streaming video information in the specified page; if it finds video information then it will try to stream it. If this doesn't work, you will probably need to create your own service configuration; see the following sections for more details.
The main task will be to gather information on how the video is being loaded on the web page; you can then mimic this behavior using VODServer ParamBuilders. Depending on the site, the web page may contain a simple video link, or more advanced Flash Player based streaming. The video URL and other information may change regularly, and the site may even use security tokens, trying to prevent people from accessing video streams directly. The good thing is that VODServer is very flexible and can support many scenarios. The bad thing is that it may take some time to figure out exactly how the video is being loaded; the security measures on some pages may prevent you from successfully creating a service.
There is no single way to gather all required information; below are some hints. Usually it is easiest to start looking at the log output for http://vodserver:port/playFromPage?url=url to page containing video.
Once you have figured out the necessary information, it is usually best to first try running rtmpdump and/or ffmpeg manually, to check whether you are actually able to access the video content using the information you gathered. Once this succeeds, you are ready to create a new service configuration.
Every VODService service is defined in a vodserver-service-name.xml configuration file. Services usually are defiend using the following skeleton:
<bean id="/<service name>" parent="paramBuilderServiceBase" class="<service class>"> <property name="...">...</property> ... </bean>
Here, service name is the name that is used to invoke the service. I.e. the service can be invoked using http://vodserver:port/service name. Note that in the service configuration, the service name should always start with a forward slash.
service class is the Java class that processes the service request. Please refer to the Service API Documentation for more information on available service implementations.
The parent attribute is used to inherit properties from a parent bean, and is optional. In this example, paramBuilderServiceBase will contain the static parameter definitions from vodserver-services-common.xml, as well as a RequestParamBuilder used to map request parameters to VODServer parameters.
For detailed information on how to configure services, please have a look at the API documentation, and use the predefined services as examples.
Since VODServer combines all configuration files into a single run-time configuration, services can reference elements (beans) defined in other configuration file. In particular, services can reference elements from vodserver-services-common.xml. For example, most services will reference the static parameter and request parameter builders defined in vodserver-services-common.xml as follows:
<bean id="/play" class="vodserver.service.CommandRunnerService"> <property name="paramBuilders"> <list> <!-- Include static parameters from common--> <ref bean="staticParams"/> <!-- Include request parameter builder from common --> <ref bean="requestParamBuilder"/> ... </list> </property> ... </bean>