- $ sudo dnf install gstreamer-rockchip librockchip_rga librockchip_rtsp librockchip_vendor librockchip_isp librockchip_drm librockchip_mpp librockchip_rga-devel librockchip_rtsp-devel librockchip_vendor-devel librockchip_mpp-tests librockchip_drm-devel librockchip_mpp-devel
复制代码
2. 验证gstreamer plugins- $ gst-inspect-1.0 |grep rockchip
- rockchipmpp: mppjpegdec: Rockchip's MPP JPEG image decoder
- rockchipmpp: mppjpegenc: Rockchip Mpp JPEG Encoder
- rockchipmpp: mpph264enc: Rockchip Mpp H264 Encoder
- rockchipmpp: mppvideodec: Rockchip's MPP video decoder
复制代码
3. 使用opencv C++ API打开并保存视频文件VideoCapture cap("/home/toybrick/Downloads/input.mp4");
printf("frame count: %d\n", cap.get(CV_CAP_PROP_FRAME_COUNT));
VideoWriter video("output.avi", CV_FOURCC('X', '2', '6', '4'), 30, Size(640, 480));
while (cap.isOpened()) {
cap >> frame;
video.write(frame);
}
- Failed to query video capabilities: Inappropriate ioctl for device
- libv4l2: error getting capabilities: Inappropriate ioctl for device
- VIDEOIO ERROR: V4L: device /home/toybrick/input.mp4: Unable to query number of channels
- mpi: mpp version: Without VCS info
- mpp_rt: NOT found ion allocator
- mpp_rt: found drm allocator
- mpp: deprecated block control, use timeout control instead
- warning: GStreamer: unable to query duration of stream (/builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:904)
- warning: Cannot query video position: status=1 value=0 duration=-1
- (/builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:952)
- frame count: -1
- mpi: mpp version: Without VCS info
- h264e_api: h264e_config MPP_ENC_SET_RC_CFG bps 1555200 [1458000 : 1652400]
- **
- ERROR:gstmppvideoenc.c:115:gst_mpp_video_enc_stop: assertion failed: (g_atomic_int_get (&self->active) == FALSE)
- Aborted (core dumped)
复制代码
勇Z的心 发表于 2019-8-1 14:42
有技术支持来回答下么? 谢谢!!!
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |