wmv to flv

http://www.coderanch.com/t/329229/java/java/Convert-Video-SWF-FLV-format

I've also been told that ffmpeg (encoding) and flvtool2 (metadata) work well together. Again, I've no first hand experience with them, but maybe they're something to get you started.



http://forum.semiologic.com/discussion/484/

What's the above is useless , begin Java Audio Vedio Encode , A java wrapper called JAV, great job.

http://www.sauronsoftware.it/projects/jave/index.php

Demo programme:

package com.test;

import it.sauronsoftware.jave.AudioAttributes;
import it.sauronsoftware.jave.Encoder;
import it.sauronsoftware.jave.EncoderException;
import it.sauronsoftware.jave.EncodingAttributes;
import it.sauronsoftware.jave.InputFormatException;
import it.sauronsoftware.jave.VideoAttributes;
import it.sauronsoftware.jave.VideoSize;

import java.io.File;

public class Test {

	public static void main(String[] args) {
		File source = new File("C:\\jav-movie\\test.avi");
		File target = new File("C:\\jav-movie\\test.flv");
		AudioAttributes audio = new AudioAttributes();		
		audio.setCodec("libmp3lame");
		audio.setBitRate(new Integer(64000));
		audio.setChannels(new Integer(1));
		audio.setSamplingRate(new Integer(22050));
		VideoAttributes video = new VideoAttributes();
		video.setCodec("flv");
		video.setBitRate(new Integer(160000));
		video.setFrameRate(new Integer(15));
		video.setSize(new VideoSize(400, 300));
		EncodingAttributes attrs = new EncodingAttributes();
		attrs.setFormat("flv");
		attrs.setAudioAttributes(audio);
		attrs.setVideoAttributes(video);
		Encoder encoder = new Encoder();
		try {
			encoder.encode(source, target, attrs);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			System.out.println("Exception:" + e);
			e.printStackTrace();
		} 		
	}	
}




broadcast tool:

Riva FLV Encoder

你可能感兴趣的:(java,C++,c,PHP,C#)