From v4l2src to tcp.

Yaroslav yaroslavrakhnenko at gmail.com
Tue Feb 9 10:06:39 UTC 2016


Hi!
I use *gst version 0.10.32* + *OMAP board (Angstrom GNU/Linux v2013.02)*. I
can't update gst, or update linux ver. Need  pass video to port5000 and
write it on files (~10 min)
Now i use it

/while true; do

     sync
     # Kill previous gst process
     kill `ps ax | grep gst | grep -v "grep" | awk '{print $1}'`
	
     # Launch new recorder
     gst-launch-0.10 v4l2src device=/dev/video2 ! capsfilter
caps="video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=625,framerate=(fraction)25/4"
! videocrop top=49 ! deinterlace mode=1 fields=1 ! videoscale ! capsfilter
caps="video/x-raw-yuv,width=360,height=270" ! ffmpegcolorspace ! tee name=d
! queue ! ffenc_mjpeg bitrate=2000000 ! multipartmux ! tcpserversink
port=5000 d. ! queue ! avimux ! filesink location=/media/usb/$(date
+"%Y.%m.%d_%H:%M:%S").avi &

     sleep 600
done /
 

but after 600 sec video stream on port ends in a few seconds (until the next
gst start). Video in file write successfully. I think, that i can read video
from port with  tcpclientsrc port=5000 and put it in  my files. like this:

/gst-launch-0.10 v4l2src device=/dev/video2 ! capsfilter
caps="video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=625,framerate=(fraction)25/4"
! videocrop top=49 ! deinterlace mode=1 fields=1 ! videoscale ! capsfilter
caps="video/x-raw-yuv,width=360,height=270" ! ffmpegcolorspace ! tee name=d
! queue ! ffenc_mjpeg bitrate=2000000 ! multipartmux ! tcpserversink
port=5000 d. ! queue ! avimux ! tcpserversink port=1234 &

while true; do
     kill `ps ax | grep tcpclientsrc | grep -v "grep" | awk '{print $1}'`
	
     # Launch new recorder
     gst-launch-0.10 tcpclientsrc port=1234 ! capsfilter
caps="video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=625,framerate=(fraction)25/4"
! videocrop top=49 ! deinterlace mode=1 fields=1 ! videoscale ! capsfilter
caps="video/x-raw-yuv,width=360,height=270" ! ffmpegcolorspace ! avimux !
filesink location=/media/mmcblk1p1/$(date +"%Y.%m.%d_%H:%M:%S").avi &

     sleep 600
done /

but it not work!(
Help me, please...




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/From-v4l2src-to-tcp-tp4675730.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list