Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (64)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (10861)

  • Convert a video and capture a jpeg frame via ffmpeg php

    15 mai 2014, par HackerManiac

    Can anyone give a code on how do i covert a video using ffmpeg.

    As thought currently i have only uploading system.

    vu.php(only a part is shown)

    define('UPLOAD','../../videos/');
       $fileName = time().$file['name'];
       $target = UPLOAD.$fileName;

     if(move_uploaded_file($file['tmp_name'],$target)){                
         exec("ffmpeg -i ".UPLOAD." ".UPLOAD.$filename.".flv");
     }

    This pice of code block just uploads the video on video folder but does not converts it to .flv.
    I am not sure how to use ffmpeg.

    My diretory looks like this

    www[localhost]->videos[videos folder]
    www[localhost]->pictures[pictures folder]
    www[localhost]->resources[folder]->php[folder]->vu.php

    I also want to return a .jpg image of any frame of video through json by converting via ffmpeg and uploading it to pictures folder.

    return json_encode(array("thumbnail"=>$image_src));
  • Screen recorder in Ubuntu using python

    3 août 2013, par mridul

    I am a hobby programmer and trying to make screen-recorder in Ubuntu using python.
    Using this code able to take screenshot.

    import wx
    app = wx.App(False)
    s = wx.ScreenDC()
    w, h = s.Size.Get()
    b = wx.EmptyBitmap(w, h)
    m = wx.MemoryDCFromDC(s)
    m.SelectObject(b)
    m.Blit(0, 0, w, h, s, 0, 0)
    m.SelectObject(wx.NullBitmap)
    b.SaveFile("screenshot.png", wx.BITMAP_TYPE_PNG)

    And using loop I take more pictures and create video using these screen shots.My code is given bellow,

    import wx,os
    app=wx.App(False)
    s = wx.ScreenDC()
    w, h = s.Size.Get()
    b = wx.EmptyBitmap(w, h)
    m = wx.MemoryDCFromDC(s)
    i=0
    while i<50:
      m.SelectObject(b)
      m.Blit(0, 0, w, h, s, 0, 0)
      m.SelectObject(wx.NullBitmap)
      b.SaveFile('{0:05d}.png'.format(i), wx.BITMAP_TYPE_PNG)
      i+=1
    os.system('ffmpeg -f image2 -r 8 -i %05d.png -vcodec mpeg4 -y movie1.mp4')
    i=0  
    while i<50:
      os.remove('{0:05d}.png'.format(i))
      i += 1   `

    In above code I take 50 pictures and store as 00000.png to 00049.png and make video using ffmpeg.
    After creating video I delete all pictures.

    Current Problems :

    • Very small delay between screen shoots. If try to record videos using this code out put is not perfect.
    • For recording long time it is not efficient. It take lot of hard drive memory to store screen shoots. And use more CPU .

    What I do for get code more efficient ? Using pure python how to create video from pictures ? Is there any alternative methods to record screen ?
    I like to improve my code.

  • How do I resize my video ? in proportion (python)

    23 septembre 2022, par ggn0

    *I am sorry for my poor English. It's a translator.

    


    I used Python moviepy to resize it, but the pixels are broken. I want to make the video 9:16 ratio while maintaining the original image quality. (So that there are black frames on both sides)

    


    from moviepy.editor import *
c = VideoFileClip('test.mp4')
f = c.resize(newsize=(1080,1920))
f.write_videofile('aa.mp4')


    


    This code causes pixels to collapse.

    


    Let me show you an example picture.

    


    Original Video Example

    


    The video I want

    


    Pictures that come out using movie resize (other example pictures, pixels collapse and proportions collapse) Pictures that I don't want

    


    It doesn't have to be moviepy, so I'd appreciate it if you could tell me how to use Python. (PIL ? opencv ?)

    


    Thank you so much. Have a nice day 🙏