Webcam streaming from Mac using FFmpeg

前端 未结 2 893
挽巷
挽巷 2021-02-02 03:33

I want to stream my webcam from Mac using FFmpeg.

First I checked the supported devices using ffmpeg -f avfoundation -list_devices true -i \"\"

Outp

相关标签:
2条回答
  • 2021-02-02 04:06

    I experienced the same problem trying to stream a Logitech C920 webcam where streaming of the built in FaceTime camera works fine.

    I found that reducing the frame rate stopped the error message you reported from being displayed. Here is the command I used to get my webcam working (where the same command with a frame rate of 30 did not work).

    ffmpeg -f avfoundation -framerate 10 -pixel_format yuyv422 -i "0" out.avi
    

    From the video formats your webcam supports it looks like the following command could work. Though as I do not have the same webcam this may not resolve your issue.

    ffmpeg -f avfoundation -framerate 6 -i "0" -target pal-vcd test.mpg
    

    I hope this helps you find a solution.

    0 讨论(0)
  • 2021-02-02 04:11

    '-framerate' is needed

    you can have a try

    ffmpeg -f avfoundation -framerate 30 -i "0" -target pal-vcd ./test.mpg

    0 讨论(0)
提交回复
热议问题