
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 (60)
-
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 -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (13403)
-
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)


-
Stream mp4 videos in different languages (ExpressJs)
23 mars 2021, par BennetI use the following code to stream videos (just in my local network). In my mp4 files are several audio tracks with different languages. Is it possible to select a specific audio track to stream ? For example, that you specify a language as query parameter in the URL, and the streamed video has the selected audio track.


Example 1 :

URL : "localhost/video ?lang=en"

Video : English audio track

Example 2 :

URL : "localhost/video ?lang=de"

Video : German audio track

Maybe you can remove all unneeded audio tracks in the stream with ffmpeg (https://www.npmjs.com/package/ffmpeg) ?


Working expressjs code/example :
https://betterprogramming.pub/video-stream-with-node-js-and-html5-320b3191a6b6
(https://gist.github.com/BetterProgramming/3bf5d66b0285a2690de684d46c4cabb4#file-app-get-js)