I'm working on an application where I need to capture hours of continuous
video, and then later upload specific time windows to a remote machine. Because the video data is large, and this system will be collecting for months, everything has to be compressed. My first attempt was to use two threads to avoid dropping frames - the first has a very simple pipeline with no compression, while the second performs the compression. Here is the pipeline I would want to run on the first: gst-launch-1.0 v4l2src num-buffers=300 ! video/x-raw,framerate=30/1 ! filesink location=myFile This command would be run in a loop to capture a sequence of files. Unfortunately, while this should capture 300/30 = 10s of video, it takes 30s to execute. That means I'm losing a huge amount of video before the next iteration of the loop can start. I looked into splitmuxsink, but get a message that it doesn't exist, even though I have all the plugins installed. It seems that gstreamer must be powerful enough for me to access the buffered, raw video and select chunks of it to save as the buffer fills, but there aren't any examples with anything close to this that I can find. How would others recommend going about this goal? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
The gst-launch command you posted is saving raw video data to file. Not sure if that's actually what you want, because you said "everything has to be compressed". That might be the reason why it's so slow. 发件人: gstreamer-devel <[hidden email]> 代表 redpanda <[hidden email]>
发送时间: 2017年10月25日 10:59 收件人: [hidden email] 主题: Save camera to multiple files in real time I'm working on an application where I need to capture hours of continuous
video, and then later upload specific time windows to a remote machine. Because the video data is large, and this system will be collecting for months, everything has to be compressed. My first attempt was to use two threads to avoid dropping frames - the first has a very simple pipeline with no compression, while the second performs the compression. Here is the pipeline I would want to run on the first: gst-launch-1.0 v4l2src num-buffers=300 ! video/x-raw,framerate=30/1 ! filesink location=myFile This command would be run in a loop to capture a sequence of files. Unfortunately, while this should capture 300/30 = 10s of video, it takes 30s to execute. That means I'm losing a huge amount of video before the next iteration of the loop can start. I looked into splitmuxsink, but get a message that it doesn't exist, even though I have all the plugins installed. It seems that gstreamer must be powerful enough for me to access the buffered, raw video and select chunks of it to save as the buffer fills, but there aren't any examples with anything close to this that I can find. How would others recommend going about this goal? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by redpanda
On Wed, Oct 25, 2017 at 2:59 AM, redpanda <[hidden email]> wrote:
> I'm working on an application where I need to capture hours of continuous > video, and then later upload specific time windows to a remote machine. > Because the video data is large, and this system will be collecting for > months, everything has to be compressed. > > My first attempt was to use two threads to avoid dropping frames - the first > has a very simple pipeline with no compression, while the second performs > the compression. Here is the pipeline I would want to run on the first: > > gst-launch-1.0 v4l2src num-buffers=300 ! video/x-raw,framerate=30/1 ! > filesink location=myFile > > This command would be run in a loop to capture a sequence of files. > Unfortunately, while this should capture 300/30 = 10s of video, it takes 30s > to execute. That means I'm losing a huge amount of video before the next > iteration of the loop can start. > You need to look at multifilesink [1] instead of filesink, set the properties on when to start a new file. This will make sure it wont drop any frames, and you dont need to run it in a loop. [1] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--max-file-duration Cheers, --Prabhakar Lad _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |