Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/156.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何从网络摄像头压缩mjpeg本机格式帧_C++_C_Jpeg_Raspberry Pi - Fatal编程技术网

C++ 如何从网络摄像头压缩mjpeg本机格式帧

C++ 如何从网络摄像头压缩mjpeg本机格式帧,c++,c,jpeg,raspberry-pi,C++,C,Jpeg,Raspberry Pi,我已经用C(带套接字)编写了一个服务器客户端程序 这些框架是: 以MJPEG本机格式640x480捕获(另一种本机格式为YUYV) 单个帧的大小为204000字节(200 KB) 网络处于临时模式,因此我只能获得11-12 Mbps 目的传输速度:25-30 fps(显然未达到) 所以我需要在发送前压缩帧,我的问题是: 1. what format could i use? 2. I am making use of the API V4L2, so i want to know if t

我已经用C(带套接字)编写了一个服务器客户端程序

  • 这些框架是:

    • 以MJPEG本机格式640x480捕获(另一种本机格式为YUYV)
    • 单个帧的大小为204000字节(200 KB)
  • 网络处于临时模式,因此我只能获得11-12 Mbps

  • 目的传输速度:25-30 fps(显然未达到)
  • 所以我需要在发送前压缩帧,我的问题是:

    1. what format could i use? 
    2. I am making use of the API V4L2, so i want to know if there is a method, 
       function, etc. inside of this API that i can use for my purpose.
    

    检查IP/以太网的多格式视频传输

    MJPEG流已经被压缩,进一步的压缩尝试甚至可能会使数据变大。你可能想考虑把流重新编码成更好的东西。你说得对。我只有这两种本机格式:MJPEG和YUYV(422),如何继续?MJPEG数据目前的压缩比约为4.5:1。这意味着相机正在以非常高的质量设置对其进行压缩。您可以以较低的质量设置重新压缩数据。在压缩比为20:1时,质量仍然不错。如果您知道图像不会具有有利于其他类型压缩的特征(例如PNG-大面积的恒定颜色),那么较低的质量设置可能是最好的选择。如果你不能告诉相机使用什么质量,那么你需要重新编码图像。