Jeroen Ooms
2018-10-08 23:03:46 UTC
I would like to capture the screen in MacOS. This works via the command line:
Command line: ffmpeg -f avfoundation -i "1" -pix_fmt yuv420p -r 25
-t 5 out.mov
However I can't figure out how to do this in C. I tried the following,
but it gives an error "Device selection unsupported.".
AVBufferRef *capture;
AVDictionary *opts = NULL;
av_dict_set(&opts, "video_device_index", "1", 0);
av_dict_set(&opts, "audio_device_index", "none", 0);
av_hwdevice_ctx_create(&capture, AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
"avfoundation", opts, 0);
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with s
Command line: ffmpeg -f avfoundation -i "1" -pix_fmt yuv420p -r 25
-t 5 out.mov
However I can't figure out how to do this in C. I tried the following,
but it gives an error "Device selection unsupported.".
AVBufferRef *capture;
AVDictionary *opts = NULL;
av_dict_set(&opts, "video_device_index", "1", 0);
av_dict_set(&opts, "audio_device_index", "none", 0);
av_hwdevice_ctx_create(&capture, AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
"avfoundation", opts, 0);
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with s