Re: coda: Unable to use encoder video_bitrate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Philipp,

Le 18/12/2014 17:52, Philipp Zabel a écrit :
Hi Frédéric,

Am Donnerstag, den 18.12.2014, 17:44 +0100 schrieb Frédéric Sureau:
Hi

I am trying to use the coda encoder through Gstreamer on an iMX6-based
board.

I use the (rebased and slightly modified) gstv4l2h264enc plugin from:
https://github.com/hizukiayaka/gst-plugins-good

This pipeline works fine:
gst-launch-1.0 -vvv v4l2src device=/dev/video4 !
"video/x-raw,width=1280,height=720" ! videoconvert ! v4l2video0h264enc !
h264parse ! mp4mux ! filesink location=test.mp4

When encoder has no bitrate param set (default=0), video encoding works
well, but bitrate reaches ~2.5Mbps

When I try to set the bitrate with whatever value like 100,000 or
1,000,000, the encoder produces video with bitrate around 480kbps and a
very poor quality.

Here is the gstreamer pipeline I use with bitrate set:
gst-launch-1.0 -vvv v4l2src device=/dev/video4 !
"video/x-raw,width=1280,height=720" ! videoconvert ! v4l2video0h264enc
extra-controls="controls,video_bitrate=1000000;" ! h264parse ! mp4mux !
filesink location=test.mp4

The video_bitrate control seems to be correctly passed to the driver by
GStreamer since I can see the VIDIOC_S_CTRL call.

Any idea ?
There is a bug in the register definitions that causes the driver to
apply a wrong mask before writing the bitrate to the register.
I've got a fix for this in the pipeline, sending it right now.

regards
Philipp

Thanks for the patch!
It works fine now after forcing framerate to 30fps (which seems to be hardcoded in the driver)

Fred
--
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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux