I'm capturing video clips with my local camera (it's a Raspberry Pi camera) by using the cvlc command line interface. Prior to capturing the video clip, I set the frame-rate of my camera to 10 frames-pre-second. The base command I'm using to capture video clips is as follows:
Code: Select all
cvlc --no-audio \
v4l2:///dev/video0 \
--v4l2-width 1920 \
--v4l2-height 1440 \
--v4l2-chroma MJPG \
--run-time=10 \
--sout file/ogg:/tmp/stream_v01.mpg \
vlc://quit
The file saves and plays back ok in VLC. However, when I view the file's Codec information in VLC, it reports a frame rate of 25 FPS. I have tried to control the rate at which the video is written by adding specifiers to the above command. (In desperation!), I have tried each of the following 12 specifiers:
- --sout-transcode-fps=10
--vc1-fps=10
--sub-fps=10
--rawvid-fps=10
--mjpeg-fps=10
--image-fps=10
--h264-fps=10
--es-fps=10
--shm-fps=10
--screen-fps=10
--vdr-fps=10
--imem-fps=10
To no avail. Each one, when I view its Codec Information in VLC reports 25 FPS. How do I control cvlc to write video to a file with the same frame-rate as the input video stream?
Or, is it possible that I'm using VLC incorrectly to gauge the frame rate? Is there a way to check each clip independent of VLC for the effective frame rate? e.g. Can I back out the total clip length and the number of frames present in each clip so that I may calculate an approximate frame rate?