Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (98)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (12426)

  • libavformat/hls : add support for decryption of HLS media segments encrypted using...

    21 septembre 2021, par Nachiket Tarate
    libavformat/hls : add support for decryption of HLS media segments encrypted using SAMPLE-AES encryption method
    

    Apple HTTP Live Streaming Sample Encryption :

    https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption

    Signed-off-by : Nachiket Tarate <nachiket.programmer@gmail.com>
    Signed-off-by : Steven Liu <lq@chinaffmpeg.org>

    • [DH] libavformat/Makefile
    • [DH] libavformat/hls.c
    • [DH] libavformat/hls_sample_encryption.c
    • [DH] libavformat/hls_sample_encryption.h
    • [DH] libavformat/mpegts.c
  • Python OpenCV VideoCapture Color Differs from ffmpeg and Other Media Players

    17 avril 2024, par cliffsu

    I’m working on video processing in Python and have noticed a slight color difference when using cv2.VideoCapture to read videos compared to other media players.

    &#xA;

    enter image description here

    &#xA;

    I then attempted to read the video frames directly using ffmpeg, and despite using the ffmpeg backend in OpenCV, there are still differences between OpenCV’s and ffmpeg’s output. The frames read by ffmpeg match those from other media players.

    &#xA;

    enter image description here

    &#xA;

    Below are the videos I’m using for testing :

    &#xA;

    test3.webm

    &#xA;

    test.avi

    &#xA;

    Here is my code :

    &#xA;

    import cv2&#xA;import numpy as np&#xA;import subprocess&#xA;&#xA;def read_frames(path, res):&#xA;    """Read numpy arrays of video frames. Path is the file path&#xA;       and res is the resolution as a tuple."""&#xA;    args = [&#xA;        "ffmpeg",&#xA;        "-i",&#xA;        path,&#xA;        "-f",&#xA;        "image2pipe",&#xA;        "-pix_fmt",&#xA;        "rgb24",&#xA;        "-vcodec",&#xA;        "rawvideo",&#xA;        "-",&#xA;    ]&#xA;&#xA;    pipe = subprocess.Popen(&#xA;        args,&#xA;        stdout=subprocess.PIPE,&#xA;        stderr=subprocess.DEVNULL,&#xA;        bufsize=res[0] * res[1] * 3,&#xA;    )&#xA;&#xA;    while pipe.poll() is None:&#xA;        frame = pipe.stdout.read(res[0] * res[1] * 3)&#xA;        if len(frame) > 0:&#xA;            array = np.frombuffer(frame, dtype="uint8")&#xA;            break&#xA;&#xA;    pipe.stdout.close()&#xA;    pipe.wait()&#xA;    array = array.reshape((res[1], res[0], 3))&#xA;    array = cv2.cvtColor(array, cv2.COLOR_RGB2BGR)&#xA;    return array&#xA;&#xA;ORIGINAL_VIDEO = &#x27;test3.webm&#x27;&#xA;&#xA;array = read_frames(ORIGINAL_VIDEO, (1280, 720))&#xA;&#xA;cap = cv2.VideoCapture(ORIGINAL_VIDEO, cv2.CAP_FFMPEG)&#xA;while cap.isOpened():&#xA;    ret, frame = cap.read()&#xA;    if not ret:&#xA;        break&#xA;    print(frame.shape)&#xA;    cv2.imshow("Opencv Read", frame)&#xA;    cv2.imshow("FFmpeg Direct Read", array)&#xA;    cv2.waitKeyEx()&#xA;    cv2.waitKeyEx()&#xA;    break&#xA;cap.release()&#xA;

    &#xA;

    I’ve attempted to use different media players to compare cv2.VideoCapture and ffmpeg’s frame reading, to confirm that the issue lies with opencv. I’m looking to determine whether it’s a bug in OpenCV or if there are issues in my code.

    &#xA;

    EDIT :

    &#xA;

    Just use the following code to check the difference between opencv read and ffmpeg read.

    &#xA;

    cv2.imshow(&#x27;test&#x27;, cv2.absdiff(array, frame)*10)&#xA;cv2.waitKey(0)&#xA;

    &#xA;

    Here is the result :&#xA;enter image description here

    &#xA;

  • fftools/ffmpeg : store stream media type in OutputStream

    11 avril 2023, par Anton Khirnov
    fftools/ffmpeg : store stream media type in OutputStream
    

    Reduces access to a deeply nested muxer property
    OutputStream.st->codecpar->codec_type for this fundamental and immutable
    stream property.

    Besides making the code shorter, this will allow making the AVStream
    (OutputStream.st) private to the muxer in the future.

    • [DH] fftools/ffmpeg.c
    • [DH] fftools/ffmpeg.h
    • [DH] fftools/ffmpeg_mux.c
    • [DH] fftools/ffmpeg_mux_init.c