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.