Setting up your systemFirst thing you need to do is make sure that you have GStreamer framework installed. In Ubuntu: sudo apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverseAs JapelServer relies on the GStreamer framework, being able to read movies depends on the plugins you have installed JapelServer is a Java application and needs OpenJDK or Sun's JRE. Make sure that you have installed Java on your PC In Ubuntu: sudo apt-get install openjdkThere, you're all setup. JapelServer can be run from any folder, so just unzip the binary package in the folder of you choice. Then you will have to edit the configuration file. You can have multiple configuration files so you can launch JapelServer with the configuration of your choice. The most important item to configure is where to find your movies. See the "moviesfolder" item in the configuration file. Once everything is configured as you need, simply open a console in that folder and launch: java -jar JapelServer japel.propertieCustomizing the webpageYou can create your own webpage, default being index.html in the folder movie.All webpage must be located in the same folder as the movies Here is an example to display the movies and the stream <H2>Movies</H2> <a href="JAPELSOURCELINK">JAPELSOURCE</a> <PROFILES><a href="JAPELPROFILELINK">JAPELPROFILE</a> </PROFILES><BR> <H2>Streams</H2> <a href="JAPELSTREAMLINK">JAPELSTREAM</a>HTML code for movies or streams must be on a single line.
ProfilesHas you may have already seen, you can have multiple profiles for each movie. A profile is a particular configuration of GStreamer that will output the stream in a particular format. For more details about GStreamer, read the documentation on the official GStreamer websiteProfiles are configured in the japel.properties file. First thing you have to do is edit the list of available profiles # The different profile list to be used for movie filesProfiles will be listed in alphanumerical order in the webpage. Then, you have to create a line defining the GStreamer configuration to use. Make sure that the profile name is exactly the same as it is listed in the profles tag. # Profile for the iPhone50k=filesrc name=file location=SOURCE ! decodebin name=demux { mpegtsmux name=mux ! tcpserversink port=PORT } { demux. ! queue ! audioconvert ! faac profile=2 ! queue ! mux. } { demux. ! queue ! videorate ! x264enc bitrate=50 ! mux. }# Profile for using VLC as a client500k=filesrc name=file location=SOURCE ! decodebin name=demux { mpegtsmux name=mux ! tcpserversink port=PORT } { demux. ! queue ! audioconvert ! faac profile=2 ! queue ! mux. } { demux. ! queue ! videorate ! x264enc bitrate=500 ! mux. }You can test these configuration from the command line to make sure that they work (Of course, you will have to replace manually the "PORT" and "SOURCE" keywords).
StreamsStreams are dedicated profiles that you can configure to stream from a webcam for example. As for profiles, the PORT keyword must be included as the tcpserversink element. Anything before the tcpserversink element can be set as you need.# Streams are direct sources to be streamed like a webcam or a feed on the internetstreams=Webcam# A profile that will stream the webcamWebcam=queue v4l2src device=/dev/video0 ! video/x-raw-yuv,width=160,height=120 ! ffmpegcolorspace ! videorate ! video/x-raw-yuv,framerate=5/1 ! x264enc ! mux. { mpegtsmux name=mux ! tcpserversink port=PORT } { gconfaudiosrc ! queue ! audioconvert ! faac ! queue ! mux. }With streams, you can broadcast your webcam, an internet stream (audio or video), a specific file on your PC, your DV cam. It up to you! |
