Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (56)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (7702)

  • Live streaming doesn't work

    18 octobre 2017, par John Smith

    I’m using FFmpeg to capture my screen :

    ffmpeg -f dshow -i video="UScreenCapture" -r 5 -s 640x480 -acodec libmp3lame -ac 1 -vcodec mpeg 4 -vtag divx -q 10 -f mpegts tcp://127.0.0.1:1234

    so let it stream to somewhere. The accepter script :

    error_reporting(E_ALL); /* Allow the script to hang around waiting for connections. */
    set_time_limit(30); /* Turn on implicit output flushing so we see what we're getting as it comes in. */
    ob_implicit_flush();


    $address = '127.0.0.1';
    $port = 1234;
    $outfile = dirname(__FILE__)."/output.flv";
    $ofp = fopen($outfile, 'wb');

    if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) { echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n"; sleep (5); die; }
    if (socket_bind($sock, $address, $port) === false) { echo "socket_bind() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n"; sleep (5); die; }
    if (socket_listen($sock, 5) === false) { echo "socket_listen() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n"; sleep (5); die; }
    if (($msgsock = socket_accept($sock)) === false) { echo "socket_accept() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n"; sleep (5); break; }
    do {
       $a = '';
       socket_recv ($msgsock, $a, 65536, MSG_WAITALL);
       fwrite ($ofp, $a);
       //echo strlen($a)."\r\n";
    } while (true);

    it seems to save the stuff to the disk OK. Now here comes the html :

    I dont really know how to do this, but based on an example :

    <video src="/output.flv"></video>

    but it doesn’t do anything. And if I want to stream the live incoming stuff, then what’s the matter ?

  • Rotate 90 and concatenate videos with ffmpeg

    20 avril 2024, par leonp

    I have several videos made in landscape and portrait modes. I want to concatenate them into one movie.

    &#xA;

    For this I rotated portrait videos with :

    &#xA;

    ffmpeg -i in.mp4 -vf transpose=1 out.mp4    &#xA;

    &#xA;

    Built the list of files to concatenate and concatenated all of them with :

    &#xA;

    ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4    &#xA;

    &#xA;

    The result is unplayable. All players hang/crash at the first switch from landscape to rotated portrait fragment.

    &#xA;

    What do I do wrong ?

    &#xA;

    In reply to LordNeckbeard request :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;1.mp4&#x27;:&#xA;Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;    creation_time   : 2017-07-20T12:50:32.000000Z&#xA;  Duration: 00:00:30.36, start: 0.000000, bitrate: 20202 kb/s&#xA;    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 20005 kb/s, SAR 1:1 DAR 16:9, 29.45 fps, 29.42 tbr, 90k tbn, 180k tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2017-07-20T12:50:32.000000Z&#xA;      handler_name    : VideoHandle&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 156 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2017-07-20T12:50:32.000000Z&#xA;      handler_name    : SoundHandle&#xA;&#xA;Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;2.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;    creation_time   : 2017-07-24T13:57:42.000000Z&#xA;  Duration: 00:00:31.94, start: 0.000000, bitrate: 20171 kb/s&#xA;    Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 19997 kb/s, SAR 1:1 DAR 16:9, 29.43 fps, 29.42 tbr, 90k tbn, 180k tbc (default)&#xA;    Metadata:&#xA;      rotate          : 90&#xA;      creation_time   : 2017-07-24T13:57:42.000000Z&#xA;      handler_name    : VideoHandle&#xA;    Side data:&#xA;      displaymatrix: rotation of -90.00 degrees&#xA;    Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 156 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2017-07-24T13:57:42.000000Z&#xA;      handler_name    : SoundHandle&#xA;&#xA;At least one output file must be specified```&#xA;

    &#xA;

  • FFmpeg hangs on buffer fill c++

    2 mars 2021, par Derek Halden

    I'm processing a bunch of frames from an RTSP stream using ffmpeg. I end up doing a lot of processing on these frames, which means that I'm not always pulling in real-time. If the buffer gets full, the process hangs. I'm wondering if one of the following solutions is feasible/fixes the problem, and if so, how I would implement it using the ffmpeg libraries :

    &#xA;&#xA;

    1) Is there a way to clear the buffer if I ever reach a point where it's hanging ? (I can determine when it's hung, I just don't know what to do about it).

    &#xA;&#xA;

    2) Is there a way to make the buffer overwrite the old data, and just always read the most recent data ? It doesn't matter to me if I lose frames.

    &#xA;&#xA;

    3) I've already discovered that I can make the buffer arbtrarily large with : av_dict_set(&amp;avd, "buffer_size", "655360", 0);. This could be a solution, but I don't know how large/small it needs to be, because I don't know how long the stream will post video for ?

    &#xA;&#xA;

    4) Is this just a bug that I need to bring up with the ffmpeg people ?

    &#xA;&#xA;

    5) Something else I haven't considered ?

    &#xA;&#xA;

    while(av_read_frame(context, &amp;(packet)) >= 0 &amp;&amp; fcount &lt; fps*SECONDS) {&#xA;    clock_t start, end;&#xA;    int ret = avcodec_send_packet(codec_context, packet);&#xA;    if(!(packet->stream_index == video_stream_index)) {&#xA;      continue;&#xA;    }&#xA;&#xA;    if (ret == AVERROR(EAGAIN) || ret == AVERROR(EINVAL)) {&#xA;      continue;&#xA;    } else if (ret &lt; 0) {&#xA;      cerr &lt;&lt; "Error while decoding frame " &lt;&lt; fcount &lt;&lt; endl;&#xA;      exit(1);&#xA;    }&#xA;&#xA;    ret = avcodec_receive_frame(codec_context, frame);&#xA;    if (ret == AVERROR(EAGAIN) || ret == AVERROR(EINVAL)) {&#xA;      continue;&#xA;    } else if (ret &lt; 0) {&#xA;      cerr &lt;&lt; "Error while decoding frame " &lt;&lt; fcount &lt;&lt; endl;&#xA;      exit(1);&#xA;    }&#xA;&#xA;    sws_scale(img_convert_ctx, frame->data, frame->linesize, 0,&#xA;              codec_context->height, picture_rgb->data, picture_rgb->linesize);&#xA;&#xA;    if(!frame) {&#xA;      cerr &lt;&lt; "Could not allocate video frame" &lt;&lt; endl;&#xA;      exit(1);&#xA;    }&#xA;&#xA;    if(codec_context == NULL) {&#xA;      cerr &lt;&lt; "Cannot initialize the conversion context!" &lt;&lt; endl;&#xA;      exit(1);&#xA;    }&#xA;&#xA;    // Do something with the frame here&#xA;&#xA;    fcount&#x2B;&#x2B;;&#xA;    av_packet_unref(&amp;(packet));&#xA;&#xA;}&#xA;

    &#xA;&#xA;

    I have added the code that causes the program to hang.

    &#xA;