Gstreamer plugins do not handle I420 format
Peter Maersk-Moller
pmaersk at gmail.com
Thu Jan 12 19:27:58 UTC 2017
Hi fearle....
You need to get your buffer sizes correct and you may want some queues. And
you need to get the udp packet size rirght.
This works for me.
gst-launch-1.0 filesrc
location=./big_buck_bunny_720p_H264_AAC_25fps_3400K.MP4 ! decodebin !
shmsink socket-path=/tmp/feed1-control-pipe shm-size=100000000
wait-for-connection=1
GST_DEBUG=mpegtsmux:5 gst-launch-1.0 -v \
shmsrc socket-path=/tmp/feed1-control-pipe do-timestamp=true
is-live=true !\
'video/x-raw,format=I420,width=1280,height=720,framerate=25/1' !\
identity silent=0 ! queue !\
videoconvert ! x264enc !\
h264parse ! queue ! mpegtsmux !\
queue ! chopmydata min-size=1316 max-size=1316 !\
udpsink host=127.0.0.1 port=4012 sync=true
There are probably more you can do.
Regards
Peter
On Thu, Jan 12, 2017 at 5:54 PM, fearlessszk <fearlessszk at hotmail.co.jp>
wrote:
> I am using Gstreamer to stream a video file to shmsink and then out to
> network with udpsink but only does so if the caps-specified format when
> reading from shmsrc is BGRA.
>
> Here are my pipelines:
>
> sudo gst-launch-1.0 filesrc
> location=/home/me/files/Snowmix-0.5.1/test/big_buck_
> bunny_720p_H264_AAC_25fps_3400K.MP4
> ! decodebin ! shmsink socket-path=/tmp/feed1-control-pipe
> shm-size=10000000
> wait-for-connection=0
>
> This pipeline reads the file specified and outputs it to a shared memory
> sink.
>
> sudo GST_DEBUG=mpegtsmux:5 gst-launch-1.0 shmsrc
> socket-path=/tmp/feed1-control-pipe do-timestamp=true is-live=true !
> 'video/x-raw, format=I420, max-input-size=200000, width=320, height=720,
> framerate=25/1' ! videoconvert ! x264enc ! mpegtsmux ! udpsink
> host=192.168.78.10 port=4012 sync=true
>
> This pipeline read from the shared memory source and attempts to output via
> UDP. In the above pipeline we can see that I have specified the format of
> the video to be I420 which is indeed the encoding of the video file.
> However, it seems that there is zero interaction at the mpegtsmux plugin
> which should reformat the stream as an mpeg transport stream.
>
> Changing the format from I420 to BGRA even though the file itself is
> encoded
> as I420 then allows us to see interaction at the mpegtsmux plugin. The
> video
> is output and can be played back on VLC but the formatting is clearly wrong
> and plays oddly.
>
> Note: The pipeline above specifies a resolution of width=320 and height=720
> because increasing it to the normal width=1280 and height=720 with BGRA
> causes the following error:
>
> WARNING: from element /GstPipeline:pipeline0/
> GstVideoConvert:videoconvert0:
> Internal GStreamer error: code not implemented. Please file a bug at
> http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
> Additional debug info:
> gstvideofilter.c(292): gst_video_filter_transform ():
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0:
> invalid video buffer received
> Using the normal resolution with I420 does not produce the above error but
> again does not pass the stream past the mpegtsmux plugin in the pipeline.
>
> Why is it that streams identified as I420 when reading from the shmsrc do
> not pass through my pipeline successfully? Is there a compatibility issue
> with x264enc or videoconvert and I420? Is my pipeline missing something?
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.
> n4.nabble.com/Gstreamer-plugins-do-not-handle-I420-format-tp4681428.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170112/94b9a056/attachment.html>
More information about the gstreamer-devel
mailing list