小编vic*_*234的帖子

使用opencv进行视频处理的音频输出

我正在使用opencv处理视频,但同时我需要播放音频并简单地控制它,如大声或当前帧号.

我想我应该用ffmpeg创建一个并行进程,但我不知道该怎么做.你能解释一下该做什么吗?

或者您知道另一种解决方案吗?

c c++ audio opencv ffmpeg

17
推荐指数
1
解决办法
3万
查看次数

如何在OpenCV中设置相机FPS?CV_CAP_PROP_FPS是假的

如何设置相机FPS?

可能是cvSetCaptureProperty(cameraCapture,CV_CAP_PROP_FPS,30); ?

但它返回HIGHGUI ERROR:V4L2:无法获取属性(5) - 参数无效

因为highgui/cap_v4l.cpp中没有实现

static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
                                  int property_id, double value ){
    static int width = 0, height = 0;
    int retval;

    /* initialization */
    retval = 0;

    /* two subsequent calls setting WIDTH and HEIGHT will change
       the video size */
    /* the first one will return an error, though. */

    switch (property_id) {
    case CV_CAP_PROP_FRAME_WIDTH:
        width = cvRound(value);
        if(width !=0 && height != 0) {
            retval = icvSetVideoSize( capture, width, height);
            width …
Run Code Online (Sandbox Code Playgroud)

camera opencv frame-rate

15
推荐指数
3
解决办法
7万
查看次数

libv4l2:启用流错误:设备上没有剩余空间

我尝试为opencv获取立体声对.我将Logitech B910和Logitech C910网络摄像头连接到USB.但是有这个错误.我使用quirks参数并outfmt=mjpeg在mplayer中设置,但再次出现此错误.

我在哪里可以找到uvcvideo或usb驱动程序中的错误?我应该使用哪些监控或调试工具?

linux usb webcam

10
推荐指数
2
解决办法
2万
查看次数

如何将 gst-rtsp-server 与自己的管道一起使用?

我正在编写 gstreamer 应用程序,需要通过 rtsp 传输输出音频/视频流。但在gst-rtsp-server示例中,我factory仅通过gst-launch语法建立了创作:

factory = gst_rtsp_media_factory_new ();  
gst_rtsp_media_factory_set_launch (factory,
  "( appsrc name=mysrc ! videoconvert ! x264enc ! rtph264pay name=pay0 pt=96 )");
Run Code Online (Sandbox Code Playgroud)

是否可以将gst-rtsp-server元素连接到我的管道?

c c++ rtsp gstreamer

3
推荐指数
2
解决办法
3404
查看次数

是否可以使用SIMD指令进行替换?

我有int的向量,我需要找到替换一些具有特定值的元素.两者都是一样的.
例如:为所有元素替换4到8.

我在c ++中尝试循环内存访问.但它对我来说仍然很慢.

更新:
我正在使用OpenCV Mat对象x86:

for (int i = 0; i < labels.rows; ++i) {
    for (int j = 0; j < labels.cols; ++j) {
        int& label = labels.at<int>(i, j);
        if (label == oldValue) {
            label = newValue;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

Mat.at() 函数只是在释放模式下通过指针返回值

template<typename _Tp> inline
_Tp& Mat::at(int i0, int i1)
{
    CV_DbgAssert(dims <= 2);
    CV_DbgAssert(data);
    CV_DbgAssert((unsigned)i0 < (unsigned)size.p[0]);
    CV_DbgAssert((unsigned)(i1 * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()));
    CV_DbgAssert(CV_ELEM_SIZE1(traits::Depth<_Tp>::value) …
Run Code Online (Sandbox Code Playgroud)

c++ algorithm replace simd

1
推荐指数
1
解决办法
394
查看次数

标签 统计

c++ ×3

c ×2

opencv ×2

algorithm ×1

audio ×1

camera ×1

ffmpeg ×1

frame-rate ×1

gstreamer ×1

linux ×1

replace ×1

rtsp ×1

simd ×1

usb ×1

webcam ×1