2011-02-21 17 views

答えて

0

をチェックしてくださいあなたは、Javaアプレットでビデオを再生することができますが、それはあなた自身のプレーヤーを実装するためにあなたを必要とします。あなたはJCodec(http://jcodec.org)を使用することができ、ビデオのデコードに

は、それがFrameGrabと呼ばれる便利なクラスがあり、そして、あなたはこのようにそれを使用することができます:あなたはまた、あなたが使用できるオーディオを再生することを計画している場合は

int frameNumber = 10000; 
FileChannelWrapper ch = null; 
try { 
    ch = NIOUtils.readableFileChannel(new File("path to file name")); 
    FrameGrab frameGrab = new FrameGrab(ch); 

    frameGrab.seek(frameNumber); 
    BufferedImage frame; 
    for (int i = 0; (frame = frameGrab.getFrame()) != null && i < 200; i++) { 
     ImageIO.write(frame, "jpg", new File(String.format("img%08d.png", i))); 
    } 
} finally { 
    NIOUtils.closeQuietly(ch); 
} 

: JAAD(http://jaadec.sourceforge.net/)は次のようになります:

Decoder dec = new Decoder(decoderSpecificinfo); 
SampleBuffer buf = new SampleBuffer(); 
dec.decodeFrame(aacFrame, buf); 
//the aacFrame array contains the AAC frame to decode 
byte[] audio = buf.getData(); //this array contains the raw PCM audio data 
関連する問題