Recherche avancée

Médias (91)

Autres articles (67)

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

  • 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

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (7046)

  • lavc/vc1dsp : fix R-V V avg_mspel_pixels

    1er juin 2024, par Rémi Denis-Courmont
    lavc/vc1dsp : fix R-V V avg_mspel_pixels
    

    The 8x8 pixel arrays are not necessarily aligned to 64 bits, so the
    current code leads to Bus error on real hardware. This reproducible
    with FATE's vc1_ilaced_twomv test case.

    The new "pessimist" code can trivially be shared for 16x16 pixel
    arrays so we also do that. FWIW, this also nominally reduces the
    hardware requirement from Zve64x to Zve32x.

    T-Head C908 :
    vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_c : 14.7
    vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_rvv_i32 : 3.5
    vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_c : 3.7
    vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_rvv_i32 : 1.5

    SpacemiT X60 :
    vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_c : 13.0
    vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_rvv_i32 : 3.0
    vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_c : 3.2
    vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_rvv_i32 : 1.2

    • [DH] libavcodec/riscv/vc1dsp_init.c
    • [DH] libavcodec/riscv/vc1dsp_rvv.S
  • lavc/h264dsp : R-V V 8-bit h264_weight_pixels

    4 juillet 2024, par Rémi Denis-Courmont
    lavc/h264dsp : R-V V 8-bit h264_weight_pixels
    

    There are two implementations here :
    - a generic scalable one processing two columns at a time,
    - a specialised processing one (fixed-size) row at a time.

    Unsurprisingly, the generic one works out better with smaller widths.
    With larger widths, the gains from filling vectors are outweighed by
    the extra cost of strided loads and stores. In other words, memory
    accesses become the bottleneck.

    T-Head C908 :
    h264_weight2_8_c : 54.5
    h264_weight2_8_rvv_i32 : 13.7
    h264_weight4_8_c : 101.7
    h264_weight4_8_rvv_i32 : 27.5
    h264_weight8_8_c : 197.0
    h264_weight8_8_rvv_i32 : 75.5
    h264_weight16_8_c : 385.0
    h264_weight16_8_rvv_i32 : 74.2

    SpacemiT X60 :
    h264_weight2_8_c : 48.5
    h264_weight2_8_rvv_i32 : 8.2
    h264_weight4_8_c : 90.7
    h264_weight4_8_rvv_i32 : 16.5
    h264_weight8_8_c : 175.0
    h264_weight8_8_rvv_i32 : 37.7
    h264_weight16_8_c : 342.2
    h264_weight16_8_rvv_i32 : 66.0

    • [DH] libavcodec/riscv/h264dsp_init.c
    • [DH] libavcodec/riscv/h264dsp_rvv.S
  • Is there a simple way to create 8 or 16 bit grayscale videos using matplotlib ?

    19 avril 2022, par user18544920

    I have been reading for 3 days however still can't quite wrap my head around how to do the following. We have been asked to produce a simulation video from matplotlib to evaluate a programme that only accepts u8 or u16 grayscale videos. I have managed to produce the required animated scatterplot using the following code, however only know how to convert to grayscale using the second chunk of code in CV2 that results in a lot of compression.

    


    I would get marked down for both the heavy compression and not doing it within the animation code, however I don't know of a way to do it during the animation code.

    


    Animation code

    


    pixelx = 250  # length of x for resulting movie in pixels
pixely = 250  # length of y for resulting movie in pixels
fig2d = plt.figure(figsize=(pixelx/72, pixely/72), dpi=72)
ax2d = fig2d.add_axes([0,0,1,1])
ax2d.set_axis_off()
scatter2d = ax2d.scatter([], [], s=(pixelx*particle.rad/Env.X)**2, marker='o', edgecolors='none', c='#000000', cmap='gray')
ax2d.set_aspect('auto')
ani2d = FuncAnimation(fig2d, update2d, frames=(duration * fps), init_func=initial2d, blit=False, interval=1000/fps,
                      repeat=True)
ani2d.save('x.avi', writer='ffmpeg', fps=fps, dpi=72)


    


    RGB to grayscale code

    


    import cv2
source = cv2.VideoCapture('x.avi')
frame_width = int(source.get(3))
frame_height = int(source.get(4))
size = (frame_width, frame_height)
result = cv2.VideoWriter('xG.avi',
                         cv2.VideoWriter_fourcc(*'MJPG'), 200, size, 0)
while True:

    ret, img = source.read()

    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

    result.write(gray)

    cv2.imshow("frame", gray)

    key = cv2.waitKey(1)
    if key == ord("q"):
        break

cv2.destroyAllWindows()
source.release()


    


    Any help would be greatly apprciated