Save video from h264 camera into 3 files of 5 minutes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Save video from h264 camera into 3 files of 5 minutes

robogil
Hi All,

I have a h264 with which I would like to have:
1. use kvssink (kinesis video stream) for streaming
2. save video from the camera into local files, so that every 5 mins a new
file will be created instead of the oldest one - without killing the stream.

The pipe I am currently using for streaming and recording (single file) is:

 *gst-launch-1.0 -v v4l2src device=/dev/video1 do-timestamp=true ! h264parse
!
video/x-h264,stream-format=avc,alignment=au,width=1280,height=720,framerate=15/1
! tee name=t \
        t. ! queue ! kvssink name=sink stream-name=${CLOUD_ID}_rc
access-key=$AWS_ACCESS_KEY_ID secret-key=$AWS_SECRET_ACCESS_KEY
retention-period=4320 \
        t. ! queue ! flvmux ! filesink location=/myvideos/mycam.flv


*Is there a way to limit the size of the file so that a new file will be
created when it reaches the cap?
for some reason, even though it is h264 video, I get quite large files, is
there a way to optimize it without a major decrese of resolution / framerate
?

Thank you!

Gil



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Save video from h264 camera into 3 files of 5 minutes

Tim Müller
On Mon, 2020-03-30 at 04:55 -0500, robogil wrote:

Hi,

2. save video from the camera into local files, so that every 5 mins a new
file will be created instead of the oldest one - without killing the stream.

(snip)
*Is there a way to limit the size of the file so that a new file will be
created when it reaches the cap?

Check out the splitmuxsink element:
https://gstreamer.freedesktop.org/documentation/multifile/splitmuxsink.html?gi-language=c#splitmuxsink-page

Cheers
 Tim
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel