tda4 videnc-test-app: CONTINUOUS and STEPWISE FRAMEINTERVALS not supported

/* videnc-test-app */

https://git.ti.com/cgit/jacinto7_multimedia/
git clone https://git.ti.com/git/jacinto7_multimedia/videnc-test-app.git

// 编译
./autogen.sh
./configure --enable-maintainer-mode --build=i386-linux --host=aarch64-none-linux CC=/home/share/work/tda4/linux-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-none-linux-gnu-gcc

// 运行
./tienc_encode -d /dev/video1 -n 2 -i mix.yuv -f NV12 -c H264 -w 960 -h 540 -o video.h264   // -n 2 只编码2帧,不指定编码全帧
./tienc_encode -d /dev/video1 -i mix.yuv -f NV12 -c H264 -w 960 -h 540 -o video.h264

yuv size:
4000*3000 = 18 000 000
1280*720  = 1 382 400


/* /dev/video0 */
tienc: Opened device /dev/video0
tienc: query_device Enter
tienc: Querycaps: fd=0x5 driver=vxd-dec card=vxd-dec bus_info=platform:vxd-dec
tienc: Querycaps: device_caps=0x4204000 capabilities=0x84204000
tienc: Calling VIDIOC_ENUM_FMT on CAPTURE       // V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 显示所有支持的格式
tienc: desc.index = 0, pixelformat = NV12, desciption = Y/CbCr 4:2:0
tienc: desc.index = 1, pixelformat = NV16, desciption = Y/CbCr 4:2:2
tienc: desc.index = 2, pixelformat = TI12, desciption = 10-bit YUV 4:2:0 (NV12)
tienc: desc.index = 3, pixelformat = TI16, desciption = 10-bit YUV 4:2:2 (NV16)
tienc: desc.index = 4, pixelformat = YM12, desciption = Planar YUV 4:2:0 (N-C)
tienc: desc.index = 5, pixelformat = YM16, desciption = Planar YUV 4:2:2 (N-C)
tienc: Calling VIDIOC_ENUM_FMT on OUTPUT        // V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 显示所有支持的格式
tienc: desc.index = 0, pixelformat = H264, desciption = H.264
tienc: desc.index = 1, pixelformat = HEVC, desciption = HEVC
tienc: desc.index = 2, pixelformat = MJPG, desciption = Motion-JPEG
tienc: Calling VIDIOC_ENUM_FRAMESIZES           // 枚举设备支持的分辨率信息
VIDIOC_ENUM_FRAMESIZES failed 25 Inappropriate ioctl for device
tienc: Calling VIDIOC_ENUM_FRAMEINTERVALS
VIDIOC_ENUM_FRAMEINTERVALS failed 25 Inappropriate ioctl for device
Requested frame interval not found, exiting

/* /dev/video1 */
tienc: Opened device /dev/video1
tienc: query_device Enter
tienc: Querycaps: fd=0x5 driver=vxe-enc card=vxe-enc bus_info=platform:vxe-enc
tienc: Querycaps: device_caps=0x4204000 capabilities=0x84204000
tienc: Calling VIDIOC_ENUM_FMT on CAPTURE       // V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 显示所有支持的格式
tienc: desc.index = 0, pixelformat = H264, desciption = H.264
tienc: Calling VIDIOC_ENUM_FMT on OUTPUT        // V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 显示所有支持的格式
tienc: desc.index = 0, pixelformat = NV12, desciption = Y/CbCr 4:2:0
tienc: desc.index = 1, pixelformat = RGB4, desciption = 32-bit A/XRGB 8-8-8-8
tienc: Calling VIDIOC_ENUM_FRAMESIZES           // 枚举设备支持的分辨率信息
tienc: VIDIOC_ENUM_FRAMESIZES got CONTINUOUS
tienc: frmsizes min_width=1 max_width=1920 step_width=1
tienc: frmsizes min_height=1 max_height=1080 step_height=1
tienc: Calling VIDIOC_ENUM_FRAMEINTERVALS
tienc: VIDIOC_ENUM_FRAMEINTERVALS got CONTINUOUS
tienc: fival min: numerator=1 denominator=960 framerate=960
tienc: fival max: numerator=1 denominator=1 framerate=1
tienc: fival step: numerator=1 denominator=1 CONTINUOUS and STEPWISE FRAMEINTERVALS not supported

1.遇到此报错:CONTINUOUS and STEPWISE FRAMEINTERVALS not supported。

解:把 check_framerate 函数里的 return 1 改变 return 0;

2.遇到不能编码。

解:tienc_encode 编码需要连续帧,即最少2帧数据,不支持单帧;

你可能感兴趣的:(Embedded,c)