Recherche avancée

Médias (0)

Mot : - Tags -/logo

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (62)

  • 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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • fate/hevc : add missing scale filter dependency to fate-hevc-mv-switch

    29 septembre 2024, par James Almer
    fate/hevc : add missing scale filter dependency to fate-hevc-mv-switch
    

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] tests/fate/hevc.mak
  • How to fix the ffmpeg python issue "Error applying option 'original_size' to filter 'ass' : Invalid argument" ?

    16 février, par Gauthier Buttez

    ENVIRONMENT :

    &#xA;

    Python 3.10

    &#xA;

    Windows 11

    &#xA;

    ffmpeg-python==0.2.0

    &#xA;

    CONTEXT :

    &#xA;

    I am trying to add hardcoded subtitles on a video with ffmpeg and Pyton.

    &#xA;

    PROBLEM :

    &#xA;

    ffmpeg is not able to find the path of my ass subtitle file. So I tried different ways with different methods. I asked different AI to try to find a solution. Impossible ! It is such a crazy issue that I tested the code from a "test" folder located on the root "C :" from the command line wid nows. No AI was able to fixed this issue. I tried chatGPT, deepseek, claude.ai. They proposed different solutions which were not working.

    &#xA;

    THE CODE :

    &#xA;

    import os&#xA;import ffmpeg&#xA;import subprocess&#xA;&#xA;def add_subtitles_with_ass(video_path, ass_path, output_path):&#xA;&#xA;    video_path = os.path.abspath(video_path)&#xA;    ass_path = os.path.abspath(ass_path)&#xA;    output_path = os.path.abspath(output_path)&#xA;&#xA;    print(f"&#128640; Add susbtitiles with ASS : {ass_path}")&#xA;    ass_path_escaped = rf&#x27;"{ass_path}"&#x27;&#xA;&#xA;    try:&#xA;        ffmpeg.input(video_path).output(output_path, vf=f"ass=&#x27;{ass_path_escaped}&#x27;").run(overwrite_output=True)&#xA;        print(f"✅ Subtitles added with success : {output_path}")&#xA;    except Exception as e:&#xA;        print(f"❌ ERROR when adding subtitles : {e}")&#xA;&#xA;&#xA;def add_subtitles_with_ass_with_subprocess(video_path, ass_path, output_path):&#xA;    video_path = os.path.abspath(video_path)&#xA;    ass_path = os.path.abspath(ass_path)&#xA;    output_path = os.path.abspath(output_path)&#xA;&#xA;    print(f"&#128640; Add subtitles with ASS : {ass_path}")&#xA;&#xA;    try:&#xA;        command = [&#xA;            &#x27;ffmpeg&#x27;,&#xA;            &#x27;-i&#x27;, video_path,&#xA;            &#x27;-vf&#x27;, f"ass=&#x27;{ass_path}&#x27;",&#xA;            &#x27;-c:a&#x27;, &#x27;copy&#x27;,&#xA;            output_path,&#xA;            &#x27;-y&#x27;  # Overwrite output file without asking&#xA;        ]&#xA;&#xA;        subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)&#xA;        print(f"✅ Subtitles added with success : {output_path}")&#xA;    except subprocess.CalledProcessError as e:&#xA;        print(f"❌ ERROR when adding subtitles : {e.stderr.decode(&#x27;utf-8&#x27;)}")&#xA;&#xA;&#xA;print(f"Test 1 -----------------------------------------------------------------------")&#xA;ass_path="G:\Mi unidad\Python\Scripts\shorts_videos\10000views_and_higher\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path="G:\Mi unidad\Python\Scripts\shorts_videos\10000views_and_higher\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path="G:\Mi unidad\Python\Scripts\shorts_videos\10000views_and_higher\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path, ass_path, output_path)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 2 -----------------------------------------------------------------------")&#xA;ass_path2="G:\\Mi unidad\\Python\\Scripts\\shorts_videos\\10000views_and_higher\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path2="G:\\Mi unidad\\Python\\Scripts\\shorts_videos\\10000views_and_higher\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path2="G:\\Mi unidad\\Python\\Scripts\\shorts_videos\\10000views_and_higher\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path2, ass_path2, output_path2)&#xA;&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 3 -----------------------------------------------------------------------")&#xA;ass_path3="G:/\Mi unidad/\Python/\Scripts/\shorts_videos/\10000views_and_higher/\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path3="G:/\Mi unidad/\Python/\Scripts/\shorts_videos/\10000views_and_higher/\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path3="G:/\Mi unidad/\Python/\Scripts/\shorts_videos/\10000views_and_higher/\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path3, ass_path3, output_path3)&#xA;&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 4 -----------------------------------------------------------------------")&#xA;ass_path4="G:/\\Mi unidad/\\Python/\\Scripts/\\shorts_videos/\\10000views_and_higher/\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path4="G:/\\Mi unidad/\\Python/\\Scripts/\\shorts_videos/\\10000views_and_higher/\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path4="G:/\\Mi unidad/\\Python/\\Scripts/\\shorts_videos/\\10000views_and_higher/\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path4, ass_path4, output_path4)&#xA;&#xA;&#xA;&#xA;&#xA;print(f"Test 1 with subprocess -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path, ass_path, output_path)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 2 with subprocess -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path2, ass_path2, output_path2)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 3 with subprocess -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path3, ass_path3, output_path3)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 4 with subprocess -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path4, ass_path4, output_path4)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;#======================= IT DIDN&#x27;T WORK, SO LET&#x27;S DO WITH RELATIVE PATH ===================================&#xA;&#xA;&#xA;print(f"Test 1 with relative path -----------------------------------------------------------------------")&#xA;ass_path_relative="10000views_and_higher\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path_relative="10000views_and_higher\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path_relative="10000views_and_higher\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path_relative, ass_path_relative, output_path_relative)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 2  with relative path -----------------------------------------------------------------------")&#xA;ass_path2_relative="10000views_and_higher\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path2_relative="10000views_and_higher\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path2_relative="10000views_and_higher\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path2_relative, ass_path2_relative, output_path2_relative)&#xA;&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 3  with relative path -----------------------------------------------------------------------")&#xA;ass_path3_relative="10000views_and_higher/\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path3_relative="10000views_and_higher/\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path3_relative="10000views_and_higher/\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path3_relative, ass_path3_relative, output_path3_relative)&#xA;&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 4  with relative path -----------------------------------------------------------------------")&#xA;ass_path4_relative="10000views_and_higher/\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.ass"&#xA;video_path4_relative="10000views_and_higher/\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo.mp4"&#xA;output_path4_relative="10000views_and_higher/\\Li2zY7XcOf0_Matthew_Hussey_flip_h_BW_with_logo_EN.mp4"&#xA;add_subtitles_with_ass(video_path4_relative, ass_path4_relative, output_path4_relative)&#xA;&#xA;&#xA;&#xA;&#xA;print(f"Test 1 with subprocess  with relative path -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path, ass_path, output_path)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 2 with subprocess  with relative path -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path2_relative, ass_path2_relative, output_path2_relative)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 3 with subprocess  with relative path -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path3_relative, ass_path3_relative, output_path3_relative)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;&#xA;print(f"Test 4 with subprocess  with relative path -----------------------------------------------------------------------")&#xA;add_subtitles_with_ass_with_subprocess(video_path4_relative, ass_path4_relative, output_path4_relative)&#xA;print(50*"*")&#xA;print(50*"*")&#xA;print(50*"*")&#xA;

    &#xA;

    THE OUTPUT :

    &#xA;

    The output was too large to post it here. I uploaded it on my github :

    &#xA;

    https://github.com/gauthierbuttez/public/blob/master/output_ffmpeg.log

    &#xA;

    I also zipped and uploaded all the files to make reproducing the issue on your computer easy :

    &#xA;

    https://github.com/gauthierbuttez/public/blob/master/test.zip

    &#xA;

    Is there any kind super Python Master in the place ?

    &#xA;

  • doc/filters : fix "ewa_lanczos" filter description

    20 avril, par Niklas Haas
    doc/filters : fix "ewa_lanczos" filter description
    
    • [DH] doc/filters.texi