gst-omx decoding H264 from Logitech C920 stream

joao machado 00jmsmachado at gmail.com
Tue Apr 7 09:42:45 PDT 2015


Hi Paulo.

I recently tested with that camera and I did not have that issues.

It seems u are having transport problems and the decoder is having problems
to render.

Additionaly I am having some decoding quality issues with omx with an web
cam.

Here is the post

"Hi all,

I tried to find the answer for my problem in the raspberry pi forum but
without success.

Here is the post

"Hi all,

I am using Rpi and Gstreamer to stream my HD web cam with low latency.
Currently I am using two different encoders for that purpose. With the omx
I am getting some video quality issues and with x264 i am getting high CPU
usage and low frequency.

The following is the pipe with x264 encoder
<http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=106455&p=734508#>gst-launch-1.0
-vv v4l2src ! videoscale !  videorate  ! videoconvert ! \
  video/x-raw,width=1280,height=720,framerate=30/1  ! x264enc bitrate=8000
! \
h264parse !  rtph264pay pt=96 config-interval=1 ! udpsink host=$1 port=$2

The following are pipelines with low latency but with quality issues,
despite the value that is use in the bitrate property.
gst-launch-1.0 -vv v4l2src ! videoscale !  videorate  ! videoconvert ! \
  video/x-raw,width=720,height=480,framerate=30/1  ! omxh264enc
inline-header=true periodicty-idr=1 ! \
video/x-h264,width=720,height=480,framerate=30/1,profile=high,target-bitrate=8000000,control-rate=variable,quant-i-frames=250
! \
rtph264pay pt=96 ! udpsink host=$1 port=$2

gst-launch-1.0 -vv v4l2src  \
image/jpeg,width=1280,height=720,framerate=30/1  ! jpegdec ! videoconvert
! \
video/x-raw,width=1280,height=720  ! videorate !  omxh264enc
inline-header=true periodicty-idr=1 ! \
video/x-h264,width=1280,height=720,framerate=30/1,profile=high,target-bitrate=5000000
! \
rtph264pay pt=96 ! udpsink host=$1 port=$2


Would be really cool to have this working with OMX and understand what is
needed to have better quality.

Looking forward to have some clues from this community.

Thanks in advance,
Joao M."

In the nutshell the x264 plugin has good quality but not enough fps and
with omx encoder I am having some quality issues. "

On Tue, Apr 7, 2015 at 4:35 PM, Paulo Neves <ptsneves at gmail.com> wrote:

> Thornton, Keith: I am not sure I understand what the difference is.
> The sample h264 that was successfully tested can be found in apple's
> site:
>
>
> http://a1408.g.akamai.net/5/1408/1388/2005110403/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_iPod.m4v.zip
>
> In the camera description page it says the camera does AVC h264
> compression:
> http://www.logitech.com/en-gb/product/hd-pro-webcam-c920
>
> If you can tell me a way to peek at this information I can do it.
>
> Regarding the pipelines tried here are some examples, I am sorry I omitted
> them:
>
> I am streaming the camera video from a remote computer with the
> following pipeline:
>
> gst-launch-1.0 -v -e v4l2src device=/dev/video0 !
> video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse !
> rtph264pay pt=127 config-interval=8 ! udpsink host=192.168.1.109
> port=6000
>
> For the h264 video coming from the file the only thing that changes is
> the source of the video on the remote computer and the addition of the
> demuxer:
>
> gst-launch-1.0 -v -e filesrc location=~/Downloads/sample_iPod.m4v !
> qtdemux ! h264parse ! rtph264pay pt=127 config-interval=8 ! udpsink
> host=192.168.1.109 port=6000
>
> Receiving on the Raspberry PI (omx decoder) is done, for both cases
> through this pipeline:
>
> gst-launch-1.0 udpsrc port=6000 !  application/x-rtp, payload=127 !
> rtph264depay ! h264parse ! omxh264dec ! queue ! autovideosink
> sync=false
>
> To test that the omxh264dec works well with the omxh264enc i tried the
> following pipeline:
>
> gst-launch-1.0 videotestsrc ! omxh264enc ! h264parse ! omxh264dec !
> autovideosink sync=false
>
> To further test if different encoders would produce different
> renderings in a remote computer I encoded videotestsrc and apple's
> file(pipeline below) with x264enc:
>
> gst-launch-1.0 -v -e filesrc location=~/Downloads/sample_iPod.m4v !
> qtdemux ! h264parse ! avdec_h264 ! x264enc tune=zerolatency !
> rtph264pay pt=127 config-interval=1 ! queue ! udpsink
> host=192.168.1.109 port=6000
>
> In this test no corruption seemed to appear while preparing the
> pipelines for this email contrary to my previous email. I have not
> tried another movie with more scene change so this might be a fluke.
>
> In the following link you can also find a video of the corruption
> which I am talking about:
> https://youtu.be/JxOvCCan3Ro
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150407/888820ca/attachment-0001.html>


More information about the gstreamer-devel mailing list