Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (15805)

  • Writing frames from camera using skvideo.io.FFmpegWriter

    28 juin 2018, par Liam Deacon

    I’m trying to finely control the video encoding of camera image frames captured on the fly using skvideo.io.FFmpegWriter and cv2.VideoCapture, e.g.

    from skvideo import io
    import cv2

    fps = 60
    stream = cv2.VideoCapture(0)                    # 0 is for /dev/video0
    print("fps: {}".format(stream.set(cv2.CAP_PROP_FPS, fps)))

    stream.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
    stream.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
    print("bit_depth: {}".format(stream.set(cv2.CAP_PROP_FORMAT, cv2.CV_8U)))

    video = io.FFmpegWriter('/tmp/test_ffmpeg.avi',
               inputdict={'-r': fps, '-width': 1920, '-height': 1080},
               outputdict={'-r': fps, '-vcodec': 'libx264', '-pix_fmt': 'h264'}
    )

    try:
       for i in range(fps*10):  # 10s of video
           ret, frame = stream.read()
           video.writeFrame(frame)
    finally:
       stream.release()

    try:
       video.close()
    except:
       pass

    However, I get the following exception (in Jupyter notebook) :

    ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)

    in <module>()
        18     while range(fps*10):
        19         ret, frame = stream.read()
    ---> 20         video.writeFrame(frame)
        21 except BaseException as err:
        22     raise err

    /usr/local/lib/python3.6/site-packages/skvideo/io/ffmpeg.py in writeFrame(self, im)
       446         T, M, N, C = vid.shape
       447         if not self.warmStarted:
    --> 448             self._warmStart(M, N, C)
       449
       450         # Ensure that ndarray image is in uint8

    /usr/local/lib/python3.6/site-packages/skvideo/io/ffmpeg.py in _warmStart(self, M, N, C)
       412         cmd = [_FFMPEG_PATH + "/" + _FFMPEG_APPLICATION, "-y"] + iargs + ["-i", "-"] + oargs + [self._filename]
       413
    --> 414         self._cmd = " ".join(cmd)
       415
       416         # Launch process

    TypeError: sequence item 3: expected str instance, int found
    </module>

    Changing this to video.writeFrame(frame.tostring()) results in ValueError: Improper data input, leaving me stumped.

    How should I go about writing each frame (as returned by OpenCV) to my FFmpegWriter instance ?

    EDIT

    The code works fine if I remove inputdict and outputdict from the io.FFmpegWriter call, however this defeats the purpose for me as I need fine control over the video encoding (I am experimenting with lossless/near-lossless compression of the raw video captured from the camera and trying to establish the best compromise in terms of compression vs fidelity for my needs).

  • How to display live web camera video into video player using ffmpeg

    30 octobre 2013, par Akash Langhani

    I want to use live camera video and play same time in a video player, means record and play parallel, can ffmpeg perform this, if yes then how.

  • Revision 6724 : On ajoute la CSS privée plus quelques éléments de CSS pour la gestion des ...

    27 juin 2012, par kent1 — Log

    On ajoute la CSS privée plus quelques éléments de CSS pour la gestion des plugins
    On utilise #PRODUIRE sur cette CSS pour la générer en statique
    Amélioration du formulaire de gestion des langues
    On ajoute un lien vers la page de gestion des plugins dans la notice des plugins