2017-02-22 26 views

回答

0

DJI發佈了SDK 4.0的新版本,其中包含了如何使用FFMpeg將原始數據解碼爲YUV圖像的example

如下因素這個例子中,你可以修改這個方法

private void screenShot(byte[] buf, String shotDir) { 

     YuvImage yuvImage = new YuvImage(buf, 
       ImageFormat.NV21, 
       DJIVideoStreamDecoder.getInstance().width, 
       DJIVideoStreamDecoder.getInstance().height, 
       null); 

//you can therefore stream it to your Wowza Server 

} 

我不知道你有什麼目標。但是,我會讓你將YUV幀編碼爲Jpeg,並通過UDP傳輸,就像對等應用一樣。

Here是如何使用UDP流式傳輸實時視頻的簡單方法。它使用C++,但很容易理解

相關問題