18:05
I'm trying to allow the user to export the scene as an mp4 (video format), the items of the scene consists of QGraphicsVideoItem and multiple QGraphicsTextItem, I need to export the scene as it will allow the user to save the video with the text items. I've found one of the ways to do this but the issue is that it will take hours for a simple 5 seconds videos as it saves every image to a byte to create a video, every image is a millisecond. If I change from millisecond to seconds it could speed up but the video will not look as smooth, is there a more efficient way of doing (...)
13:49
I am running ffmpeg as a subprocess and using the stderr to get various bits of data like the subtitles stream Id's. It works fine for most videos, but one with japanese subtitles results in an error:
'charmap' codec can't decode byte in position xxx : character maps to
Much googling suggests the problem is that the japanese requires unicode, whereas English does not. Solutions offered refer to problems with files, and I cannot find a way of doing the same with the stderr. Relevent Code is below:
command = (...)
13:31
import os
import speech_recognition as sr
command = "ffmpeg -i videototext.mp4 videototext.mp3"
os.system(command)
commandwav = "ffmpeg -i videototext.mp3 videototext.wav"
os.system(commandwav)
AUDIO_FILE = "videototext.wav"
r = sr.Recognizer()
videototext = sr.AudioFile(AUDIO_FILE)
with videototext as source:
audio = r.record(source, duration=100)
print(type(audio))
print(r.recognize_google(audio))
above is my code,then the error is: Audio file could not be read as PCM WAV, AIFF/AIFF-C, or (...)
05:55
How can I launch ffplay on the second monitor in full screen mode?
I need to play a video file while analyzing video player output to get current position in the file being played.