feedme java project

is free software, licensed under the terms of the GNU General Public License, that feeds/imports media from anywhere to xbox360 media center extenders, ipods, web servers, file servers, etc. using Java.

Please read the license here.

Wednesday, August 15, 2007

osx out.ipod.mp4 @export method added



/*
* Main.java
* Created on June 31, 2007, 9:19 PM
*/

package feedme;

import java.io.*;
import java.nio.*;
import java.util.*;
import javax.script.*;

/**
*
* @author john mcloskey
*/
public class Main {

/** Creates a new instance of Main */
public Main() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String curDir = System.getProperty("user.dir");
System.out.println(curDir);
ArrayList list = new ArrayList();

list.add( new String(" //////// //////// //////// /////// ") );
list.add( new String(" // // // // // ") );
list.add( new String(" ///// ///// ///// // // ") );
list.add( new String(" // // // // // ") );
list.add( new String(" // //////// //////// /////// ") );
list.add( new String(" ") );
list.add( new String(" /// /// //////// ") );
list.add( new String(" //// //// // ") );
list.add( new String(" // // // // ///// ") );
list.add( new String(" // /// // // ") );
list.add( new String(" // // // //////// ") );
list.add( new String(" ") );
list.add( new String(" ") );
list.add( new String(" ") );
list.add( new String(" o /') ") );
list.add( new String(" /' ( , ") );
list.add( new String(" __/' ) .'`; ") );
list.add( new String(" o _.-~~~~' ``---..__ .' ; ") );
list.add( new String(" _.--' b) ``--...____.' .' ") );
list.add( new String(" (/'/'/'/'/'/. )). `-._ < ") );
list.add( new String(" |'|'|'|'|'/...____...---`.___.'----... .'=== `.; ") );
list.add( new String(" `-` ` ") );
//list.add( new StringBuffer() );

for( String str : list ) {
System.out.println( str );
}
File w = new File("feedme.wip");
// Wed Aug 01 21:21:56 CDT 2007
// Stream to write file feedme.wip
// "crack the wip" file here
FileOutputStream fout;

try {
// Open an output stream
fout = new FileOutputStream("feedme.wip");

// Print a line of text
new PrintStream(fout).println(new Date(Calendar.getInstance().getTimeInMillis()));

// Close our output stream
fout.close();
}
// Catches any error conditions
catch (IOException e) {
System.err.println("Unable to write to wip file");
System.exit(-1);
}
System.out.println("It's now " + new Date(Calendar.getInstance().getTimeInMillis()));
for (int i = 0; i < args.length; i++) {
File f = new File(args[i]);
if (f.exists()) {
System.out.println("Name: " + f.getName());
System.out.println("Absolute path: " + f.getAbsolutePath());
try {
System.out.println("Canonical path: " + f.getCanonicalPath());
} catch (IOException e) {
System.out.println("Could not determine the canonical path.");
}

String parent = f.getParent();
if (parent != null) {
System.out.println("Parent: " + f.getParent());
}

if (f.canWrite()) System.out.println(f.getName() + " is writable.");
if (f.canRead()) System.out.println(f.getName() + " is readable.");

if (f.isFile()) {
System.out.println(f.getName() + " is a file.");
} else if (f.isDirectory()) {
System.out.println(f.getName() + " is a directory.");
} else {
System.out.println("What is this?");
}

if (f.isAbsolute()) {
System.out.println(f.getPath() + " is an absolute path.");
} else {
System.out.println(f.getPath() + " is not an absolute path.");
}

long lm = f.lastModified();
if (lm != 0) System.out.println("Last Modified at " + new Date(lm));

long length = f.length();
if (length != 0) {
System.out.println(f.getName() + " is " + length + " bytes long.");
}

} else {
System.out.println("I'm sorry. I can't find the file " + args[i]);
}

}

//example jsEngine.eval from javax.script.*
/*ScriptEngineManager mgr = new ScriptEngineManager();
List factories =
mgr.getEngineFactories();
for (ScriptEngineFactory factory: factories) {
System.out.println("ScriptEngineFactory Info");
String engName = factory.getEngineName();
String engVersion = factory.getEngineVersion();
String langName = factory.getLanguageName();
String langVersion = factory.getLanguageVersion();
System.out.printf("\tScript Engine: %s (%s)\n",
engName, engVersion);
List engNames = factory.getNames();
for(String name: engNames) {
System.out.printf("\tEngine Alias: %s\n", name);
}
System.out.printf("\tLanguage: %s (%s)\n",
langName, langVersion);
}
try {
jsEngine.eval("print('Hello, world!')");
} catch (ScriptException ex) {
ex.printStackTrace();
}*/

// August 15, 2007, 7:43 PM - osx out.ipod.mp4 @export method added

/**
* remove the "//" below to @export out.ipod.mp4 to current directory
* in 720x480 wmv media center standard DVD format
*/

// :sout="#transcode{vcodec=mp4v,vb=1024,scale=1, \
// acodec=mp4a,ab=128,channels=2}:standard{access=file, \
// url=out.ipod.mp4}" vlc:quit \
// --aspect-ratio "4:3" --sout-transcode-width 360 \
// --sout-transcode-height 240 --sout-transcode-fps 30

// August 1, 2007, 7:00 PM - linux, osx, and HDDVD output formats added

/**
* remove the "//" below to enable hdiutil out.dvd.dmg @export on osx platform
* updated Wed Aug 04 01:53:00 CDT 2007
*/

// Runtime.getRuntime().exec( "hdiutil create -megabytes 4096 -fs HFS+ \
// -volname FeedMeOutVol out.dvd.dmg" );

/**
* remove the "//" below to enable QTFU6 windows @import method.
* Windows QTFU6 @import method added 08/04/2007.
*/

// Runtime.getRuntime().exec( "C:\Program Files\iTunes\itunes.exe /regserv
// C:\...\QTFairUse\QTFairUse6console.exe --Process all" );

/**
* remove first "//" below to enable Linux /usr/bin/streamripper @import method.
* remove second "//" below to enable BSD /usr/pkg/bin/streamripper @import method.
* Linux and BSD @import methods added Wed Aug 04 2007.
*/

// Runtime.getRuntime().exec( "/usr/bin/streamripper http://di.fm:8095/");
// Runtime.getRuntime().exec( "/usr/pkg/bin/streamripper http://di.fm:8095/");


//(copy) streams of the following kinds:
//.mp3 Shoutcast streams - the kind of streams found on shoutcast.com.
//.mp3 Icecast streams
//.nvs (Nullsoft Streaming Video) streams
//.aac Shoutcast/Icecast streams
//.ogg stream

/**
* remove the "//" below to @import in.avi on osx platform
* updated Wed Aug 03 16:53:00 CDT 2007
*/

//Runtime.getRuntime().exec(
// /Applications/VLC.app/Contents/MacOS/VLC -vvv in.avi --sout-ffmpeg-qscale 1

/**
* remove the "//" below to @import in.avi on windows platform
*/

//Runtime.getRuntime().exec(
//"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv in.avi --sout-ffmpeg-qscale 1

/**
* remove the "//" below to @import in.avi on linux platform
*/

//Runtime.getRuntime().exec(
//"/usr/bin/vlc" -vvv ./in.avi --sout-ffmpeg-qscale 1

/**
* remove the "//" below to @export out.dvd.wmv to current directory
* in 720x480 wmv media center standard DVD format
*/

//:sout=#transcode{vcodec=WMV2,width=720,height=480,acodec=wma,ab=96,channels=2}
//:duplicate{dst=std{access=file,mux=asf,dst=out.wmv}})


/**
* remove the "//" below to @export out.hd720p.wmv to current directory
* in 1280(width) 720(height) native media center HDDVD 720p format
*/

//:sout=#transcode{vcodec=WMV2,width=1280,height=720,acodec=wma,ab=96,channels=2}
//:duplicate{dst=std{access=file,mux=asf,dst=out.wmv}})


/**
* remove the "//" below to @export out.hd1080p.wmv to current directory
* in 1920 (width) x 1080 (height) native media center HDDVD 1080p format
*/

//:sout=#transcode{vcodec=WMV2,width=1920,height=1080,acodec=wma,ab=96,channels=2}
//:duplicate{dst=std{access=file,mux=asf,dst=out.wmv}})
}

}

No comments: