Error in video scaling

JPM jpmelian at gmail.com
Sat Sep 28 13:59:43 PDT 2013


Hi,

Let me tell you something about the server side.

The server is a Raspberry Pi and it sends two video streams from a single
source (camera 1024x768) using this pipeline :

raspivid -t 999999 -w 1024 -h 768 -fps 60 -hf -b 2000000 -o - |
gst-launch-1.0 -e fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 !
tee name=t ! queue ! udpsink host=192.168.1.140 port=5001 t. ! queue !
udpsink host=192.168.1.152 port=5001

The first video stream targets a Windows PC where there is not any problem
with its CPU processing capacity
and the second one targets a Android device.

Is it possible to downscale the second video stream in the server side
using "videoscale ! video/x-raw, width=320, height=240" (Gstreamer 1.0).

Thanks and regards.


2013/9/28 Tim-Philipp Müller <t.i.m at zen.co.uk>

> On Sat, 2013-09-28 at 13:04 +0200, JPM wrote:
>
> Hi,
>
> > There are not errors with the changes you suggest but it seems that
> > the scaling process is not working because
> > the video has lot of artifacts and this happen when Galaxy mini 2
> > mobile phone receives video with a resolution
> > greater than 320x240.
>
> Well, you are both decoding and scaling in software here on an embedded
> system. First thing to check: do you get artefacts if you don't scale as
> well. Secondly: add an gstrtpjitterbuffer and/or a queue after udpsrc -
> otherwise udp packets will be dropped if the decoding/scaling takes too
> long, and then you'll get artefacts. This might happen in any case if
> decoding/scaling takes too much cpu.
>
> Cheers
>  -Tim
>
> > 2013/9/28 Tim-Philipp Müller <t.i.m at zen.co.uk>
> >         On Fri, 2013-09-27 at 14:30 +0200, JPM wrote:
> >
> >         Hi,
> >
> >         > The Android device (Samsung Galaxy mini 2, Android 2.3.6) is
> >         receiving
> >         > a video stream H264 over RTP over UDP.
> >         > The video resolution is 1024x768 but I want to downscaling
> >         it to
> >         > 320x240 with this pipeline :
> >         >
> >         >
> >         > data->pipeline = gst_parse_launch("udpsrc port=5001 !
> >         > application/x-rtp, payload=96 ! rtph264depay ! ffdec_h264 !
> >         > videoscale ! video/x-raw, width=320, height=240 !
> >         autovideosink
> >         > sync=false", &error);
> >         >
> >         >
> >         > It does not work, there is the following error : Unable to
> >         build
> >         > pipeline: could not link videoscale0 to autovideosink0
> >
> >
> >         I'm guessing that you're using the old 0.10 version and not
> >         the new
> >         official GStreamer 1.0 SDK packages from
> >         http://gstreamer.freedesktop.org/pkg/android/
> >
> >         The format for raw audio/video caps was slightly different in
> >         0.10. You
> >         are using the 1.0-style caps here in your pipeline.
> >
> >         Try something like:
> >
> >         udpsrc port=5001 ! application/x-rtp, payload=96 !
> >         rtph264depay !
> >
> >         ffdec_h264 ! videoscale !
> >         video/x-raw-yuv,width=320,height=240 !
> >         ffmpegcolorspace ! autovideosink sync=false
> >
> >         (in case you ever do want to show the stream with proper sync
> >         I would
> >         suggest you also add a gstrtpjitterbuffer after the udpsrc).
> >
> >         Cheers
> >          -Tim
> >
> >
> >         _______________________________________________
> >         gstreamer-android mailing list
> >         gstreamer-android at lists.freedesktop.org
> >         http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
> >
> >
> > _______________________________________________
> > gstreamer-android mailing list
> > gstreamer-android at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>
>
> _______________________________________________
> gstreamer-android mailing list
> gstreamer-android at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20130928/03302162/attachment.html>


More information about the gstreamer-android mailing list