
Recherche avancée
Autres articles (79)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (15051)
-
ffmpeg : change alpha channel of a showwaves filter [on hold]
15 février 2014, par ZnuffI've been trying to figure this issue out for a few hours and I can't seem to find any solution.
I'm creating a video from an .mp3 and some images with the following command
fmpeg.exe -y -i temp\audio.mp3 -loop 1 -i Bokeh\frame-%03d.png -r 25 -filter_complex "[0:a] showwaves=size=1280x100:mode=line:r=25[wave];[1:v][wave] overlay=y=H-h:eval=init[canvas];[canvas]drawtext=fontfile='./tools/impact.ttf':fontsize=42:text='ORGANIKISMNESS':x=20:y=(h-170-text_h*2.20):fontcolor=white:shadowy=2:shadowx=2:shadowcolor=black,drawtext=fontfile='./tools/impact.ttf':fontsize=42:text='RETURN TO THE SOURCE PT.2 (ORGANIKISMNESS REMIX)':x=20:y=(h-170-text_h):fontcolor=white:shadowy=2:shadowx=2:shadowcolor=black" -shortest -acodec copy -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -tune stillimage -crf 19 -movflags faststart "videos\Organikismness-Return to the Source Pt.2 (Organikismness Remix).mp4"
I'm trying to make the [wave] (showwaves) filter have some sort of alpha channel, to be slightly transparent to be overlayed on the rest of the video later.
So far I've tried the
blend
filter, but this complains that the sources are not the same size (one is 1280x720, the showwaves source is 1280x100).I tried the
colorchannelmixer
filter, but I couldn't figure out how this should work.Anyone has any idea how to do it ?
-
FFmpeg : Add alpha channel to a video using a PNG mask
7 avril 2016, par Rodrigo PoloI saw that FFmpeg can merge/blend two videos with alpha channel and can encode video with alpha channel using the
qtrle
codec, but, It is possible to apply a PNG file mask, either a black and white or a PNG with an alpha channel to a video in order to have a video with the alpha channel of the PNG applied ?Here is the concept in images
PNG file with alpha channel, the "mask" :
Or even a black and white image as a mask for alpha channel :
Any help would be appreciated, thank you !
-
Accented characters are not recognized in python [closed]
10 avril 2023, par CorAnnaI have a problem in the python script, my script should put subtitles in a video given a srt file, this srt file is written by another script but in its script it replaces the accents and all the particular characters with a black square symbol with a question mark inside it... the problem I think lies in the writing of this file, what follows and that in overwriting the subtitles I do with ffmpeg the sentences that contain an accented word are not written


def video_audio_file_writer(video_file):

 videos_folder = "Video"
 audios_folder = "Audio"

 video_path = f"{videos_folder}\\{video_file}"

 video_name = Path(video_path).stem
 audio_name = f"{video_name}Audio"

 audio_path = f"{audios_folder}\\{audio_name}.wav"

 video = mp.VideoFileClip(video_path)
 audio = video.audio.write_audiofile(audio_path)

 return video_path, audio_path, video_name

 def audio_file_transcription(audio_path, lang):

 model = whisper.load_model("base")
 tran = gt.Translator()

 audio_file = str(audio_path)

 options = dict(beam_size=5, best_of=5)
 translate = dict(task="translate", **options)
 result = model.transcribe(audio_file, **translate) 

 return result

def audio_subtitles_transcription(result, video_name):

 subtitle_folder = "Content"
 subtitle_name = f"{video_name}Subtitle"
 subtitle_path_form = "srt"

 subtitle_path = f"{subtitle_folder}\\{subtitle_name}.{subtitle_path_form}"

 with open(os.path.join(subtitle_path), "w") as srt:
 # write_vtt(result["segments"], file=vtt)
 write_srt(result["segments"], file=srt)
 
 return subtitle_path

def video_subtitles(video_path, subtitle_path, video_name):

 video_subtitled_folder = "VideoSubtitles"
 video_subtitled_name = f"{video_name}Subtitles"
 video_subtitled_path = f"{video_subtitled_folder}\\{video_subtitled_name}.mp4"

 video_path_b = bytes(video_path, 'utf-8')
 subtitle_path_b = bytes(subtitle_path, 'utf-8')
 video_subtitled_path_b = bytes(video_subtitled_path, 'utf-8')

 path_abs_b = os.getcwdb() + b"\\"

 path_abs_bd = path_abs_b.decode('utf-8')
 video_path_bd= video_path_b.decode('utf-8')
 subtitle_path_bd = subtitle_path_b.decode('utf-8')
 video_subtitled_path_bd = video_subtitled_path_b.decode('utf-8')

 video_path_abs = str(path_abs_bd + video_path_bd)
 subtitle_path_abs = str(path_abs_bd + subtitle_path_bd).replace("\\", "\\\\").replace(":", "\\:")
 video_subtitled_path_abs = str(path_abs_bd + video_subtitled_path_bd)

 time.sleep(3)

 os.system(f"ffmpeg -i {video_path_abs} -vf subtitles='{subtitle_path_abs}' -y {video_subtitled_path_abs}")

 return video_subtitled_path_abs, video_path_abs, subtitle_path_abs

if __name__ == "__main__":

 video_path, audio_path, video_name = video_audio_file_writer(video_file="ChiIng.mp4")
 result = audio_file_transcription(audio_path=audio_path, lang="it")
 subtitle_path = audio_subtitles_transcription(result=result, video_name=video_name)
 video_subtitled_path_abs, video_path_abs, subtitle_path_abs = video_subtitles(video_path=video_path, subtitle_path=subtitle_path, video_name=video_name)
 
 print("Video Subtitled")



Windows 11
Python 3.10