Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (89)

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • 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

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (3627)

  • How can I use ffmpeg to create a seamless looping gif ? [closed]

    27 juin 2024, par DavidNyan10

    I have an MP4 file which contains animation repeating in a loop. Let's just say, for example, a video of rain. However, when loop is turned on, the video cuts off at the wrong place and does not make a nice smooth animation. The part where it loops is obvious. It's just that the video contains more than one cycle of the loop, but not an exact integer of the full cycle.

    


    My goal is to turn this video into a gif with a seamless loop. In other words, I want the last frame of the video to match the first frame.

    


    My approach : I found a "Seamless loop creator" website on Google, tried it out, and it worked REALLY well. I thought all my problems have been solved. But little did I know, I've been only looking at the few seconds at the beginning and at the end of the video, not paying attention to what's in the middle. The sneaky pesky little website cuts off the video right in the middle, stitch the "seamless transition" at the beginning and end of the video, and put an ugly cross-fade in the middle where the frames don't line up. That is stupid. This of course, isn't noticable on rain videos, but on videos like a character jumping, the crossfade is very visible.

    


    My second approach : I'd use FFMPEG to get the first frame of the video, then starting from the last frame of the video and backwards, it'd try to find a frame that matches exactly with the first frame.

    


    Steps :

    


      

    1. Get the first frame and save it as a PNG or something I don't know
    2. 


    3. Reverse the original video
    4. 


    5. Match the image to each frame of the video in step 2. It is now easier because it's not doing it backwards frame by frame.
    6. 


    7. When a frame match is found, cut off all the frames before this matched frame.
    8. 


    9. Reverse back the video
    10. 


    


    Can I achieve something like this in ffmpeg, preferably a one-liner in windows cmd ?

    


    Follow-up question : Would it be better to leave the last frame the same as first frame or should I remove it ? For example, when it's looping, it would repeat that exact frame two times, is that good ? Or which one provides better results ? And if it's better to not include the last frame (the one that matches), how would I do it in my process above ?

    


    I tried ChatGPT, expecting a ready-made code. Put it in the command prompt and lost my original video file. Had to use a recovery tool because the file was overwritten.

    


  • Android ffmpeg : create video from sequence of images using jni

    22 novembre 2018, par Sameer Z.

    I have successfully build ffmpeg for Android and now I need to create video from sequence images so it look like animation video with some default audio. I have found some solution but it all says using command like.

    How to do same thing using jni on Android ?

  • create a movie in python [on hold]

    22 mai 2017, par masoud

    I have some files with names (’Den_car_resample’ +’sdf’+ str(n)+’.dat’) where n changes from 0 to 25. I wrote a code to read these files and plots the results.
    now I want to create a movie from these plots. at the end of the program, I used the avconv command to do that.
    but, unfortunately my code creates a movie but it is empty.
    I don’t know the reason exactly but I think, first, I have to define a frame to each plot and then create a movie.
    can anyone please tell me how can I define a frame and also the add bit_rate of the movie.

    import sys
    import subprocess  
    import sdf
    import numpy as np
    import matplotlib.pyplot as plt  
    import time
    import matplotlib.animation as Animation
    from matplotlib.font_manager import FontProperties
    fp = FontProperties('Symbola')

    ##################### information from EPOCH input.deck
    nx,ny= 1200, 1600
    xmin=-100e-6
    xmax = 110e-6
    ymin = -200e-6
    ymax = 200e-6
    X =np.linspace(xmin,xmax,nx)  
    Y =np.linspace(ymin,ymax,ny)

    #################
    for n in range(0,25):
     nstr = str(n)

    ######################..... reading Density of carbon
     filename ="Den_car_resample" +'_sdf_'+ str(n)+'.dat'

     with open(filename, 'rb') as f:                        
       data = np.fromfile(f, dtype='float64', count=nx*ny)  

     Den_car  = np.reshape(data, [ny, nx], order='F')
     Den_car= np.log10(Den_car)

     ######################  Display Carbon density

     fig = plt.imshow(Den_car,  extent=[X.min()*1e6, X.max()*1e6, Y.min()*1e6,Y.max()*1e6], vmin=24, vmax=29, cmap='brg', aspect='auto')
     plt.suptitle('Den_car')
     plt.title('sdf '+ str(n)+'; Time= '+str(n*50)+'ps',color='green', fontsize=15)
     plt.xlabel('x($\mu$m)')
     plt.ylabel('y($\mu$m)')
     plt.text(-80,-40,'Den_Carbon',color='red', fontsize=15)
     plt.colorbar()
     plt.savefig( 'fig%06d.png' % n, bbox_inches='tight')          

     plt.pause(.1)
     plt.clf()  
     plt.close()

     ######################  Create movie

     subprocess.call("avconv -framerate 1 -i fig%06d.png -c:v libx264 -profile:v high -crf 20".split())

    sys.exit()