This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess as sp | |
import time | |
while(True): | |
sp.call('ffmpeg -f v4l2 -framerate 25 -t 4 -video_size 640x480 -i /dev/video0 ./webcam_output.mp4 -y',shell=True) | |
print('Video Captured') | |
time.sleep(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io' as Io; | |
import 'package:image/image.dart'; | |
void main(){ | |
//Read an image from file | |
//You can also use other file format like jpeg, webp,TIFF, PSD, GIF | |
var imageFile = new Io.File('test.png').readAsBytesSync(); | |
//decodeImage will identify the format of the image and | |
// decode the image accordingly | |
Image image = decodeImage(imageFile); |
NewerOlder