
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (34)
-
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 (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (3880)
-
Anomalie #3451 (Nouveau) : Pas de JS, pas de plugins
18 mai 2015, par nico dReprise d’un mail sur la liste zone :
Dans SVP, avec javascript désactivé, on ne peut pas installer un plugin, le bouton "Télécharger et activer" n’apparait pas du tout.
Il faudrait plutôt qu’il soit toujours présent, et masqué par javascript au chargement tant qu’on a rien coché (amélioration progressive).Maïeul :
on pourrait même carrément ne jamais le masquer. Parce que là on se dit "tiens je ne peux pas activer" et puis on s’apercoit que si uniquement après avoir coché.
Rastapopoulos :
Oui. Masquer, je me dis que ça peut être utile quand ça vire vraiment beaucoup de choses, ce qui permet d’alléger une interface, comme par exemple dans Gmail où plein de boutons n’apparaissent qu’après avoir sélectionnés des emails.
Mais là il s’agit d’un unique bouton, en bas (et même s’il était aussi en haut ou fixed).
Une possibilité pourrait être de le montrer mais inactif, grisé, si rien n’est sélectionné. Et le rendre cliquable de nouveau quand il y a une sélection. -
do something with script output
3 novembre 2017, par Opolo WebdesignI’m lazy :) so I would like to automate some things on my network. Currently I’m running a script that automatically downloads the series I watch every week. Based on what is downloaded another script searches the web for subtitles. Some downloads however have subtitles with them, so searching for subtitles is not necessary. I would like to check every download for subtitles and get notified (or better move the file) if the file has the correct subtitles.
I started with the following :
find /volume2/Downloads/ -type f -mmin -30 | while IFS= read -r file; do
ffmpeg -i "${file}"
doneThis works and shows me the output of the ffmpeg command for each file newer than 30 minutes. I would like to work with the result given by ffmpeg so that when certain characters are present in the output, I’m notified via mail. My Linux scripting skills however stop at the script I got. I’m a web developer so I understand the logic behind a script like this, but not the specific code or commands.
Characters that I’m looking for :
- (eng) : Subtitle :
- (dut) : Subtitle :
Can this be done ?
Edit :
I did some more research and did some changes to my script :
find /volume2/Downloads/ -type f -mmin -60 | while IFS= read -r file; do
if ffmpeg -i "${file}" | grep -q '(dut): Subtitle:'; then
echo "matched"
fi
doneInstead of "matched" it shows the ffmpeg output, but it’s probably a step in the right direction ?
-
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