Recherche avancée

Médias (91)

Autres articles (73)

  • 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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (9385)

  • Live video from raw tcp packets

    7 juin 2017, par benuuts

    we are trying to make a small python app that display a live video from sniffed packets using scapy and ffplay. This is part of our master degree research project. The goal is to make a proof of concept app that spies on video transimitted over tcp.
    We have a working script that writes into a .dat file and then we read it using ffplay. It works ok but have a lot of latency and we think we could do better : directly stream it into ffplay without the need to write raw data in a file.

    Here’s our script :

    from scapy.all import *
    import os

    export_dat = open("data.dat", "a")

    def write_packet_raw(packet):
       export_dat.write(str(packet.getlayer(Raw)))

    def realtime_packet():
       p = sniff(iface="wlan0", filter="tcp and (port 5555)", count=5000, prn=write_packet_raw)

    realtime_packet()
    export_dat.close()

    And then we launch : ffplay -window_title Videostream -framedrop -infbuf -f h264 -i data.dat

    Any idea on how we can achieve that ? thanks.

  • Matplotlib animation quality loss

    28 juin 2017, par Doe a

    I’m currently trying to use matplotlib to animate a grid using imshow. However, I am finding a fairly significant quality loss in the animation.

    Below is a simple animation that illustrates my issue fairly well. If you look at any particular frame of imagelist, you will see that there is no aliasing or gradient between colours. But if I then look at one frame of my animation, that is no longer the case. There is now a 4-5 pixel gradient between my blocks of colour. Does anyone know how I can get around this compression ? The file size of the animation doesn’t matter too much, as long as I can get a good quality animation.

    #Create list of images
    image=np.array([[[0,0,0],(0.7,0,0),(0,0,0),(0,0,0.8)]])
    imagelist=[]
    for i in range(0,100):
       image[0][1][0]=i/100
       imagelist.append(np.copy(image))

    #Create figure    
    fig = plt.figure()
    plt.axis('off')
    im = plt.imshow(imagelist[0], vmin=0, vmax=255,interpolation='none');

    #Animation
    def updatefig(j):
       im.set_array(imagelist[j])
       return [im]
    ani = animation.FuncAnimation(fig, updatefig, frames=range(len(imagelist)), interval=20, blit=False)

    #Save animation
    FFMpegWriter = animation.writers['ffmpeg']
    mywriter = FFMpegWriter(fps=30, bitrate=5000)
    ani.save("test.mp4", writer=mywriter,codec="libx264")
  • How to stop recording dynamically in FFMPEG CLI Wrapper java

    14 décembre 2017, par user2237529

    https://github.com/bramp/ffmpeg-cli-wrapper/issues/13

    public class ScreenCaptureFFMPEG {

       public static void record(String outputVideo, String time) throws Exception
       {
           RunProcessFunction func = new RunProcessFunction();

           FFmpeg ffmpeg = new FFmpeg("C:\\FFMPEG\\ffmpeg.exe");
           FFmpegBuilder builder = new FFmpegBuilder()
                   .addExtraArgs("-rtbufsize", "1500M")
                   .addExtraArgs("-r", "30")
                   .setFormat("dshow")
                   .setInput("video=\"screen-capture-recorder\"")
                   .addOutput(outputVideo)
                   .setFormat("mp4")
                   .addExtraArgs("-crf", "0")
                   .setVideoCodec("libx264")
                   //.addExtraArgs("-ac", "1")
                   .addExtraArgs("-y")
           //overwrite file name

                   // .setAudioCodec("libmp3lame")
                   // .setAudioSampleRate(FFmpeg.AUDIO_SAMPLE_44100)
                   //  .setAudioBitRate(1_000_000)

                   //.addExtraArgs("-ar", "44100")
                   .addExtraArgs("-t", time)

                   //.setVideoPixelFormat("yuv420p")
                   //.setVideoResolution(426, 240)
                   //.setVideoBitRate(2_000_000)
                   //.setVideoFrameRate(30)
                   //.addExtraArgs("-deinterlace")
                   //.addExtraArgs("-preset", "medium")
                   //.addExtraArgs("-g", "30")
                   .done();
           FFmpegExecutor executor = new FFmpegExecutor(ffmpeg);

           executor.createJob(builder).run();


       }

       public static void capture(String name) throws Exception
       {
           BufferedImage image = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
           ImageIO.write(image, "png", new File(name));

       }

       public static void main(String[]args) throws Exception {

           capture("start.png");
           //record("TC_test.mp4", "00:00:10");
           capture("end.png");
           Thread t = new Thread(new Runnable() {
               @Override
               public void run() {
                   // Insert some method call here.
                   try {
                       record("TC_test.mp4", "00:00:10");
                   }
                   catch(Exception e)
                   {
                       System.out.println("hello");
                   }
               }
           });
           Thread.sleep(5000);

           t.interrupt();

       }
    }

    I am trying to stop the recording by killing the subprocess or if there is any other method its fine too. But I am unable to do that. I know its supported according to the github link. How do I kill a subprocess please ?

    PS : THis is the first time i post a question on stackoverflow so If I made any mistakes please excuse me and provide details on how i can improve