linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Sureau" <frederic.sureau@vodalys.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>,
	Fabio Estevam <festevam@gmail.com>,
	linux-media <linux-media@vger.kernel.org>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>
Subject: Re: coda: Unable to use encoder video_bitrate
Date: Mon, 22 Dec 2014 16:24:20 +0100	[thread overview]
Message-ID: <549837A4.2060605@vodalys.com> (raw)
In-Reply-To: <1418921549.4212.57.camel@pengutronix.de>

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

  parent reply	other threads:[~2014-12-22 15:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 16:44 coda: Unable to use encoder video_bitrate Frédéric Sureau
2014-12-18 16:52 ` Philipp Zabel
2014-12-18 16:55   ` Jean-Michel Hautbois
2014-12-18 17:09     ` Philipp Zabel
2014-12-18 17:10       ` Jean-Michel Hautbois
2014-12-19 10:28         ` Philipp Zabel
2014-12-19 10:33           ` Jean-Michel Hautbois
2014-12-22 15:24   ` Frédéric Sureau [this message]
2014-12-22 15:28     ` Nicolas Dufresne
2014-12-22 16:02     ` Philipp Zabel
2014-12-22 16:06       ` Nicolas Dufresne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=549837A4.2060605@vodalys.com \
    --to=frederic.sureau@vodalys.com \
    --cc=festevam@gmail.com \
    --cc=jean-michel.hautbois@vodalys.com \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).