<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">Hi,</span><div style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">
I am trying to forward a video between two GStreamer pipelines by using shmsink/shmsrc, and make the receiving side to encode the video. </div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></div>
<div style="font-family:arial,sans-serif;font-size:12.666666984558105px">The following is a command line for the sending side:</div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">
gst-launch-0.10 -v videotestsrc \</div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px"> ! 'video/x-raw-yuv, format=(fourcc)"I420", framerate=30/1, width=1280, height=720' \</div>
<div style="font-family:arial,sans-serif;font-size:12.666666984558105px"> ! shmsink socket-path=/tmp/xxx shm-size=10000000 wait-for-connection=0 sync=false<br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">The following is a command line for the receiving side:<br><div><br></div><div><div>gst-launch-0.10 -v shmsrc socket-path=/tmp/xxx \</div>
<div> ! 'video/x-raw-yuv, format=(fourcc)"I420", framerate=30/1, width=1280, height=720' \</div><div> ! x264enc</div><div> ! filesink location=/tmp/yyy</div></div><div><br></div><div>A problem is that nothing is recorded. It seems that the pipeline is not rolling. The below shows the output message:</div>
<div><br></div><div><div>Setting pipeline to PAUSED ...<br></div><div>Pipeline is PREROLLING ...</div><div>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720</div>
<div>/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)014d401fffe10018674d401feca02802dd8088000003000bb9aca00078c18cb001000468ebecb2, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)main</div>
<div>/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720</div></div><div><br></div><div>When I remove x264enc as below, the pipeline is rolling and the output file, /tmp/yyy is increasing.</div>
<div><br></div><div><div>gst-launch-0.10 -v shmsrc socket-path=/tmp/xxx \</div><div> ! 'video/x-raw-yuv, format=(fourcc)"I420", framerate=30/1, width=1280, height=720' \</div><div> ! filesink location=/tmp/yyy</div>
</div><div><br></div><div>Interestingly the output message below shows "New clock: GstSytemclock" which was not shown previously.</div><div><br></div><div><div>Setting pipeline to PAUSED ...</div><div>Pipeline is PREROLLING ...</div>
<div>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720</div><div>/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720</div>
<div>Pipeline is PREROLLED ...</div><div>Setting pipeline to PLAYING ...</div><div>New clock: GstSystemClock</div></div><div><br></div><div>I have no idea why the pipeline does not work with x264enc. Any help will be really appreciated.</div>
<div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Cheolho</div></div></div>