How to convert Video to FLV for Flv Player ? : java code , Examples

How to convert Video to FLV for Flv Player

public int compressVideioFLV(String inputVideo, String outputVidio) {
        int returnCode = 0;
        Process process;
        try {
            System.out.println("compressVideioFLV called");
            System.out.println("inputVideo:"+inputVideo);
            System.out.println("outputVidio:"+outputVidio);
            String[] command = { "ffmpeg", "-i", inputVideo , "-ar", "22050", "-ab", "32","-f","flv","-s","422x252", outputVidio};
            System.out.println("11:");
            process = Runtime.getRuntime().exec(command);
            System.out.println("after process FLV");
            returnCode = process.waitFor();
            System.out.println("returnCode FLV:"+returnCode);

        } catch (IOException e) {
            e.printStackTrace();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return returnCode;

    }

Comments

Recent Post

Recent Posts Widget

Popular posts from this blog

Capture image from webcam java code, examples

How to capture finger prints in java

Shallow Copy Deep Copy Java example