Getting troubles in setting the framerate when saving a video.
I've been playing around with Gstreamer (1.0) for a month more or less, and
right now I'm really having a hard time in setting the framerate of a
v4l2src. I show you my pipeline and then I explain you what happens instead
of what I expect.
In this way it works.
Now the problem for me is that instead of videotestsrc I switch on v4l2src,
and natively I can't force its framerate, meaning that even if I pass caps
framerate=5/1 it only changes the metadata, leaving the framerate of the
video the native one, and if I try to save the video with a lower framerate
it does not work anymore.
The couple of pipelines which do not work are:
gst-launch-1.0 v4l2src device=/dev/video0 !
video/x-raw, width=640, height=480, format=YUY2 !
*even if I force the framerate here it doesn't work
shmsink socket-path=/tmp/foo sync=true
It saves a corrupted file impossible to be opened with vlc. Instead if I
force the framerate adding "framerate=5/1" to the caps of the pipeline which
writes in the shared memory from v4l2src it saves a video with the metadata
saying 5fps, but when I watch the video I see that the framerate keeps being
the native one...
Now the aim of this is to save the initial input in the shared memory at
native framerate in order to have eventually a real-time streaming of the
camera, but then when I save the video I would like to drop the framerate
down to 5/1 in order not to have a video which is too big. Any idea on how
to solve this? Which is the codec I should use in order to have the lowest
size for the saved video?
Thanks in advance...hoping to clarify my doubts here!