Recherche avancée

Médias (1)

Mot : - Tags -/intégration

Autres articles (91)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (10275)

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

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