Webcam-streaming von Mac mit FFmpeg

Ich will-stream meiner webcam vom Mac mit FFmpeg.

Zuerst überprüfte ich die unterstützten Geräte mit ffmpeg -f avfoundation -list_devices true -i ""

Ausgabe:

[AVFoundation input device @ 0x7fdf1bd03000] AVFoundation video devices:
[AVFoundation input device @ 0x7fdf1bd03000] [0] USB 2.0 Camera #2
[AVFoundation input device @ 0x7fdf1bd03000] [1] FaceTime HD Camera
[AVFoundation input device @ 0x7fdf1bd03000] [2] Capture screen 0
[AVFoundation input device @ 0x7fdf1bd03000] [3] Capture screen 1
[AVFoundation input device @ 0x7fdf1bd03000] AVFoundation audio devices:
[AVFoundation input device @ 0x7fdf1bd03000] [0] Built-in Microphone

Dem Gerät[0] ist die webcam, die ich verwenden möchten.


Dann habe ich versucht die webcam über ffmpeg -f avfoundation -i "0" out.mpg

Ausgabe:

[avfoundation @ 0x7fe7f3810600] Selected framerate (29.970030) is not supported by the device
[avfoundation @ 0x7fe7f3810600] Supported modes:
[avfoundation @ 0x7fe7f3810600]   320x240@[120.101366 120.101366]fps
[avfoundation @ 0x7fe7f3810600]   640x480@[120.101366 120.101366]fps
[avfoundation @ 0x7fe7f3810600]   800x600@[60.000240 60.000240]fps
[avfoundation @ 0x7fe7f3810600]   1024x768@[30.000030 30.000030]fps
[avfoundation @ 0x7fe7f3810600]   1280x720@[60.000240 60.000240]fps
[avfoundation @ 0x7fe7f3810600]   1280x1024@[30.000030 30.000030]fps
[avfoundation @ 0x7fe7f3810600]   1920x1080@[30.000030 30.000030]fps
[avfoundation @ 0x7fe7f3810600]   320x240@[30.000030 30.000030]fps
[avfoundation @ 0x7fe7f3810600]   640x480@[30.000030 30.000030]fps
[avfoundation @ 0x7fe7f3810600]   800x600@[20.000000 20.000000]fps
[avfoundation @ 0x7fe7f3810600]   1024x768@[6.000002 6.000002]fps
0: Input/output error

Danach versuchte ich stream die webcam von meinem Mac aus mit ffmpeg -f avfoundation -framerate 30 -i "0" -f mpeg1video -b 200k -r 30 -vf scale=1920:1080 http://127.0.0.1:8082/

Ausgabe:

[avfoundation @ 0x7f8515012800] An error occurred: The activeVideoMinFrameDuration passed is not supported by the device.  Use -activeFormat.videoSupportedFrameRateRanges to discover valid ranges.0: Input/output error

Kann ich nicht aufnehmen oder streamen diese webcam. Aber wenn ich die Facetime-Kamera anstelle dieses webcam, es war alles OK. Ich habe lange gesucht für dieses problem für ein paar Tage, ist aber immer noch nicht beheben. Hat jemand Erfahrung mit der webcam und FFmpeg auf Mac?

InformationsquelleAutor Galaxy | 2016-06-22
Schreibe einen Kommentar