Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (94)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (6555)

  • Why am I getting an exit status of 1 ?

    24 mai 2018, par Akaisteph7

    So, I am writing this code to analyze this video but I am facing this issue when I try to run it in Spyder, Anaconda :

    import subprocess
    from subprocess import call
    import math

    ##Converts the given file into a series of images
    def Video_to_Image_Converter(fileName):
       res1 = call("ffmpeg -i " + fileName + " -vf fps=1 frame-%d.jpg", shell=True)
       print(res1)
       result = subprocess.Popen('ffprobe -i '+ fileName +' -show_entries format=duration -v quiet -of csv="p=0"', stdout=subprocess.PIPE,stderr=subprocess.STDOUT, shell=True)
       output = result.communicate()
       print(output)
       #return math.ceil(float(output[0])) + 1


    if __name__ == '__main__':
       videoLength = Video_to_Image_Converter('sampleVideo.wmv')
       print(videoLength)

    So, this code worked fine in iPython but I started having issues when trying to use Spyder. res1 should have an exit status of 0 if everything went well but it is 1. However, I do not know what went wrong. All it says when running subprocess.check_output on call is :

    Command 'ffmpeg -i sampleVideo.wmv -vf fps=1 frame-%d.jpg' returned non-zero exit status 1

    Please help.

  • How to use ffmpeg to check video corruption in python ?

    30 octobre 2019, par Jainal Gosaliya

    Hi i am currently having this python code :

    import subprocess
    import shlex

    cmd = "ffmpeg -v error -i 3.mp4 -f null - 2>error.log"
    new_cmd = shlex.split(cmd)
    subprocess_cmd = subprocess.list2cmdline(new_cmd)
    print(subprocess_cmd)
    subprocess.call(new_cmd)

    The issue is when i run the code i get the following error :

    [NULL @ 0x555594682920] Unable to find a suitable output format for ’2>error.log’
    2>error.log : Invalid argument

    Can anyone please help with this !

  • How to extract RTSP stream frames using ffmpeg in python

    3 mars 2024, par Mohammad Dayarneh

    I want to extract the frames from an RTSP stream using a python script like

    


    import subprocess
import cv2
import numpy as np

def extract_frames_and_display(rtsp_url):
    ffmpeg_cmd = [
        "ffmpeg",
        "-i", rtsp_url,
        "-f", "image2pipe",
        "-pix_fmt", "bgr24",
        "-vcodec", "rawvideo",
        "-"
    ]

    ffmpeg_process = subprocess.Popen(ffmpeg_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    try:
        while True:
            raw_frame = ffmpeg_process.stdout.read(1920 * 1080 * 3)
            if not raw_frame:
                break

            frame = np.frombuffer(raw_frame, dtype=np.uint8).reshape((1080, 1920, 3))

            frame = cv2.resize(frame, (800, 600))

            cv2.imshow("RTSP Stream", frame)
            if cv2.waitKey(1) & 0xFF == ord('q'):
                break

    finally:
        cv2.destroyAllWindows()
        ffmpeg_process.terminate()
        ffmpeg_process.wait()

rtsp_url = "rtsp://localhost:8554/live.stream"
extract_frames_and_display(rtsp_url)


    


    The problem in this code is that when showing the extracted frames using opencv they appear like multiple frames togather .. not each frame at a time like when we play a video.