Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (83)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip 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, 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 (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (8762)

  • Handling multiple line subtitles of Right aligned languages(arabic) in Moviepy

    24 décembre 2023, par Stanger Danger

    I am trying to add Arabic subtitles on a video using Moviepy. The issue I'm facing is related to alignment of Arabic text, as it progresses from right to left, instead of left to right in English language.

    


    enter image description here

    


    As text length gets more and more, Moviepy trims the words from both ends, this issue can be resolved if we break the text into multiple lines. This works well for English language but for Arabic, the first line becomes the last line because of the (Right-Left)alignment.

    


    enter image description here

    


    The text on Second line should come first on the first line at the start, while end chuck of first text towards the left corner should render on the second line, but it is getting rendered as English language, Left to right alignment.

    


    Here is my code :

    


    def add_subtitles(address_subtitles, address_video):
  video = VideoFileClip(address_video)
  generator = lambda txt: TextClip(txt, font='Arial', fontsize=22, color='black', stroke_width=2, method='caption', align='south', size=video.size)
  subtitles = SubtitlesClip(address_subtitles, generator)
  #print()

  result = CompositeVideoClip([video, subtitles.set_pos(('center','bottom'))])
  result.write_videofile("arabic_with_hardcoded_subtitles_3.mp4", fps=video.fps, temp_audiofile="temp-audio.m4a", remove_temp=True, codec="libx264"
  , audio_codec="aac")


    


  • FFMPEG : Add additional audio track to video file

    29 décembre 2016, par Lukas

    I have two video file with the following streams :

    File 1 :

    Stream #0:0(deu) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
    Stream #0:1(deu) : Audio : ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2(eng) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4971 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 5994 tbc (default)
    Stream #0:3 : Video : mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 480x480 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    

    File 2 :

    Stream #0:0(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
    Stream #0:1(eng) : Audio : ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2(eng) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4925 kb/s, 23.98 fps, 23.98 tbr, 23976 tbn, 47952 tbc (default)
    Stream #0:3(eng) : Subtitle : eia_608 (c608 / 0x38303663), 1920x1080, 0 kb/s
    Stream #0:4 : Video : mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 480x480 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    

    Both files have exactly the same video content , but the first video has a german audio track and the second one an english audio track.

    How can I extract the audio track from the german video file and add it to the english one, without losing the english subtitles and being able to choose between these audio tracks in a media player ?

    I searched about this and I found multiple answers to similar questions, but none of them worked : Some included only one audio track and some played both of them at the same time.

    I’m not sure if this question should be asked on Super User, but as there are alrealy many questions about ffmpeg on Stack Overflow, I asked it here.

  • ffmpeg HLS Multiple Audio Renditions

    28 mai 2020, par sylvain

    How can I convert an mp4 video file having inside 3 audio tracks (english, german and french) to an HLS playlist having :

    



      

    • one videofile.m3u8 and its corresponding segmentsfile.ts
    • 


    • one audiofile-english.m3u8 and its corresponding segmentsfile.aac
    • 


    • one audiofile-german.m3u8 and its corresponding segmentsfile.aac
    • 


    • one audiofile-french.m3u8 and its corresponding segmentsfile.aac
    • 


    • one masterfile.m3u8 like that :
    • 


    



    #EXTM3U

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="medium",NAME="#1 Fre",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="fre",URI="medium/planete_interdite_500_h264_240p_audio1_fre.m3u8"

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="medium",NAME="#2 Eng",DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="eng",URI="medium/planete_interdite_500_h264_240p_audio2_eng.m3u8"

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="medium",NAME="#3 Fre",DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="de",URI="medium/planete_interdite_500_h264_240p_audio1_de.m3u8"

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3274000, CODECS="avc1.66.30,mp4a.40.2",RESOLUTION=854x480,AUDIO="medium"
medium/planete_interdite_2080_q264_480p.m3u8