Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (40)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (6828)

  • How to Write the Numpy array video to Disk While adding Audio from File using the python ffmpegio

    31 décembre 2023, par soham tilekar

    I Have an A NumPy array Representing the Video in the memory how Can I Use the ffmpegio python module to save it on the File on the disk While adding the audio.

    


    I Try Many things. I Also Ask answer on the python-ffmpegio github page.
Discussinnon link

    


    The Whole module Code is on the vidiopy

    


    I Get an Error : -

    


    Traceback (most recent call last):&#xA;  File "d:\soham_code\video_py\test.py", line 5, in <module>&#xA;    clip.write_videofile(r&#x27;D:\soham_code\video_py\test\test_video.mp4&#x27;)&#xA;  File "d:\soham_code\video_py\vidiopy\video\VideoClips.py", line 190, in write_videofile&#xA;    with ffmpegio.open(&#xA;  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 137, in __enter__&#xA;    return next(self.gen)&#xA;           ^^^^^^^^^^^^^^&#xA;  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpegio\__init__.py", line 324, in open&#xA;    stream = StreamClass(*args, **kwds)&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpegio\streams\SimpleStreams.py", line 489, in __init__&#xA;    super().__init__(&#xA;  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpegio\streams\SimpleStreams.py", line 365, in __init__&#xA;    configure.add_url(ffmpeg_args, "input", *input)&#xA;TypeError: add_url() takes from 3 to 5 positional arguments but 765 were given&#xA;</module>

    &#xA;

    Modified Code : -

    &#xA;

        def write_videofile(self, filename, fps=None, codec=None,   &#xA;                        bitrate=None, audio=True, audio_fps=44100,&#xA;                        preset="medium", pixel_format=None,&#xA;                        audio_codec=None, audio_bitrate=None,&#xA;                        write_logfile=False, verbose=True,&#xA;                        threads=None, ffmpeg_params: dict[str, str] | None = None,&#xA;                        logger=&#x27;bar&#x27;, over_write_output=True):&#xA;        &#xA;        # video_np = np.asarray(tuple(self.iterate_frames_array_t(fps if fps else self.fps if self.fps else (_ for _ in ()&#xA;        #                                                                                                     ).throw(Exception(&#x27;Make Frame is Not Set.&#x27;)))))&#xA;&#xA;        audio_name, _ = os.path.splitext(filename)&#xA;&#xA;&#xA;        ffmpeg_options = {&#xA;            &#x27;preset&#x27;: preset,&#xA;            &#xA;            **(ffmpeg_params if ffmpeg_params is not None else {}),&#xA;            **({&#x27;c:v&#x27;: codec} if codec else {}),&#xA;            **({&#x27;b:v&#x27;: bitrate} if bitrate else {}),&#xA;            **({&#x27;pix_fmt&#x27;: pixel_format} if pixel_format else {}),&#xA;            **({&#x27;c:a&#x27;: audio_codec} if audio_codec else {}),&#xA;            **({&#x27;ar&#x27;: audio_fps} if audio_fps else {}),&#xA;            **({&#x27;b:a&#x27;: audio_bitrate} if audio_bitrate else {}),&#xA;            **({&#x27;threads&#x27;: threads} if threads else {}),&#xA;        }&#xA;&#xA;        with tempfile.NamedTemporaryFile(&#xA;            suffix=".wav", prefix=audio_name &#x2B; "_temp_audio_"&#xA;        ) as temp_audio_file:&#xA;            if self.audio and audio:&#xA;                self.audio.write_audio_file(temp_audio_file)&#xA;                # audio_file_name = temp_audio_file.name&#xA;&#xA;                ffmpeg_options.update(&#xA;                    {"extra_inputs": [temp_audio_file.name], "acodec": "copy", "map": ["0:v", "1:a"]}&#xA;                )&#xA;&#xA;            with ffmpegio.open(&#xA;                filename,&#xA;                "wv",&#xA;                fps,&#xA;                **ffmpeg_options,&#xA;                overwrite=over_write_output,&#xA;                show_log=True,) as f:&#xA;                &#xA;                for I in self.iterate_frames_array_t(fps):  # if fps else self.fps if self.fps else (_ for _ in ()&#xA;                #                                                                                             ).throw(Exception(&#x27;Make Frame is Not Set.&#x27;))):&#xA;                    f.write(I)&#xA;

    &#xA;

    I Tried Many things : -&#xA;using transcode, providing the -i flag with audio name While using the ffmpegio.write, etc.

    &#xA;

  • Convert to webm format with CFR

    6 novembre 2013, par user1910483

    I use the webm format in my program and for normal work I need Constant frame rate(CFR), but all of the programs that I convert the video from .ogv set Variable Frame Rate (VFR). Set -qcomp 0 option to ffmpeg has no effect, although the documentation states that should be set CBR. Encoder vpxenc takes yuv420 format, so it fits poorly. Is there a program that will correctly set the CBR mode ?

  • Python : Error Combining Audio and Video Files using ffmpeg concat

    4 juillet 2022, par Aman

    I have a function that downloads videos using pytube. I have to download both the audio and the video files separately and then combine them using ffmpeg. This is what I have :

    &#xA;

    def DownloadVideo(video_link,folder,maxres=None):&#xA;    if maxres==None:      &#xA;        print("Video Started")    &#xA;        video_file = YouTube(video_link).streams.order_by(&#x27;resolution&#x27;).desc().first().download()&#xA;        print("Video Done")&#xA;        &#xA;    else:&#xA;        print("Video Started")       &#xA;        video_file = YouTube(video_link).streams.filter(res=maxres).order_by(&#x27;resolution&#x27;).desc().first().download(output_path=folder)              &#xA;        print("Video Done", video_file)&#xA;       &#xA;    &#xA;    video_name = slugify(video_file.replace(".webm","").split("/")[-1])      &#xA;    print("Audio Started")&#xA;&#xA;    audio_file = YouTube(video_link).streams.filter(only_audio=True).order_by(&#x27;abr&#x27;).desc().first().download(filename_prefix="audio_", output_path=folder)&#xA;&#xA;    print("Audio Done")&#xA;    &#xA;    source_audio = ffmpeg.input(audio_file)&#xA;    source_video = ffmpeg.input(video_file)&#xA;&#xA;    print("source audio: ", source_audio)&#xA;    print("source video: ", source_video)&#xA;&#xA;    print("Concatenation Started")&#xA;&#xA;    ffmpeg.concat(source_video, source_audio, v=1, a=1).output(f"{folder}/{video_name}.mp4").run()&#xA;&#xA;    # Combine the video and audio&#xA;    &#xA;    print("Concatenation Done")&#xA;    return None&#xA;

    &#xA;

    However, this gives me the following error :

    &#xA;

    ...&#xA;Video Started&#xA;Video Done D:/Data Projects/downloads/videos\The media.webm&#xA;Audio Started&#xA;Audio Done&#xA;source audio:  input(filename=&#x27;D:/Data Projects/downloads/videos\\audio_The media.webm&#x27;)[None] &lt;1792faaa507b>&#xA;source video:  input(filename=&#x27;D:/Data Projects/downloads/videos\\The media.webm&#x27;)[None] &lt;1f47beb69b93>&#xA;Concatenation Started&#xA;Traceback (most recent call last):&#xA;  File "<stdin>", line 4, in <module>&#xA;  File "<stdin>", line 20, in DownloadVideo&#xA;  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 313, in run&#xA;    process = run_async(&#xA;  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 284, in run_async&#xA;    return subprocess.Popen(&#xA;  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__&#xA;    self._execute_child(args, executable, preexec_fn, close_fds,&#xA;  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child&#xA;    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;</stdin></module></stdin>

    &#xA;

    But both The media.webm and audio_The media.webm exist in the folder.

    &#xA;

    What am I doing wrong and how can I fix this ?

    &#xA;