
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (48)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (10616)
-
How to insert bullet screen comments into a video by using ffmpeg ?
7 septembre 2019, par Saeron MengI would like to add some real-time comments in my video but I do not know how to use ffmpeg to realize this. The comments are like screen bullets through the screen, scrolling from right to left.
My thought is to count the length of the comments and define speeds for them to move. Don’t worry about the source of the comments, I have already gotten them saved as an xml file. Also, I can transfer it into srt. For instance :
<chat timestamp="671.195">
<ems utctime="1562584080" sender="Bill">
<richtext></richtext>
</ems>
</chat>
<chat timestamp="677.798">
<ems utctime="1562584086" sender="Jack">
<richtext></richtext>
</ems>
</chat>The final result is like this (I did not find an example displayed in English), these fancy characters can move horizontally :
I have searched some solutions on the Internet, most of which talk about how to write ass/srt files and add motionless subtitles. Like this :
3
00:00:39,770 --> 00:00:41,880
When I was lying there in the VA hospital ...
4
00:00:42,550 --> 00:00:44,690
... with a big hole blown through the middle of my life,
5
00:00:45,590 --> 00:00:48,120
... I started having these dreams of flying.ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4
But I need another kind of "subtitles" which can move.
So my question is, how to modify the ffmpeg command and the template of srt file so as to arrange the subtitles from the top to the bottom and let them move from right to left ?
-
VLC/ffplay can't read some audiotracks created by ffmpeg
19 juin 2021, par skanarrI have two different
.mkv
files of the same movie. One contains the English, German, Italian, Spanish and French audio and subtitle tracks, the other contains Japanese Audio and Subtitle tracks. Since I want to have all tracks in one file I tried to 'merge' them using :

$ ffmpeg -i "Assassin's Creed (2016).mkv" -i "./Other/Assassin's Creed_t13.mkv" -map 0:v -map 0:a -map 1:a:2 -map 0:s -map 1:s:1 -map 1:s:2 -map 1:s:3 -c:v copy -c:s copy -c:a copy tmp2.mkv



Full Command Output from ffmpeg


However playing it in VLC none of the Tracks from
./Other/Assassin's Creed_t13.mkv
are working properly.
There are short periods where there is audio and then it is gone again for some minutes.
Alsotmp2.mkv
freezes at 4:44 and freezes VLC for some time, before only audio continues top play.
Looking under Messages this is what I got : All Message from VLC
(Messages were set to display warnings and errors)

I don't know what I did wrong. The Japanese tracks are working in
./Other/Assassin's Creed_t13.mkv
.
The all non-japanese Tracks are still working intmp2.mkv
.
Also there are working Tracks with the same codecs ontmp2.mkv
(dts) as well as subtitles (pgs).

I then tried playing it with ffplay and got the same result.
Whenever i switched the audiotrack to stream 7 (the japanese audio)
It said
non A-V: non
in the little progress bar instead of the usual numbers.

-
How can I automate the subtitle adding process in FFMPEG ?
23 septembre 2022, par PhoeniqzThe situation is, that I have 10 MP4 videos and a folder for each of them that has the same name as its video. In each of folders there are around 30 SRT files I need to add. I would like to automate this. I mean a script that would add each SRT file to the video and add the correct handler for the subtitles, so that the subtitle would appear as "English" instead of "Subtitle #12" in a movie player. I made a python script ; it's far from perfect and it does not add the handlers correctly.


The name of each SRT file is something like "20_Hebrew.srt"





import os
file_dir = r"Path/to/my/files"
sub_dir = file_dir + "/Subs"


def add_sub(file, file_name):
 cmd = f"ffmpeg -i '{file}' "
 sub_list = []

 no_extension = file_name.replace(".mp4", "")

 for sub_name in os.listdir(sub_dir + f"/{no_extension}"):
 s = os.path.join(sub_dir + f"/{no_extension}", sub_name)

 if os.path.isfile(s):
 cmd += f"-i '{s}' "
 sub_list.append(s)
 
 cmd += "-map 0:v -map 0:a "

 for i, v in enumerate(sub_list):
 cmd += f"-map {i+1} "
 
 cmd += "-c:v copy -c:a copy "

 for i, v in enumerate(sub_list):
 sub_lang = v.replace(".srt", "")
 index = sub_lang.index(f"/Subs/")
 sub_lang = sub_lang[index:]
 index = sub_lang.index("_")
 sub_lang = sub_lang[index+1:]

 cmd += f"-c:s:{i} mov_text -metadata:s:s:{i} language='{sub_lang}' -metadata:s:s:{i} handler='{sub_lang}' "

 cmd += f"'{file}_OUTP.mp4'"

 os.system(cmd)

for file_name in os.listdir(file_dir):
 f = os.path.join(file_dir, file_name)

 if os.path.isfile(f):
 add_sub(f, file_name)