Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (64)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

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

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

Sur d’autres sites (8680)

  • JavaCV FFmpegFrameRecorder save images to video

    2 décembre 2024, par Learning from masters

    I am a bit confused about the use of JavaCV FFmpegFrameRecorder. I have several byte[] or short[] arrays (depending if my images are 8 or 16 bit) were I have the data related for several images. Now, my idea is to use JavaCPP to send each image to ffmpeg so it creates me a mute video from this collection at the framerate I wish. Up to now I have :

    



    package ffmpeg;

import java.awt.EventQueue;
import java.io.File;
import java.nio.Buffer;
import java.nio.ByteBuffer;

import javax.swing.JFrame;

public class rwa {

    private JFrame frame;

    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    rwa window = new rwa();
                    window.frame.setVisible(true);

                    Frame myframe = new Frame();
                    myframe .imageHeight = 100;
                    myframe .imageWidth = 200;
                    myframe .imageChannels = 1;
                    myframe .imageDepth = 8;

                    byte[] myimage = new byte[20000];

                    //all black
                    for (int j = 0; j/FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(dest);
                    record.setFrameRate(0.04);
                    record.setVideoCodec(13);
                    record.setFormat("mp4");
                    record.setPixelFormat(0);
                    record.setImageHeight(100);
                    record.setImageWidth(200);
                    record.setVideoBitrate(1000000);

                    record.start();
                    for (int i=0; i<100; i++){

                        if (myimage.length*(1+i)<20000) {
                         //this is just for debugging it. I'm creating a different image each frame to see if it works. In practice, I will read in each step the propper image
                        for (int j = myimage.length*i; j/record.record(myframe);
                    }
                    record.stop();
                    record.close();

                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    /**
     * Create the application.
     */
    public rwa() {
        initialize();
    }

    /**
     * Initialize the contents of the frame.
     */
    private void initialize() {
        frame = new JFrame();
        frame.setBounds(100, 100, 450, 300);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

}


    



    But I am getting errors like

    



    


    A fatal error has been detected by the Java Runtime Environment :

    
 


    EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fefe4511d3, pid=6432, tid=0x000000000000027c

    


    



    what is wrong there ? And how should I select the bitrate ? My images, at maximum, will be 16bit 1 channel 2048*2048 pixels.

    



    Thanks !

    


  • Streaming rtsp data to local mp4 file

    11 juillet 2017, par Pankhuri Agarwal

    How can I save live streaming data from a local camera transported by rtsp to my local memory in a .mp4 format.

    I am using Ubuntu 16.04 LTS and tried using ffmpeg 3.3 but nothing seemed to work properly.

    The goal will be to provide live feed by mp4 by html5 and perform some modification on mp4 data.

    Can anyone suggest how to make ffmpeg work or any other way ?

  • openCV save frames from RTSP non blocking

    1er janvier 2020, par Jacob nighFor

    I am building an app that records frames from IP camera through RTSP.

    My engine is in charge to save a video in mp4 with Opencv VideoWriter working well.
    What I am looking for is to create a startRecord and a stopRecord class method that will respectively start and stop recording according to a trigger (it could be an argument that I pass to the thread).
    Is anyone know what the best way to do that kind of stuff ?

    Here is my class :

    from threading import Thread
    import cv2
    import time
    import multiprocessing
    import threading
    class RTSPVideoWriterObject(object):
       def __init__(self, src=0):
           # Create a VideoCapture object
           self.capture = cv2.VideoCapture(src)

           # Start the thread to read frames from the video stream
           self.thread = Thread(target=self.update, args=())
           self.thread.daemon = True
           self.thread.start()

       def update(self):
           # Read the next frame from the stream in a different thread
           while True:
               if self.capture.isOpened():
                   (self.status, self.frame) = self.capture.read()

       def endRecord(self):
           self.capture.release()
           self.output_video.release()
           exit(1)

       def startRecord(self,endRec):

           self.frame_width = int(self.capture.get(3))
           self.frame_height = int(self.capture.get(4))
           self.codec = cv2.VideoWriter_fourcc(*'mp4v')
           self.output_video = cv2.VideoWriter('fileOutput.mp4', self.codec, 30, (self.frame_width, self.frame_height))
           while True:          
               try:
                   self.output_video.write(self.frame)
                   if endRec:
                       self.endRecord()
               except AttributeError:
                   pass




    if __name__ == '__main__':

       rtsp_stream_link = 'rtsp://foo:192.5545....'
       video_stream_widget = RTSPVideoWriterObject(rtsp_stream_link)

       stop_threads = False
       t1 = threading.Thread(target = video_stream_widget.startRecord, args =[stop_threads])
       t1.start()
       time.sleep(15)
       stop_threads = True

    As you can see in the main I reading frames and store them in a separate thread. Then I am starting to record (record method is with an infinite loop so blocking) and then after 15 sec, I am trying to pass a ’stop_record’ argument to stop recording properly.

    A part of the code comes from Storing RTSP stream as video file with OpenCV VideoWriter

    Is someone have an idea ?
    I read a lot that OpenCV can be very tricky for multithreading

    N.