Ask Your Question
0

how to save and upload video in opencv

asked 2020-01-07 08:11:48 -0500

Fahad Ahmed gravatar image

updated 2020-01-07 08:43:11 -0500

I am working on project in which i need to open recorded video from folder i can upload video using opencv code but i want to make code which will open video from folder using file browser and assign it to cv2.videoCapture automatically so i dont have to change code for each video i want to upload. what should i do make a function or declare a variable? kindly help anyone

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-01-07 12:53:06 -0500

mvuori gravatar image

You need to do two _very basic_ things: 1) Make your code, often its main function, accept as command line argument the video's filename and place that into a variable that you pass to videoCapture, instead of a hardcoded filename 2) Use your operating system's tools to pass the selected file's path to the program. Depending on the OS and file browser, the options may include: configuring your app as default app for the video's file type, selecting Open with in the file browser's context menu, dragging the file into the app's icon, configuring a Send To link

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-01-07 08:11:48 -0500

Seen: 156 times

Last updated: Jan 07 '20