PiCapture hd1: control fps through v4l2-ctl

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1598
    eth
    Participant

    Is it possible to set the fps of the stream that’s outputted to /dev/video0 through v4l2-ctl?
    I would like to receive a constant 30fps stream that I can feed into ffmpeg and stream to youtube without reencoding.

    I would like to run something like this:

    v4l2-ctl –set-parm=30

    ffmpeg -f video4linux2 -input_format h264 -video_size 1920×1080 -i /dev/video0 \
    -acodec pcm_s16le -f s16le -i /dev/zero \
    -ac 1 -acodec aac -ar 44100 -ab 128k -strict experimental \
    -vcodec copy \
    -f flv rtmp://a.rtmp.youtube.com/live2/*

    And be sure that I have a 30fps stream (not less or more).

    • This topic was modified 2 years, 6 months ago by eth.
    • This topic was modified 2 years, 6 months ago by eth.
    • This topic was modified 2 years, 6 months ago by eth.
    • This topic was modified 2 years, 6 months ago by eth.
    #1603
    mwlinder
    Keymaster

    The PiCapture HD1 will attempt to deliver the video stream at the same frame rate that it receives. There are some limitations in the ability of the Raspberry Pi to handle the encoding of 60fps video, and so there would be some dropped frames at that rate. Other than that, the frame rate is determined by the source.

    There is a “frame skip” option for the HD1, which causes exactly 1/2 of the received frames to be sent over the camera interface to the GPU. This means that if there is a 60fps video source there would be 30fps delivered to the Raspberry Pi. If you can set your source to 60fps you might be able to achieve what you want that way.

    I don’t know if v4l2 provides control over the frame rate, and would suggest asking the v4l2 community about this. We have used v4l2 with PiCapture successfully.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ethhd1: control fps through v4l2-ctl