Record live stream in gray-scale

88 views Asked by At

I Developed Red 5 flex application for record live video stream. now I want to record same stream as gray scale.

This is code in action-script :

ns= new NetStream(nc);
ns.videoStreamSettings = h264Settings;
ns.publish(stream_id,"record");
ns.attachAudio(mic);
ns.attachCamera(cam);

Code Red5 Server :

public void recordShow() {
        IConnection conn = Red5.getConnectionLocal();
        logger.debug("Recording show for: {}", conn.getScope().getContextPath());
        String streamName = String.valueOf(System.currentTimeMillis());
        // Get a reference to the current broadcast stream.
        IBroadcastStream stream = app.getBroadcastStream(conn.getScope(), "hostStream");
        try {
            // Save the stream to disk.
            stream.saveAs(streamName, false);
        } catch (Exception e) {
            logger.error("Error while saving stream: {}", streamName);
        }
    }

I tried with filters, it show gray-scale but not record in gray-scale. How can I convert live stream in gray-scale, and record in gray-scale.

0

There are 0 answers