Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (61)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (8379)

  • x264 : How to Correctly Use quant_offsets ?

    25 août 2022, par Eynnzerr

    Suppose I need to encode different regions with different QPs in one frame, i.e. RoI(regions of interest) encoding. I searched all over the internet and was only told that quant_offsets can meet my demand. However, none of them told me exactly how to use it, and I can't find any official documentation about it. I read the source code of x264 and did experiments, and find it only adds an offset to the qp decision x264 has made, rather than exactly set the qp value I want.

    


    Is there a possible way that I can have x264 encode these regions using the qp value I've explictly given instead of adding offsets based on what it decided on its own ? Many thanks !

    


  • x264 : How to Correctly Use quant_offsets ?

    25 août 2022, par Eynnzerr

    Suppose I need to encode different regions with different QPs in one frame, i.e. RoI(regions of interest) encoding. I searched all over the internet and was only told that quant_offsets can meet my demand. However, none of them told me exactly how to use it, and I can't find any official documentation about it. I read the source code of x264 and did experiments, and find it only adds an offset to the qp decision x264 has made, rather than exactly set the qp value I want.

    


    Is there a possible way that I can have x264 encode these regions using the qp value I've explictly given instead of adding offsets based on what it decided on its own ? Many thanks !

    


  • Video from images in Python

    26 février 2018, par R. Patterson

    I can draw a series of images using plt.draw() and plt.pause() so it produces something similar to an animation in the python window. I have modified each of the images with various labels, drawings etc.

    import numpy as np
    from PIL import Image
    import matplotlib.pyplot as plt
    import math

    def display(Intensity):
       l = plt.Line2D(Intensity[0],Intensity[1],color='yellow') #draw ROI/IAL
       ax = plt.gca()
       ax.add_line(l)
       plt.axis('off')
       plt.pause(0.05)
       plt.draw()
       plt.clf()

    #rotate region of interest
    def rotate(origin,Intensity,increment):
       ox, oy = origin #coordinates of centre or rotation
       x_points=[]
       y_points=[]
       angle=math.radians(increment)#change in angle between each image
       for i in range(0,len(Intensity[0])):
           px, py = Intensity[0][i], Intensity[1][i]
           qx = ox+math.cos(angle)*(px-ox)-math.sin(angle)*(py-oy)
           x_points.append(qx)
           qy = oy+math.sin(angle)*(px-ox)+math.cos(angle)*(py-oy)
           y_points.append(qy)
       rotatecoordinates=[]
       rotatecoordinates.append(x_points)
       rotatecoordinates.append(y_points)
       return rotatecoordinates

    def animation(list, Intensity):
       inc=0
       for value in list:
           item = np.array(value)
           rotated=rotate([128,128],Intensity,inc)
           im=plt.imshow(item, interpolation='nearest')
           display(rotated)
           inc+=1

    Image_list=[]
    for i in range(0,50):
       array=np.linspace(0,1,256*256)
       mat=np.reshape(array,(256,256))
       img=Image.fromarray(np.uint8(mat*255),'L') #create images
       Image_list.append(img)

    myROI=([100,150,150,100,100],[100,100,150,150,100]) #region of interest on image
    animation(Image_list,myROI)

    I would like to produce a video file using the images produced. I can’t use the module imageio, imagemagick, opencv, cv2 etc. I think ffmpeg would work, I have the following code.

    def save():
       os.system("ffmpeg -r 1 -i img%01d.png -vcodec mpeg4 -y movie.mp4")

    I don’t understand how to use it in relation to the code I already have. It doesn’t take any arguments, how would I relate it to the images I have ? I know how to use imagej/fiji to produce videos from images but I would like to do this in python and also it runs out of memory (I have a lot of images, over 2000). Any help would be appreciated, thank you.