Hi ! 2015-05-07 15:53 GMT+02:00 Jean-Michel Hautbois <jean-michel.hautbois@xxxxxxxxxxxx>: > > Hi, > > I am playing a bit with the coda encoder on i.MX6 and try to get the > most quality out of it. So, I am trying to use the controls of the > driver, in particular h264_i_frame_qp_value and h264_p_frame_qp_value. > > I can get something with the following pipeline : > gst-launch-1.0 -evvv v4l2src num-buffers=2000 > device=/dev/v4l/by-path/ipu1-capture io-mode=dmabuf ! > "video/x-raw,width=1280,height=720,framerate=25/1,format=YUY2" ! > v4l2convert device=/dev/v4l/by-path/ipu1-scaler capture-io-mode=dmabuf > output-io-mode=dmabuf-import ! > 'video/x-raw,width=640,height=360,format=NV12' ! v4l2video0h264enc > output-io-mode=dmabuf-import > extra-controls="controls,h264_i_frame_qp_value=24,h264_p_frame_qp_value=30,video_gop_size=32" > ! queue ! progressreport name=p2 ! h264parse ! matroskamux ! filesink > location=/data/test_encode_360p.mkv > > With those values, I get ~800kbps for a 360p converted frame. This is nice :). > The same video as an input with only the "bitrate" parameter set is > not visually similar. > > But, when trying to encode a 720p video with the same QP parameters, > it is not working (the first keyframe is not ok, seems to be a P frame > instead of I, as it is 2000 bits and should be ~40000). I am keeping > the videoscaler in this second case, as it should be used as a color > converter. > > Philipp, did you do some tests like this one ? Did you observe that > the encoder can maybe be too long to get a frame encoded when desired > quality is "high" ? I have done more tests, and it seems to be related to the bitrate we asked, and the input resolution... Right now, I have a 360p@5Mbps, which works perfectly, and the same source, in 720p with a bitrate up to 3Mbps is ok. But when I go higher, I miss the I frames on some GOPs (very frequently the second one). I don't know if there is some limitations to what the CODA can do, but 1080p30 seems impossible @4Mbps at least... ? Thanks for your advices ! JM -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html