Recherche avancée

Médias (91)

Autres articles (101)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

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

Sur d’autres sites (11516)

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

    


  • How can I call m3u8 with multiple audio

    26 février 2020, par desmeit

    I have the following playlist.m3u8 with multiple audio :

    #EXTM3U
    #EXT-X-VERSION:3

    #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="fr",NAME="France",AUTOSELECT=NO,URI="fr/test.m3u8"
    #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="en",NAME="English",AUTOSELECT=NO,URI="en/test.m3u8"

    #EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=360x640,AUDIO="audio"
    640p.m3u8
    #EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=480x842,AUDIO="audio"
    842p.m3u8
    #EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=720x1280,AUDIO="audio"
    1280p.m3u8
    #EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1080x1920,AUDIO="audio"
    1920p.m3u8

    if I only call the URL http://XXX.playlist.m3u8, the french audio file is played automatically. I know that the selection of the language in the native player at Apple is displayed like this :

    enter image description here

    Is there an additional possibility to select the language for example by parameters ?

    http://XXX.playlist.m3u8?LANGUAGE=DE for example

    And is it possible to run two audio files in parallel ?