com.smaxe.app.uv.downloader
Class RtmpDownloader

java.lang.Object
  extended by com.smaxe.app.uv.downloader.RtmpDownloader

public final class RtmpDownloader
extends java.lang.Object

RtmpDownloader - downloads audio/video stream from the RTMP/RTMPT-enabled server to the local FLV file.

Version:
1.5.8
Author:
Andrei Sochirca
See Also:
JUV RTMP Downloader

Constructor Summary
RtmpDownloader()
          Constructor.
 
Method Summary
 java.util.concurrent.Future<java.lang.Boolean> download(java.lang.String url, java.lang.Object[] args, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.Object stream, java.lang.String file)
          Downloads stream from the url and saves it to the file.
static void main(java.lang.String[] args)
          Entry point.
static void printCommandLineArguments(java.io.PrintStream ps)
          Prints command line arguments.
 void setDebugMode(boolean debug)
          Set true for debug mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtmpDownloader

public RtmpDownloader()
Constructor.

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Entry point.

Parameters:
args -
Throws:
java.lang.Exception - if an exception occurred

printCommandLineArguments

public static void printCommandLineArguments(java.io.PrintStream ps)
Prints command line arguments.

Parameters:
ps -

setDebugMode

public void setDebugMode(boolean debug)
Set true for debug mode.

Parameters:
debug - set true to enable debug mode; false to disable

download

public java.util.concurrent.Future<java.lang.Boolean> download(java.lang.String url,
                                                               java.lang.Object[] args,
                                                               java.util.Map<java.lang.String,java.lang.Object> configuration,
                                                               java.lang.Object stream,
                                                               java.lang.String file)
                                                        throws java.lang.Exception
Downloads stream from the url and saves it to the file.

Note: Connection configuration fields are:
"fpad" - (default: false)
"pageUrl" - page url (default: "")
"swfUrl" - SWF url (default: "")
"flashVer" - flash version (default: "WIN 9,0,124,0")
"audioCodecs" - audio codecs (default: 615)
"videoCodecs" - video codecs (default: 124)
"videoFunction" - video function (default: 1)

stream parameter can be either String (name of the stream) or an array, please check developer guide for details.

Parameters:
url - connection url
args - connection arguments
configuration - connection configuration
stream - stream to record
file - local file to store stream
Returns:
true if succeeded to download; otherwise false
Throws:
java.lang.Exception - if an exception occurred