Skip to content

Instantly share code, notes, and snippets.

View bmabir17's full-sized avatar
🎯
Focusing

B M Abir bmabir17

🎯
Focusing
View GitHub Profile
@bmabir17
bmabir17 / webcam_capture.py
Created February 2, 2019 19:17
ffmpeg webcam campture
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)
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);