5

これと同様の質問かもしれません: https://stackoverflow.com/questions/16453858/android-stream-and-record-at-the-same-time

Android でライブ ビデオ ストリーミングを作成しようとしましたが、spydroid ライブラリを使用すると、非常にうまく機能します。

しかし、問題は、ライブ ビデオ ストリーミングと SD カードへのビデオ録画の両方を同時に行う必要があることです。ただし、コードでは、setOutputFile()ソケットのファイル記述子を指定します。

        createSockets();
        // We write the ouput of the camera in a local socket instead of a file !           
        // This one little trick makes streaming feasible quiet simply: data from the camera
        // can then be manipulated at the other end of the socket
        mMediaRecorder.setOutputFile(mSender.getFileDescriptor());

ここでmSenderは、LocalSocketオブジェクトです。

しかし、ご存知のように、Android でビデオを SD カードに記録するには、setOutputFile()メソッドへのファイル パスを指定する必要があります。しかし、その両方を行うことはできません。

クライアント側でライブビデオを録画すればできますが、サーバー側で行いたいです。

何か考えやアイデアはありますか?小さなヒントは私にとって非常に役立ちます。前もって感謝します :)

4

0 に答える 0