问题
I am running kinesis_video_gstreamer_sample_app.cpp on MacOS and it streams to AWS Kinesis from FaceTime (iSight) camera. How can I switch the video source to a USB Webcam? Thanks :)
回答1:
Ok, I figured it out finally, modify the file kinesis_video_gstreamer_sample_app.cpp as follows.
Change:
if (data.encoder) {
data.source = gst_element_factory_make("autovideosrc", "source");
To:
if (data.encoder) {
data.source = gst_element_factory_make("avfvideosrc", "source");
g_object_set(G_OBJECT(data.source), "do-timestamp", TRUE, "device-index", 1, NULL);
来源:https://stackoverflow.com/questions/50352759/how-to-change-video-source-in-amazon-kinesis-video-gstreamer-sample-app-cpp