Failed connect camera video port and encoder input port - Raspberry Pi Forums


hello!
based on raspivid try add h264 encoding in application.
unforunately connection camera video port , encoder input port no success, follow program output:

code: select all

mmal: mmal_vc_port_info_set: failed set port info (2:0): einval mmal: mmal_vc_port_set_format: mmal_vc_port_info_set failed 0xb8f80a90 (einval) mmal: mmal_connection_create: format not set on input port mmal: mmal_connection_destroy_internal: connection vc.ril.camera:out:1/vc.ril.video_encode:in:0 not cleared waterguard: failed create connection between vc.ril.camera:out:1(opqv) , vc.ril.video_encode:in:0(opqv), status 3 (einval)
camera video port configuration:

code: select all

static unsigned short image_width = 1280; static unsigned short image_height = 720; static unsigned char fps = 25;  format->encoding_variant = mmal_encoding_i420; format->encoding = mmal_encoding_opaque; format->es->video.width = vcos_align_up(image_width, 32); format->es->video.height = vcos_align_up(image_height, 16); format->es->video.crop.x = 0; format->es->video.crop.y = 0; format->es->video.crop.width = image_width; format->es->video.crop.height = image_height; format->es->video.frame_rate.num = fps; format->es->video.frame_rate.den = 1;
encoder configuration:

code: select all

encoder_input = _encoder->input[0]; encoder_output = _encoder->output[0]; mmal_format_copy(encoder_output->format, encoder_input->format);  encoder_output->format->encoding = mmal_encoding_h264; encoder_output->format->bitrate = 17000000; encoder_output->format->es->video.frame_rate.num = 0; encoder_output->format->es->video.frame_rate.den = 1;  mmal_parameter_video_profile_t profile; profile.hdr.id = mmal_parameter_profile; profile.hdr.size = sizeof(mmal_parameter_video_profile_t); profile.profile[0].profile = mmal_video_profile_h264_high; profile.profile[0].level = mmal_video_level_h264_4;
how can solve problem?
thank , excuse me bad english.



raspberrypi



Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62