opencv3.0处理视频,总是得到空帧

2024-04-19 22:57:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我用Jmpg格式的摄像头捕捉了一个视频文件。 这是我在“medianfo/path/to”下的原始输出/测试.flv'

General
Complete name                            : /home/chengtao/git/testopencv/test.flv
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 30.0 MiB

Video
ID                                       : 0
Format                                   : JPEG
Codec ID                                 : MJPG
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Compression mode                         : Lossy

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 50
Bit rate mode                            : Constant
Bit rate                                 : 160 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Alignment                                : Aligned on interleaves

我使用了opencv3.0示例项目中的代码

^{pr2}$

在“ret,frame=上限读数()". 有人遇到过这个问题,有什么建议吗?多谢~


Tags: idformatratemodevideo格式bitaudio