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