I am making a screen recorder which captures the screen and simultaneously also records the audio from microphone(input) with the help of a python script.
I am using Pillow and opencv library to record screen and using pyaudio library to record audio.
I have created a Gui using tkinter for this screen recorder(shown in image below).
So to start screen and audio recording i used buttons to start and stop different functions of scripts.
Now the problem is that duration of video file(screen recording) and the audio file(using pyaudio) is different.
ex. if user click on screen rec button and after 20-50 sec later click on voice rec button or vice-verse.
The time duration of both the file is different and can't be merge the audio and video file properly.
How can I overcome this situation?
Related
We are now working on a thesis based on drowsiness detection within a car. Our code is on a while loop and every time it detects up to 5 or more seconds to be driver is drowsy, the GUI must show up to alert the user that the car is slowly breaking. My problem is while the opencv webcam is runnning (for the drowsiness detection), the tkinter GUI won't show up. Is there any way to like overlap the tkinter window from the webcam frame running in the background?
I am new to Python and I am stuck with Tkinter. I have a video running in the background, and I need a label to pop up which contains dynamically changing content. I tried it with tkinter and EasyGUI. The contents are getting printed, but it causes my video to pause. I had to close the pop-up each time, for the video to keep running. I guess the tkinter thread is blocking the video playing thread.
I'd like to have the following setup:
Background video in seamless loop
preload x videos and keep them paused or in memory until needed
x dependent on videos in certain folder (create library)
trigger video based on filename by a serial command (2x 1byte)
keep background video running (FHD or 720p, depending on performance of pi 3 B+)
play triggered video on top, should be played instantly or with very low delay
How could i achieve this the optimal way?
Greetings,
Dom
I want to make Queue Management application using Raspberry pi. I want to design my window using tkinter. On that window I want some portion will show the token no and counter no and other portion will show videos. How could i embed video on my window. Other functions I could manage easily but no idea about video. Please help me how could i embed video in my window.
I am trying to change the video of omx player in python based on an event. But the problem is the next video gets loaded only after the first video finishes.
import os
os.system('omxplayer video1.mp4')
if(flag==1):
os.system('omxplayer video2.mp4')
Is there a way to interrupt video1 in middle of playback and start second video.
Note:I am working on a raspberrypi with debian wheezy and python 2.7
Omxplayer has keyboard controls so you could send the corresponding keystroke q to stop it normally before opening the next instance. Here is a similar post where a person tried to achieve similar feature, it could be helpful.