Encoding and streaming video+audio to UDP

Peter Maersk-Moller pmaersk at gmail.com
Fri Aug 1 08:48:05 PDT 2014


Hi Dimitri.

You can't select an arbitrary low bitrate and expect a good result.

First you remove ALL your x264enc settings and just add the following:
"tune=zerolatency bitrate=3000". Then you verify your result visibly with
both GStreamer and VLC. If you have a poor result there, then something is
wrong. If you have good result, then test it with flashplayer or whatever
your target is. Now if you still have a good result, then you can start
tuning ONE parameter at a time. Start lowering the bitrate until the result
deteriorates. Then enable/disables parameters that will allowx264enc to do
better. It is assumed you know what the parameters do. Try also to think
about which profiles (main, high etc) the player supports. Then also think
about which levels the player supports. Look at the wikipedia entry for
H.264 for profiles and levels for a starter. Hopefully your player supports
both High Profile and B-frames.

Best regards
Peter




On Fri, Aug 1, 2014 at 4:02 PM, dmitrijs2005 <dmitrijs2005 at gmail.com> wrote:

> Peter, thanks for your suggestion, I'll record a file a bit later.
>
> Now, we got new issues:
> 1. When we specify the bitrate in option-string only, looks like gstreamer
> just ignores this setting and bitrate grows up to a value over 2Mbps
> 2. Picture "freezes" sometimes for couple of seconds (slideshow)
> 3. When watching vdeo from our website using Flash Player, the sound always
> starts first, then, after some seconds (sometimes even about 10 seconds),
> video begins
>
> The command now looks like that:
>
> gst-launch-1.0 -e \
> mpegtsmux alignment=7 name=mux ! \
> rndbuffersize max=1316 min=1316 ! \
> udpsink host=127.0.0.1 port=5000 sync=false \
> decklinksrc mode=10 name=src \
> src. ! audio/x-raw ! queue !  audioconvert ! \
> voaacenc bitrate=128 ! aacparse ! mux. \
> src. -v ! deinterlace ! videoconvert ! videorate ! videoconvert !
> videoscale
> ! videoconvert ! video/x-raw, format=\(string\)I420, framerate=25/1,
> width=656, height=368 ! aspectratiocrop aspect-ratio=16/9 ! queue !
> videoconvert ! \
> x264enc bitrate=872 tune=zerolatency
>
> option-string="me=umh:direct=auto:keyint=25:scenecut=0:bitrate=872:vbv-maxrate=872"
> ! h264parse ! mux.
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Encoding-and-streaming-video-audio-to-UDP-tp4668052p4668140.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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/20140801/2a04370f/attachment.html>


More information about the gstreamer-devel mailing list