Recherche avancée

Médias (0)

Mot : - Tags -/masques

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

  • 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

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (6078)

  • Why are Cb and Cr planes displaced differently from lum by the displace complex filter in ffmpeg ?

    10 janvier 2024, par Neb

    I have a video encoded with the yuv420p pixel format and I want to displace its pixels. I'm using ffmpeg and its new displace filter. The filter takes as inputs (the video to be displaced and) two displacement maps respectively for X and Y axis. I decided to create the displacement maps directly into ffmpeg using the nullsrc video source filter and the geq filter to specify the value of the three planes : lum, Cb, Cr. The script is the following :

    



    ffmpeg INPUT.mp4 -f lavfi -i nullsrc=size=${WIDTH}x${HEIGHT}:d=0.1,geq='lum=128+30*sin(2*PI*X/400):Cb=128+30*sin(2*PI*X/400):Cr='128+30*sin(2*PI*X/400)' -f lavfi -i nullsrc=size=${WIDTH}x${HEIGHT}:d=0.1,geq='lum=128+30*sin(2*PI*X/400):Cb=128+30*sin(2*PI*X/400):Cr=128+30*sin(2*PI*X/400)' -lavfi '[0][1][2]displace' OUTPUT.mp4


    



    I used the example provided in the documentation of ffmpeg, since the expression used in geq is irrelevant for the purposes of the problem.

    



    At the and of the computation, I get the pixels of the input video not properly displaced, meaning that I can clearly see a sort of ghost carrying-color-information video under a displaced but b/w one.
After some tests, I noticed that the displacemnt map created had only the luma plane displaced correctly while the chrominance planes were displaced, but differently from luma, which is the origin of the planes disalignment in the intput video as you can see in the following extract frames :

    



    enter image description here

    



    I also noticed that the video describing the Cb and Cr planes of the displacement maps have half resolution of the luma plane.

    



    My question is : how can i setup correctly the Cr and Cb planes in the geq definition so that they are exactly identical to the luma plane ?

    



    It would be also great if someone could explain me why ffmpeg gives me an output so much different for luma and Cb, Cr planes even if the function provided is the same.

    



    If, it can help, i'm using ffmpeg 3.3-static build.

    



    Thanks for your time.

    


  • Pygame : Frame ghosting ?

    31 décembre 2013, par Sam Tubb

    I am working on a animation environment in python using pygame. The user draw's each frame, and then using ffmpeg the animation is saved as an .avi movie. I would like to implement a feature, but am not sure how.. frame ghosting. Like display the previous frame while you draw the current.

    I tried creating a surface called ghost that copies the current frame when the next-frame key is pressed. Then draws it with an alpha level of 10, but this didn't work out correctly.

    I am not sure what to do, here is the source code for anyone that thinks they have an idea :

    #Anim8

    import pygame,subprocess,shutil
    from os import makedirs
    from pygame.locals import *
    from random import randrange
    pygame.init()
    screen=pygame.display.set_mode((740,580))
    draw=pygame.Surface((740,540))
    draw.fill((200,200,200))
    bcol=(200,200,200)
    gui=pygame.Surface((740,40))
    gui.fill((50,50,50))
    size=2
    color=(0,0,0)
    screen.fill((200,200,200))
    prevcol=0
    newcol=0
    f=0
    msg=''
    framerate=60
    try:
       makedirs('anim')
    except:
       pass
    def DrawColors(x,y):
       pygame.draw.rect(gui, (255,0,0), (x+3,y+3,15,15),0)
       pygame.draw.rect(gui, (0,0,0), (x+3,y+21,15,15),0)
       pygame.draw.rect(gui, (0,255,0), (x+21,y+3,15,15),0)
       pygame.draw.rect(gui, (200,200,200), (x+21,y+21,15,15),0)
       pygame.draw.rect(gui, (0,0,255), (x+39,y+3,15,15),0)
    while True:
       pygame.display.set_caption('Anim8 - Sam Tubb - '+'Frame: '+str(f)+' '+str(msg))
       mse=pygame.mouse.get_pos()
       screen.blit(gui, (0,0))
       DrawColors(0,0)
       screen.blit(draw,(0,40))
       key=pygame.key.get_pressed()
       if key[K_1]:
           framerate=10
           msg='Frame Rate set to 10'
       if key[K_2]:
           framerate=20
           msg='Frame Rate set to 20'
       if key[K_3]:
           framerate=30
           msg='Frame Rate set to 30'
       if key[K_4]:
           framerate=40
           msg='Frame Rate set to 40'
       if key[K_5]:
           framerate=50
           msg='Frame Rate set to 50'
       if key[K_6]:
           framerate=60
           msg='Frame Rate set to 60'
       if key[K_7]:
           framerate=70
           msg='Frame Rate set to 70'
       if key[K_8]:
           framerate=80
           msg='Frame Rate set to 80'
       if key[K_9]:
           framerate=90
           msg='Frame Rate set to 90'
       if key[K_0]:
           framerate=100
           msg='Frame Rate set to 100'

       if key[K_a]:
           pygame.image.save(draw, 'anim/frame'+str(f)+'.png')
           f+=1
       for e in pygame.event.get():
           if e.type==QUIT:
               shutil.rmtree('anim')
               exit()
           if e.type==KEYDOWN:
               if e.key==K_s:
                   msg='Added Frame!'
                   pygame.image.save(draw, 'anim/frame'+str(f)+'.png')
                   f+=1
               if e.key==K_c:
                   draw.fill(bcol)
               if e.key==K_r:
                   name='anim'+str(randrange(0,999))+str(randrange(0,999))+'.avi'
                   msg='Rendering: '+name
                   pygame.display.set_caption('Anim8 - Sam Tubb - '+'Frame: '+str(f)+' '+str(msg))
                   subprocess.call('ffmpeg -f image2 -s 640x480 -i anim/frame%01d.png -r '+str(framerate)+' '+name,shell=True)
                   msg='Done!'
               if e.key==K_p:
                   subprocess.call('ffplay '+name,shell=True)
           if e.type==MOUSEBUTTONDOWN:
               if e.button==1:
                   try:
                       prevcol=color
                       newcol=gui.get_at(mse)
                       if newcol==(50,50,50):
                           newcol=prevcol
                       color=newcol
                   except:
                       pass
               if e.button==3:
                   try:
                       prevcol=bcol
                       newcol=gui.get_at(mse)
                       if newcol==(50,50,50):
                           newcol=prevcol
                       draw.fill(newcol)
                       bcol=newcol
                   except:
                       pass
               if e.button==4:
                   size+=1
                   if size>7:
                       size=7
               if e.button==5:
                   size-=1
                   if size==0:
                       size=1
           if e.type == pygame.MOUSEMOTION:
               lineEnd = pygame.mouse.get_pos()
               lineEnd = (lineEnd[0],lineEnd[1]-40)
               if pygame.mouse.get_pressed() == (1, 0, 0):
                       pygame.draw.line(draw, color, lineStart, lineEnd, size)
               lineStart = lineEnd

       pygame.display.flip()

    Oh, and on another note, just if anyone was curious, here is what the output looks like.. I made a little new year's animation :

    Animation Test

  • Where does FFMPEG store temporary files in Linux ?

    8 juillet 2023, par 001121100

    I canceled the conversion of a very large file in ffmpeg. The incomplete file is taking up almost 200GB on my disk but it does not exist in the directory I was working in and I can't find it anywhere. Where does ffmpeg store temporary, incomplete, or canceled files ?

    


    (I've had a similar problem in the past when running a file recovery program - I canceled the recovery and the files disappeared. They are simply taking up "ghost" space on the directory and can't be located.)

    


    I've tried searching for the filename, clearing the trash, rebooting.