Thanks for this info. Zoneminder uses multiple Monitor instances and if the access to the hardware JPEG encoder is serialized, then it will be slower than doing parallel software jpeg encodes with libjpeg. So this is not an avenue for optimization. Are there other components that are limited similar...
You do really love finding all the old obscure code! I thought it was something you guys had around the corner yet to publish. :D So that's why I had to manually copy over the library and the include file. I think the first simple question is are you aiming to run on a 0/0W/A/B I will be running it...
I tried a test program with brcmjpeg and it is awesome. I want to implement it in zoneminder and I need a little advice on how to do this. Zoneminder has a Monitor class object that is working on a lot of objects of class Image. There could be hundreds of Image objects being manipulated by a Monitor...
So I got this working. I am getting output buffers in the correct size. The stumbling blocks were: 1. The sps and pps data must be sent in band as the first packet to the decoder. I had assumed that setting the input format's extradata fields were enough but that was not the case. 2. The input and o...
I have avcodec opening an rtsp stream. It reads packets from the stream and then I copy them over to the buffer that I send to the input of the decoder. The extradata is copied over from avcodec as well. The packet returned by avcodec contains NAL units. The first NAL unit contains the SPS, PPS, and...
I'm using avcodec to read packets from an h264 rtsp stream and I am trying to decode with the mmal h264 decoder. I could send packets but not receive any. I verified that the packets being sent are valid NAL packets with the leading 0x00000001 start code. I formed format_in->extradata using avcodec'...
I finally have a working solution to writing mp4 files with pps and sps info in the avcc atom of the mp4 header using avcodec. It's a lot of work to get rid of one "Error while decoding frame!" but I learned a lot from it. I have a question for the devs though. I haven't written a parser for convert...
Well it seems a bit more complicated than I thought. MMAL sends annex b type NAL units and the header config bytes are actually SPS and PPS NAL units. Without these, the video will not play. Mplayer tries to decode the SPS and PPS but errors, however, this makes subsequent frames decodable. In the M...
I setup the container reader this way: (taken from mmalplay) //CONTAINER READER SETUP MMAL_STATUS_T status = MMAL_EINVAL; MMAL_COMPONENT_T *reader = 0; if (mmal_component_create(MMAL_COMPONENT_DEFAULT_CONTAINER_READER,&reader) != MMAL_SUCCESS ){ fprintf(stderr,"Could not create reader component\n");...
Seems I just need the leading NAL unit (MMAL_BUFFER_HEADER_FLAG_CONFIG) to be saved once, at the beginning of the file but after the MP4 header. This got rid of the "Error while decoding frame!" errors that were repeating regularly. There is now only one such error at the beginning from having the C...
I've been doing some research on this and as far as I can understand, it seems all you have to do is to save the data buffers you receive from the encoder to a file. Basically, after you have setup the encoder and receiving encoded packets in the output buffer. Init_MP4("camera.mp4"); //In the loop ...
I assume this is for writing containers such as mp4, avi,etc. Basically feed it a buffer in the format of whatever encoding format it is set at. Is there an example code for creating this component and enabling it? I would assume that it is created like any other component, with setting input and ou...
I spotted the problem in my code. vc.ril.isp does work with no issues now. I was sending it an I420 frame from avcodec but with the wrong buffer size ( size was based on output dimensions instead of input dimensions so data gets truncated except when input and output dimensions are the same. ) Thank...
the encoded size is specified on the OUTPUT port Could you elaborate on this? I don't see any difference with specifying just width and height or vcos aligned width and height in either format_out->es->video or format_out->es->video.crop. When sending a resolution such as 640x360 with format I420 t...
It seems the problem is with vc.ril.isp. If the output port resolution is different from the input port resolution, it does not return any buffers. It allows a port commit, port enable and component enable with no complaints. I tried saving PPM and JPEG and both work if the resolution is not changed...
I tried connecting vc.ril.isp to the jpeg encoder and if I dont change the output dimensions of vc.ril.isp to a new resolution, then the jpeg encoder returns a valid jpeg buffer. If I change the output resolution of vc.ril.isp, then jpeg encoder does not return any buffers. This works, creating vali...
I am seeing a green band on the lower border of jpeg images I created using the hardware jpeg encoder when the resolution is 640x360 which is padded to 640x368. I don't see the band when the resolution is 1280x720 which results in an unpadded buffer. I thought the crop setting when setting video inp...
I tried the example_connections.c program and it uses the default reader to open files. However, it does not open rtsp streams. Is it currently possible to open rtsp streams directly without having to use libavcodec?
I am using "vc.ril.isp". However I am having issues with a particular resolution 704x480 displaying alternating green lines on the Right side. It works fine with 640x360, 1280x720. Here is the code: if ( mmal_component_create("vc.ril.isp", &resizer) != MMAL_SUCCESS) { Fatal("failed to create mmal re...
That kinda took me into the forest with no clear way back. I think what you are saying is that the components will always pick what is appropriate for width and height, aligning as necessary. But to make sure I use the cropped dimensions when reading the buffer data. Am I still in the forest? Incide...
If I understand correctly then the even if the width and height supplied to input format is not a multiple of 32,16 respectively they are rounded up. If I don't set a crop value, the default crop value is automatically the supplied width and height ( not the vcos_aligned values ) ? This is what I se...