Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (33)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (7950)

  • How to pass real time video to youtube rtmp server for live streaming ?

    31 octobre 2022, par AMRITESH GUPTA

    I am trying to build a project in which a user can post his screen-shared video to youtube live, but I don't know how to pass on that captured stream to youtube using youtube API. Also, I don't want to use any streaming software for this.
I anyone has any idea how to do it, please share it.

    


    P.S. - I am using Nodejs and FFmpeg for video encoding.

    


  • TypeError : must be real number, not NoneType using spyder anaconda

    13 août 2023, par faisal2k
    import moviepy.editor as mp
import tkinter as tk
from tkinter import filedialog
import math
from PIL import Image
import numpy


def zoom_in_effect(clip, zoom_ratio=0.02):
    def effect(get_frame, t):
        img = Image.fromarray(get_frame(t))
        base_size = img.size

        new_size = [
            math.ceil(img.size[0] * (1 + (zoom_ratio * t))),
            math.ceil(img.size[1] * (1 + (zoom_ratio * t)))
        ]

        # The new dimensions must be even.
        new_size[0] = new_size[0] + (new_size[0] % 2)
        new_size[1] = new_size[1] + (new_size[1] % 2)

        img = img.resize(new_size, Image.LANCZOS)

        x = math.ceil((new_size[0] - base_size[0]) / 2)
        y = math.ceil((new_size[1] - base_size[1]) / 2)

        img = img.crop([
            x, y, new_size[0] - x, new_size[1] - y
        ]).resize(base_size, Image.LANCZOS)

        #result = numpy.array(img)
        result = numpy.array(img, dtype=numpy.uint8)

        img.close()

        return result

    return clip.fl(effect)


    

def make_center_video():
    
    size = (1080, 1080)

    audio_file = '/home/faisal/pythonfiles/audio/tts_voice.wav'
    audio = mp.AudioFileClip(audio_file)
   
    root = tk.Tk()
    root.withdraw()
     
    print("waiting for Image Selection....")

    img = filedialog.askopenfilename()


    slide = mp.ImageClip(img).set_fps(29).set_duration(audio.duration).resize(size)
    slide = zoom_in_effect(slide, 0.02)
    slide.write_videofile('/home/faisal/pythonfiles/videos/zoom-short.mp4',codec='libx264',  fps=29)
    
    
    size = (600, 600)

 


    slide = mp.ImageClip(img).set_fps(29).set_duration(audio.duration).resize(size)
    slide = zoom_in_effect(slide, 0.02)
    slide.write_videofile('/home/faisal/pythonfiles/videos/zoom-wide.mp4',codec='libx264', fps=29)
    
import traceback

try:
    make_center_video()
except Exception as e:
    traceback.print_exc()
    print(f"An error occurred: {e}")


    


    I'm trying to make the zoom video using image but facing

    


    TypeError: must be real number, not NoneType.


    


    It used was to run but I don't remember if I might have updated numpy, ffmpeg, or any thing else that is now causing the error. I have tried the code on python 3.10 and 3.11 and get the same error in both. I was previously running it on python 3.10.

    


    An error occurred: must be real number, not NoneType&#xA;Traceback (most recent call last):&#xA;  File "/home/faisal/pythonfiles/code/zoom_video.py", line 76, in <module>&#xA;    make_center_video()&#xA;  File "/home/faisal/pythonfiles/code/zoom_video.py", line 61, in make_center_video&#xA;    slide.write_videofile(&#x27;/home/faisal/pythonfiles/videos/zoom-short.mp4&#x27;,codec=&#x27;libx264&#x27;,  fps=29)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/decorator.py", line 232, in fun&#xA;    return caller(func, *(extras &#x2B; args), **kw)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/moviepy/decorators.py", line 54, in requires_duration&#xA;    return f(clip, *a, **k)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/decorator.py", line 232, in fun&#xA;    return caller(func, *(extras &#x2B; args), **kw)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default&#xA;    return f(clip, *new_a, **new_kw)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/decorator.py", line 232, in fun&#xA;    return caller(func, *(extras &#x2B; args), **kw)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB&#xA;    return f(clip, *a, **k)&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 300, in write_videofile&#xA;    ffmpeg_write_video(self, filename, fps, codec,&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_writer.py", line 213, in ffmpeg_write_video&#xA;    with FFMPEG_VideoWriter(filename, clip.size, fps, codec = codec,&#xA;  File "/home/faisal/anaconda3/envs/py-310/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_writer.py", line 88, in __init__&#xA;    &#x27;-r&#x27;, &#x27;%.02f&#x27; % fps,&#xA;TypeError: must be real number, not NoneType&#xA;</module>

    &#xA;

  • how write file name with the real frame position of each I - frame ? [duplicate]

    24 février 2019, par TrueNHero

    This question already has an answer here :

    i need to put the real frame number in the output jpeg image
    i’d try ffmpeg -i inputfile.mp4 -vf "select='eq(pict_type\,I)" -vsync vfr -qscale:v 2 I-frame_num%d.jpeg