Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (100)

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

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP 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 (6275)

  • 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