Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (65)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (7395)

  • Why are rectangular boxes ([]) showing instead of text in burned subtitles when using ffmpeg/MoviePy on Google Colab ?

    14 mai, par Lavish

    I'm working on a Python script that adds subtitles to a video using MoviePy and burns/hardcodes them directly onto the video. The subtitles contain Hindi text, and I’ve specified a custom font that supports Devanagari (Hindi) script.

    


    The code works perfectly fine on my local machine, the subtitles appear correctly with Hindi characters. However, when I run the same code on Google Colab, the subtitles display as rectangular boxes (something like this -> [][][]) instead of proper characters.

    


    Things I've tried :

    


      

    • Ensured the font used supports Hindi (I'm using NotoSansDevanagari-Regular.ttf renamed as font.ttf).
    • 


    • Uploaded the font to Colab and specified the full path correctly.
    • 


    • Verified that the text is passed as a proper Unicode string.
    • 


    


    Here's the code snippet :

    


    def add_subtitles(video_path, subtitles_path, output_path):
    """Adds subtitles using FFmpeg with proper path escaping."""
    # Convert to absolute paths and normalize
    
    video_path = os.path.abspath(video_path)
    subtitles_path = os.path.abspath(subtitles_path)
    output_path = os.path.abspath(output_path)


    # Subtitle path
    font_path = "input_files/font.ttf"
    font_path = os.path.abspath(font_path).replace("\\", "\\\\")
    subtitles_path_escaped = os.path.abspath(subtitles_path).replace("\\", "\\\\")
    
    # Escape backslashes in paths
    subtitles_path = subtitles_path.replace("\\", "\\\\")
    # Remove all files in final_videos
    [os.remove(os.path.join(base_dir, "final_videos", f)) for f in os.listdir(os.path.join(base_dir, "final_videos")) if os.path.isfile(os.path.join(base_dir, "final_videos", f))]

    os.makedirs(os.path.dirname(output_path), exist_ok=True)
    escaped_path = subtitles_path.replace(':', '\\:').replace('\\', '\\\\')

    cmd = [
    "ffmpeg",
    "-i", video_path,
    "-vf", f"subtitles={escaped_path}:force_style='FontFile={font_path}'",
    "-c:v", "libx264",
    "-c:a", "copy",
    "-preset", "fast",
    "-crf", "22",
    output_path
]


    # Debug: Print the exact command being executed
    print("Executing:", " ".join(cmd))
    try:
        subprocess.run(cmd, check=True, capture_output=True, text=True)
        print(f"✅ Success! Output saved to: {output_path}")
    except subprocess.CalledProcessError as e:
        print(f"❌ FFmpeg failed with error:\n{e.stderr}")



    


    What could be causing this issue on Colab, and how can I get non-English subtitles (like Hindi) to render properly when burning subtitles using MoviePy/ffmpeg in a Colab environment ?

    


  • Set minimal ts duration in ffmpeg command

    22 août 2017, par Ales

    We are using ffmpeg to convert mp4 video file to hls.
    When video is converted, it sometimes happens that last ts chunk is about 0.03s. And player stalls on this chunk for a while. Is there a special command in ffmpeg to set minimal ts duration ? Or other way to avoid such ts chunks ?
    In our command to set up ts duration we use : -segment_time  5

  • Minimal patch for G.729 demuxer

    29 octobre 2011, par Vladimir Voroshilov

    Minimal patch for G.729 demuxer