Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (60)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

Sur d’autres sites (8837)

  • Revision 33199783ea : Added tests for high bit depth quantize functions This was originally part of c

    4 juin 2015, par Julia Robson

    Changed Paths :
     Add /test/quantize_test.cc


     Modify /test/test.mk



    Added tests for high bit depth quantize functions

    This was originally part of change-id:Idef18f90b111a0d0c9546543d3347e551908fd78
    but the rest of that patch has previously been incorporated into nextgen
    without these tests.

    Change-Id : I6ac491ed1cfc153e0ed3cb999c76feac9d5e74e3

  • OpenCV reading from live camera creates a short video that moves quickly

    17 novembre 2022, par user19019404

    I am reading in a live vide stream from a CCTV camera. The camera is set to 5 fps, another is set to 25fps and another to 30fps. Irrespective of the FPS that the camera is set, I can record 5 minutes but end up with a 30 second recorded clip where everyone is running around the scene.

    


    My code is the 'typical' read in video and write video code that you would find online such as (code below simplified for readability) :

    


    import cv2

video = cv2.VideoCapture(live RTSP address of camera)

if (video.isOpened() == False):
    print("Error reading video file")
else:
    frame_width = video.get(cv2.CAP_PROP_FRAME_WIDTH)
    frame_height = video.get(cv2.CAP_PROP_FRAME_HEIGHT)
    frame_fps = video.get(cv2.CAP_PROP_FPS)
    size = (frame_width, frame_height)
    result = cv2.VideoWriter('filename.avi',cv2.VideoWriter_fourcc(*'MJPG'),frame_fps , size)

    while(True):
        ret, frame = video.read()
        if ret == True:
            result.write(frame)
            cv2.imshow('Frame', frame)
        if cv2.waitKey(1) & 0xFF == ord('s'):
            break
        else:
            break
    video.release()
    result.release()
    cv2.destroyAllWindows()
print("The video was successfully saved with new fps")


    


    I have tried playing with the FPS by reading in the FPS from the live camera and using the same FPS in the video write, but all that results is a video that is a fraction of the real time and with people zooming around the scene. So watching a 5 minute smooth video results in a 20 second recorded video with everyone zooming around.

    


    Is this something that I need to fix in the writing of the video or do I need a second pass with ffmpeg to readjust the video ?

    


    Much appreciated

    


    Update, corrected the code above and :
When printing the frames read and the frame written the numbers are the same, showing that each frame that is read is being written (so I am not losing frames along the way thereby writing half the amount of frames).

    


  • FFMpeg ZeroMQ Filter stops working after a short while

    22 septembre 2017, par Casper Alant

    I run FFMpeg as follows :

    #!/bin/bash
    fc="[1]scale=iw/2:ih/2 [pip]; [pip] zmq=bind_address=tcp\\\://127.0.0.1\\\:1235,[0]overlay=x=0:y=0"
    ffmpeg -v verbose -re -y -i test.mkv -i test2.mkv -filter_complex "$fc" -f mpegts -codec:v libx264 -preset ultrafast resultzmq.mp4

    I then start a Python 3 app to send zmq commands to FFMpeg :

    import zmq
    import time
    import sys
    from  multiprocessing import Process

    context = zmq.Context()
    port = "1235"
    print("Connecting to server with port {}".format(port))
    socket = context.socket(zmq.REQ)
    socket.connect("tcp://localhost:{}".format(port))
    for request in range (20):
       print("Sending request ", request, "...")
       socket.send_string("Parsed_overlay_2 x 200")
       message = socket.recv()
       print("Received reply ", request, "[", message, "]")
       time.sleep (1)

    Which runs fine up until about 40 seconds when I get this from Ffmpeg (it stops getting the command) :

    frame=  918 fps= 24 q=19.0 size=   12192kB time=00:00:38.82 bitrate=2572.6kbits
    frame=  931 fps= 24 q=19.0 size=   12402kB time=00:00:39.30 bitrate=2585.1kbits
    [Parsed_zmq_1 @ 0x56185e089220] Processing command #8 target:Parsed_overlay_2 command:x arg:200
    [Parsed_zmq_1 @ 0x56185e089220] Sending command reply for command #8:
    0 Success
    frame=  938 fps= 24 q=19.0 size=   12516kB time=00:00:39.82 bitrate=2574.1kbits/frame=  952 fps= 24 q=19.0 size=   12752kB time=00:00:40.33 bitrate=2590.0kbits/[Parsed_zmq_1 @ 0x56185e089220] Processing command #9 target:Parsed_overlay_2 command:x arg:200
    [Parsed_zmq_1 @ 0x56185e089220] Sending command reply for command #9:
    0 Success
    frame=  963 fps= 24 q=19.0 size=   12932kB time=00:00:40.81 bitrate=2595.6kbits
    frame=  976 fps= 24 q=19.0 size=   13121kB time=00:00:41.31 bitrate=2601.4kbits
    frame=  992 fps= 24 q=19.0 size=   13434kB time=00:00:41.84 bitrate=2629.9kbits
    frame= 1002 fps= 24 q=18.0 size=   13582kB time=00:00:42.34 bitrate=2627.2kbits

    and this from the Python 3 client :

    Sending request  8 ...
    Received reply  8 [ b'0 Success' ]
    Sending request  9 ...
    Received reply  9 [ b'0 Success' ]
    Sending request  10 ...

    The disconnect always happens at the same time, no matter when I start the Python client. If I start it after 40 seconds, it won’t send any commands at all.

    On my actual application, the same thing happens but at about 60 seconds.

    I tried setting up a simple Python server/client and the problem does not occur. So I assume the problem must have something to do with FFMpeg and its zmq plugin ?

    If you would like to test this yourself, just make sure test.mkv and test2.mkv is some video longer than 1 minute.

    I would really appreciate any assistance !