
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (47)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7594)
-
h264 : move initing the implicit pred weight table out of h264_slice_header_parse()
14 avril 2016, par Anton Khirnov -
discord.py. FFmpegPCMAudio. Applying filters to running source FFmpeg sub-procces
23 janvier 2024, par Vladimir BlanvenHow can I apply a new filter (e.g. the same afade) to source, after running voice.play(source) at any time, without killing the current one and creating a new ffmpeg sub-process ? For instance the user will call a voice.pause() command, after which the afade=t=out filter will be applied to the current timestamp, and only then will the source audio be stopped.


start_time = datetime.now()
audio_path = os.path.join(CURRENT_DIRECTORY, MUSIC_FOLDER_NAME, audiofile)
audio_long = MP3(audio_path)
end_time = int(audio_long.info.length)
before_options= f'-ss 0:00:00'
options = f'-af "afade=t=in:st=0:d={FADE_DURATION}, afade=t=out:st={end_time-FADE_DURATION}:d={FADE_DURATION}"'
source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(source=audio_path, executable=FFMPEG_EXECUTABLE_FILE_PATH, before_options=before_options, options=options))
voice.play(source)



For now I have this kinda premitive sort of construction (simulating linear afade=t=out effect) :


volume = 1.0
for _ in range(FADE_DURATION * 10):
 volume -= (1.0 / (FADE_DURATION * 10.0)
 voice.source.volume = volume
 await asyncio.sleep(SLEEP_DURATION)



-
Synchronize video subtitle with text-to-speech voice
8 décembre 2015, par AhmadI try to create a video of a text in which the text is narrated by text-to-speech.
To create the video file, I use the
VideoFileWriter
ofAforge.Net
as the following :VideoWriter = new VideoFileWriter();
VideoWriter.Open(CurVideoFile, (int)(Properties.Settings.Default.VideoWidth),
(int)(Properties.Settings.Default.VideoHeight), 25, VideoCodec.MPEG4, 800000);To read aloud the text I use
SpeechSynthesizer
class and write the output to a wave streamAudioStream = new FileStream(CurAudioFile, FileMode.Create);
synth.SetOutputToWaveStream(AudioStream);I want to highlight the word is spoken in the video, so I synchronize them by the
SpeakProgress
event :void synth_SpeakProgress(object sender, SpeakProgressEventArgs e)
{
curAuidoPosition = e.AudioPosition;
using (Graphics g = Graphics.FromImage(Screen))
{
g.DrawString(e.Text,....);
}
VideoWriter.WriteVideoFrame(Screen, curAuidoPosition);
}And finally, I merge the video and audio using
ffmpeg
using (Process process = new Process())
{
process.StartInfo.FileName = exe_path;
process.StartInfo.Arguments = string.Format(@"-i ""{0}"" -i ""{1}"" -y -acodec copy -vcodec copy ""{2}""",
avi_path, mp3_path, output_file);
......The problem is that for some voices like Microsoft Hazel, Zira and David, the video is not synchronized with the audio, and the audio is much faster than the shown subtitle. In windows 7, it works for
Mircrosoft Sam
How can I synchronize them so that it works for any text-to-speech voices ?