* Gstreamer and Transcode i.mx6 @ 2014-12-28 13:31 Peter Hafner 2014-12-28 16:08 ` Carlos Rafael Giani 0 siblings, 1 reply; 4+ messages in thread From: Peter Hafner @ 2014-12-28 13:31 UTC (permalink / raw) To: meta-freescale [-- Attachment #1: Type: text/html, Size: 1571 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Gstreamer and Transcode i.mx6 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 0 siblings, 1 reply; 4+ messages in thread From: Carlos Rafael Giani @ 2014-12-28 16:08 UTC (permalink / raw) To: meta-freescale [-- Attachment #1: Type: text/plain, Size: 1892 bytes --] 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). [-- Attachment #2: Type: text/html, Size: 3066 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Gstreamer and Transcode i.mx6 2014-12-28 16:08 ` Carlos Rafael Giani @ 2014-12-28 16:22 ` Carlos Rafael Giani 0 siblings, 0 replies; 4+ messages in thread From: Carlos Rafael Giani @ 2014-12-28 16:22 UTC (permalink / raw) To: meta-freescale [-- 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 --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Gstreamer and Transcode i.mx6 @ 2014-12-29 8:01 Peter Hafner 0 siblings, 0 replies; 4+ messages in thread From: Peter Hafner @ 2014-12-29 8:01 UTC (permalink / raw) To: meta-freescale [-- Attachment #1: Type: text/html, Size: 6428 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-29 8:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 -- strict thread matches above, loose matches on Subject: below -- 2014-12-29 8:01 Peter Hafner
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.