Recherche avancée

Médias (91)

Autres articles (112)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (11731)

  • How to save a vvideo from a RTSP server using Ffmpeg in C++ ?

    20 septembre 2021, par Tolga

    I am using Ffmpeg remuxing example code to save a mp4 file into another file. However my actual goal is saving the video from a RTSP server. The example works fine with the normal .mp4 files but when I try to save the video from RTSP Server I get following error on command prompt.

    


    [mp4 @ 02F9A8C0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 3000


    


    The RTSP server is created on my computer for testing using python gstream. I used the script here.

    


    Ffmpeg code in C++ is below where error occurs.

    


            iCamera->stream = iCamera->fmt->streams[iCamera->pkt->stream_index];
        iCamera->pkt->stream_index = map->stream_map[iCamera->pkt->stream_index];
        oCamera->stream = oCamera->fmt->streams[iCamera->pkt->stream_index];

        iCamera->pkt->pts = av_rescale_q_rnd(iCamera->pkt->pts, iCamera->stream->time_base, oCamera->stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
        iCamera->pkt->dts = av_rescale_q_rnd(iCamera->pkt->dts, iCamera->stream->time_base, oCamera->stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
        iCamera->pkt->duration = av_rescale_q(iCamera->pkt->duration, iCamera->stream->time_base, oCamera->stream->time_base);
        iCamera->pkt->pos = -1;
        
        if (av_interleaved_write_frame(oCamera->fmt, iCamera->pkt)) {
            printf("Error occured while muxing packet.\n"); exit(1);
        }


    


  • Stream data chunk with ffmpeg

    22 mai 2020, par Amit Levy

    I have a react native app, and i'm using 'react-native-sound-recorder' to capture audio data chunks.

    



    AudioRecord.on('data', (data) => {
  // use data here
});


    



    I'm able to save the file to file system, but I would like to stream the 'data' variable (the audio data chunk) using ffmpeg to server, but can't find the proper ffmpeg command (all i found was commands to stream from specific input or file).

    


  • PIL image save causes FFMPEG to fail

    6 janvier 2023, par Xorgon

    I have been attempting to convert some videos using FFMPEG with image2pipe using PIL. I have found that when the frame is particularly simple (such as all one colour), it causes FFMPEG to fail with the following message :

    


    [image2pipe @ 000001785b599bc0] Could not find codec parameters for stream 0 (Video: none, none): unknown codec&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, image2pipe, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0: Video: none, none, 24 tbr, 24 tbn, 24 tbc&#xA;Output #0, mp4, to &#x27;<your filepath="filepath" here="here">/test.mp4&#x27;:&#xA;Output file #0 does not contain any stream&#xA;</your>

    &#xA;

    The minimum code I have found to reproduce this is as follows :

    &#xA;

    import numpy as np&#xA;from subprocess import Popen, PIPE&#xA;from PIL import Image&#xA;&#xA;output_file = "<your filepath="filepath" here="here">/test.mp4"&#xA;&#xA;p = Popen([&#x27;ffmpeg&#x27;,&#xA;           &#x27;-y&#x27;,  # Overwrite files&#xA;           &#x27;-f&#x27;, &#x27;image2pipe&#x27;,  # Input format&#xA;           &#x27;-r&#x27;, &#x27;24&#x27;,  # Framerate&#xA;           &#x27;-i&#x27;, &#x27;-&#x27;,  # stdin&#xA;           &#x27;-c:v&#x27;, &#x27;libx264&#x27;,  # Codec&#xA;           &#x27;-preset&#x27;, &#x27;slow&#x27;,&#xA;           &#x27;-crf&#x27;, f&#x27;18&#x27;,  # H264 Constant Rate Factor (quality, lower is better)&#xA;           output_file], stdin=PIPE)&#xA;&#xA;# This one works&#xA;# vid = np.random.randint(0, 255, (10, 64, 64))  # Create a 64x64 &#x27;video&#x27; with 10 frames of random noise&#xA;&#xA;# This one does not&#xA;vid = np.full((10, 64, 64), 129)  # Create a 64x64 &#x27;video&#x27; with 10 frames of pure grey&#xA;&#xA;for frame in vid:&#xA;    im = Image.fromarray(np.uint8(frame))&#xA;    im.save(p.stdin, &#x27;JPEG&#x27;)&#xA;&#xA;p.stdin.close()&#xA;p.wait()&#xA;</your>

    &#xA;

    Notably, if I do the same thing with a randomly generated series of frames (commented as "This one works" in the script above), it will output fine.

    &#xA;

    One workaround I have found so far is to replace 'JPEG' with 'PNG' in the im.save(...) call. However, I would be interested in understanding what causes it to fail with JPEG.

    &#xA;