hi all,
I am using imx535 qsb , in that i interface a camera application and i need to record the live streaming video to the server, now the camera is streaming but i cant able to record it, can any one help me.
Thanks
shan
hi parrish,
i had recorded the live streaming video by using the following command
COMMAND1:
gst-launch udpsrc port=5000 caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)6, config=(string)000001b006000001b59113000001000000012000c888800f528045a14103, payload=(int)96, ssrc=(guint)424830278, clock-base=(guint)2874253685, seqnum-base=(guint)43950" ! gstrtpjitterbuffer ! rtpmp4vdepay ! tee name=mpgvideo ! queue ! ffdec_mpeg4 ! ffmpegcolorspace ! videoscale ! autovideosink mpgvideo. ! queue ! ffdec_mpeg4 ! ffmpegcolorspace ! avimux ! filesink location=mympg.mp4
NOTE: In command 1 we just decode the video and storing to the server PC in this method the size of the video is too large
for eg: size of 1 min video is 2gb
COMMAND2:
gst-launch udpsrc port=5000 caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)6, config=(string)000001b006000001b59113000001000000012000c888800f528045a14103, payload=(int)96, ssrc=(guint)424830278, clock-base=(guint)2874253685, seqnum-base=(guint)43950" ! gstrtpjitterbuffer ! rtpmp4vdepay ! tee name=mpgvideo ! queue ! ffdec_mpeg4 ! ffmpegcolorspace ! videoscale ! autovideosink mpgvideo. ! queue ! ffdec_mpeg4 ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux ! filesink location=my1mpg.mp4
NOTE: In this command we encoding the video coming form the camera. In this method the video occupies less storage
for eg: for 1min video it occupies 7mb
I need to record the video without encoding and i need the space occupied by the video want to be less, is there any possible method ? if it so can you help me
thanks,
shan
The only thing that I have to offer is that you could try looking through each plugins parameters by executing a gst-inspect. For example: gst-inspect filesink
Will show you parameters like location. If you do the same for the ffenc_mpeg4 you should be able to find different parameters that will help you accomplish what you want (obviously this will take some testing).
You can use GStreamer, e.g.:
<capture_block > ! avimux ! filesink
Capture block depend on stream type, e.g.:
udpsrc multicast-group=224.1.4.6 port=5000 ! caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96, encoding-name=(string)H264" ! rtph264depay ! avimux ! filesink
thanks for your reply
i am using gstreamer only in that i achieved the live streaming, the live video is streaming in gst-launch window, i want to record that video and store into the server, now i am using the following command for live streaming
NOTE: in this command the video is streaming but not recording to the particular location or folder, what i want to do for recording this live video simultaneously?
COMMAND:
IN TARGET BOARD
gst-launch mfw_v4lsrc fps-n=30 capture-width=1280 capture-height=720 capture-mode=4 ! queue ! mfw_vpuencoder codec-type=0 ! rtpmp4vpay ! udpsink host=192.168.0.50 port=5000
IN THE SERVER PC:
gst-launch udpsrc port=5000 caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)6, config=(string)000001b006000001b59113000001000000012000c888800f528045a14103, payload=(int)96, ssrc=(guint)424830278, clock-base=(guint)2874253685, seqnum-base=(guint)43950" ! gstrtpjitterbuffer ! rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! videoscale ! autovideosink
thanks
shan
Hi Shanmugam,
What you would want to do is look into using the tee plugin.
tee allows you to do a 1-N translation.
For instance your stream would look something like this (I haven't tested this, but I think it would work):
gst-launch udpsrc port=5000 caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)6, config=(string)000001b006000001b59113000001000000012000c888800f528045a14103, payload=(int)96, ssrc=(guint)424830278, clock-base=(guint)2874253685, seqnum-base=(guint)43950" ! gstrtpjitterbuffer ! rtpmp4vdepay ! tee name=mpgvideo ! ffdec_mpeg4 ! ffmpegcolorspace ! videoscale ! autovideosink .mpgvideo ! queue ! filesink location=mympg.mpg
This way you could RX video, save the compressed version and output raw video to the screen.
Hi jparrish,
I tried your command but its not working it shows the error message
WARNING: erroneous pipeline: could not link autovideosink0 to queue0
thanks
shan
Try
gst-launch udpsrc port=5000 caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)6, config=(string)000001b006000001b59113000001000000012000c888800f528045a14103, payload=(int)96, ssrc=(guint)424830278, clock-base=(guint)2874253685, seqnum-base=(guint)43950" ! gstrtpjitterbuffer ! rtpmp4vdepay ! tee name=mpgvideo ! queue ! ffdec_mpeg4 ! ffmpegcolorspace ! videoscale ! autovideosink .mpgvideo ! queue ! filesink location=mympg.mpg
Again, I don't have a way to run this, sorry.
hi parrish,
agian same problem reflects
WARNING: erroneous pipeline: could not link autovideosink0 to queue1
the autovideosink could not able to link the queue and also the another sink
Please check the tee documentation to double check the correct usage (I think the autovideosink mpgvideo. instead of autovideosink .mpgvideo) . Also, when the pipeline is not 'linking', it means that there is a mismatch between caps (a src cap and a sync cap), so I recommend to start running your pipeline just with the source element (in your case, the udpsrc), then add one by one the rest of the elements; this way, you will find out which element is not linking correctly. Also, you can use the built-in debug capabilities in GSTREAMER, you can either add the parameter '-v' or '--gst-debug=*<element name>*:5', that way you get more info what the error means.
Hello, shanmugamsundar
As I see you output video on screen, gstreamer element autovideosink. Please try my example for write strean in file, important elements - avimux and filesink, avimux pack input data in AVI, filesink write intput to file.
I am not sure if this helps, but take a look of this document
https://community.freescale.com/docs/DOC-93804
It is camera streaming BUT under a i.MX6Q platform.