From: Carlos Rafael Giani <dv@pseudoterminal.org>
To: meta-freescale@yoctoproject.org
Subject: Re: Gstreamer and Transcode i.mx6
Date: Sun, 28 Dec 2014 17:22:09 +0100 [thread overview]
Message-ID: <54A02E31.8030705@pseudoterminal.org> (raw)
In-Reply-To: <54A02B08.2060709@pseudoterminal.org>
[-- Attachment #1: Type: text/plain, Size: 2464 bytes --]
On 2014-12-28 17:08, Carlos Rafael Giani wrote:
> On 2014-12-28 14:31, Peter Hafner wrote:
>> Hi,
>> I want to trans code 2 different types of streams to h264 codec, on a
>> i.mx6 Dual.
>> First stream is from a STK1160 video device
>> and I'm using this gstreamer commands.
>>
>> gst-launch-1.0 --gst-debug=3 v4l2src device=/dev/video0 !
>> videoconvert ! imxvpuenc_h264 bitrate=4096 !
>> "video/x-h264,stream-format=byte-stream,profile=high" ! h264parse !
>> matroskamux name=mux ! filesink location=output.FIFO -v
>>
>> This is working !
>>
>> The second stream, is a raw jpeg stream via udp.
>> This is the commands, I currently thought it is the best one:
>> gst-launch-1.0 --gst-debug=3 udpsrc buffer-size=1000000 port=5006 !
>> queue ! jpegdec ! videoconvert ! imxvpuenc_h264 bitrate=4096 !
>> "video/x-h264,stream-format=byte-stream,profile=high" ! h264parse !
>> matroskamux name=mux ! autovideosink
>>
>> I got always the error "reason not-negotited (-4). Of course tested a
>> lot.
>>
>> This is working with video test src:
>> #gst-launch-1.0 videotestsrc ! videoconvert ! imxvpuenc_h264
>> bitrate=4096 ! "video/x-h264,stream-format=byte-stream,profile=high"
>> ! h264parse ! matroskamux name=mux ! filesink location=output.FIFO -v &
>> Thanks Peter
>>
>>
>
> With udpsrc, you need to define the caps for the output data
> explicitely. Check out the "caps" property of udpsrc.
>
> Furthermore, you can replace jpegdec with imxvpudec (it can decode
> motion JPEG). Once you do that, you can remove videoconvert from the
> pipeline, since imxvpudec outputs I420-formatted pixels, which
> imxvpuenc_h264 can use directly.
>
> Also, as a general advice, always try to use one of the transform
> elements instead of videoconvert. The imx(g2d,ipu,pxp)videotransform
> elements use hardware accelerated conversions, while videoconvert does
> conversions with the CPU (and by default also does dithering, which is
> even slower).
>
>
I just noticed another problem: the
"video/x-h264,stream-format=byte-stream,profile=high" caps filter. You
cannot use that, since the VPU encoder only supports the baseline
profile. If that is ok, then simply remove this capsfilter.
Example pipeline:
gst-launch-1.0 --gst-debug=3 udpsrc buffer-size=1000000 port=5006
caps="image/jpeg" ! queue ! imxvpudec ! imxvpuenc_h264 bitrate=4096 !
h264parse ! matroskamux name=mux ! autovideosink
[-- Attachment #2: Type: text/html, Size: 4099 bytes --]
next prev parent reply other threads:[~2014-12-28 16:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-28 13:31 Gstreamer and Transcode i.mx6 Peter Hafner
2014-12-28 16:08 ` Carlos Rafael Giani
2014-12-28 16:22 ` Carlos Rafael Giani [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-12-29 8:01 Peter Hafner
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=54A02E31.8030705@pseudoterminal.org \
--to=dv@pseudoterminal.org \
--cc=meta-freescale@yoctoproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.