Recherche avancée

Médias (91)

Autres articles (79)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (13876)

  • 4xm : Check that the read track value is non-negative

    3 septembre 2013, par Martin Storsjö
    4xm : Check that the read track value is non-negative
    

    Reported-by : Mateusz "j00ru" Jurczyk and Gynvael Coldwind
    CC : libav-stable@libav.org
    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavformat/4xm.c
  • Split h.264 stream into multiple parts in python

    31 janvier 2023, par BillPlayz

    My objective is to split an h.264 stream into multiple parts, meaning while reading the stream from a pipe i would like to save it into x second long packages (in my case 10).

    &#xA;

    I am using a libcamera-vid subprocess on my Raspberry Pi that outputs the h.264 stream into stdout.
    &#xA;Might be irrelevant, depends : libcamera-vid outputs a message every frame and I am able to locate it at isFrameStopLine&#xA;To convert the stream, I use an ffmpeg subprocess, as you can see in the code below.

    &#xA;

    Imagine it like that :
    &#xA;Stream is running...
    &#xA;- Start recording to a file
    &#xA;- Sleep x seconds
    &#xA;- Finish recording to file
    &#xA;- Start recording a new file
    &#xA;- Sleep x seconds
    &#xA;- Finish recording the new file
    &#xA;- and so on...

    &#xA;

    Here is my current code, however upon running the first export succeeds, and after the second or third the ffmpeg-subprocess is terminating with the error :
    &#xA;pipe:: Invalid data found when processing input
    &#xA;And shortly after, the python process, because of the ffmpeg termination i believe.&#xA;Traceback (most recent call last):   File "/home/survpi-camera/main.py", line 56, in <module>     processStreamLine(readData)   File "/home/survpi-camera/main.py", line 16, in processStreamLine     streamInfo["process"].stdin.write(data) BrokenPipeError: [Errno 32] Broken pipe</module>

    &#xA;

    recentStreamProcesses = []&#xA;streamInfo = {&#xA;    "lastStreamStart": -1,&#xA;    "process": None&#xA;}&#xA;&#xA;def processStreamLine(data):&#xA;    isInfoLine = ((data.startswith(b"[") and (b"INFO" in data)) or (data == b"Preview window unavailable"))&#xA;    isFrameStopLine = (data.startswith(b"#") and (b" fps) exp" in data))&#xA;    if ((not isInfoLine) and (not isFrameStopLine)):&#xA;        streamInfo["process"].stdin.write(data)&#xA;    &#xA;    if (isFrameStopLine):&#xA;        if (time.time() - streamInfo["lastStreamStart"] >= 10):&#xA;            print("10 seconds passed, exporting...")&#xA;            exportStream()&#xA;            createNewStream()&#xA;&#xA;def createNewStream():&#xA;    streamInfo["lastStreamStart"] = time.time()&#xA;    streamInfo["process"] = subprocess.Popen([&#xA;        "ffmpeg",&#xA;        "-r","30",&#xA;        "-i","-",&#xA;        "-c","copy",("/home/survpi-camera/" &#x2B; str(round(time.time())) &#x2B; ".mp4")&#xA;    ],stdin=subprocess.PIPE,stderr=subprocess.STDOUT)&#xA;    print("Created new streamProcess.")&#xA;&#xA;def exportStream():&#xA;    print("Exporting...")&#xA;    streamInfo["process"].stdin.close()&#xA;    recentStreamProcesses.append(streamInfo["process"])&#xA;&#xA;&#xA;cameraProcess = subprocess.Popen([&#xA;    "libcamera-vid",&#xA;    "-t","0",&#xA;    "--width","1920",&#xA;    "--height","1080",&#xA;    "--codec","h264",&#xA;    "--inline",&#xA;    "--listen",&#xA;    "-o","-"&#xA;],stdout=subprocess.PIPE,stdin=subprocess.PIPE,stderr=subprocess.STDOUT)&#xA;&#xA;createNewStream()&#xA;&#xA;while True:&#xA;    readData = cameraProcess.stdout.readline()&#xA;    &#xA;    processStreamLine(readData)&#xA;

    &#xA;

    Thank you in advance !

    &#xA;

  • avformat/4xm : Check for duplicate track ids

    7 décembre 2021, par Michael Niedermayer
    avformat/4xm : Check for duplicate track ids
    

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/4xm.c