Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (106)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire 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 (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (8279)

  • VLC/ffplay can't read some audiotracks created by ffmpeg

    19 juin 2021, par skanarr

    I 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.
Also tmp2.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 in tmp2.mkv.
Also there are working Tracks with the same codecs on tmp2.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 Phoeniqz

    The 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 Bennet

    I 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)