Change Frames Per Second for VLC Stream

16,687

Adding 'fps=' to the transcode part should set the framerate: #transcode{vcodec=theo,vb=256,fps=10}

Share:
16,687
robjohncox
Author by

robjohncox

Currently a Python & Django full stack software engineer in a biotech startup. Previously worked with Java and C# in a big corporation. Spend around half my time working on build, deployment and automated testing setups (which I seem to enjoy more than most) and the other half crafting code. Like a lot of people around here, I really love my job.

Updated on June 23, 2022

Comments

  • robjohncox
    robjohncox almost 2 years

    We are currently experimenting with streaming a webcam attached to one of our Linux servers (Ubuntu 12.04) using VLC, and although we are able to successfully stream the video and view it remotely, we need to change the number of frames per second (which is defaulting to 24). We are currently using the following command to create the stream:

    vlc v4l2:// :v4l2-dev=/dev/video0 \
                :v4l2-width=640 \
                :v4l2-height=480 -- \
                sout="#transcode{vcodec=theo,vb=256}:standard{access=http,mux=ogg,dst=:8090}" \
                -I dummy
    

    Would someone be able to show us how to modify this to change the number of frames per second? We have searched online and trawled through the VLC documentation and have been unable to find a solution.

    Update

    The fps parameter was pointed out to us but sadly this didn't fix the issue - output from running the command shown below (there are some other errors in there, but the stream is running fine despite those, we are just focused on changing the frame rate for now).

    $ vlc -v v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=640 :v4l2-height=480 --sout="#transcode{vcodec=theo,vb=256,fps=1}:standard{access=http,mux=ogg,dst=:8090}" -I dummy
    VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
    [0x14d0758] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
    [0x14d0758] main interface error: no suitable interface module
    [0x14d0758] main interface error: no suitable interface module
    [0x13f3108] main libvlc error: interface "globalhotkeys,none" initialization failed
    [0x14d0758] dummy interface: using the dummy interface module...
    [0x7f9f6c005518] mux_ogg mux: Open
    [0x7f9f6c4d1a58] rawvideo decoder warning: invalid frame rate 0/1000000, using 25 fps instead
    [0x7f9f640009c8] rawvideo generic warning: invalid frame rate 0/1000000, using 25 fps instead
    
  • robjohncox
    robjohncox over 10 years
    Awesome thanks for the response - will give it a try at work later and then send a bounty your way. Also thanks for the --sout param correction - as you may have guessed I'm a total VLC amateur :)
  • TeTeT
    TeTeT over 10 years
    When I started with VLC I found the IRC channel and the documentation to be quite valuable. For the command line streaming, have a look at videolan.org/doc/streaming-howto/en/ch03.html it explains the basics.
  • robjohncox
    robjohncox over 10 years
    Unfortunately this didn't work for us - I have included the specific error in the question content. Looks like the cmd line is perhaps expecting framerate instead of fps (we tried various ways of setting this but had no luck, and couldn't find any docs on the matter).
  • TeTeT
    TeTeT over 10 years
    The syntax 'fps' is correct, the problem is with the input - if you remove the fps altogether the same error pops up on my system.