Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (35)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (4692)

  • ffmpeg rtmp streaming process exit

    12 août 2013, par Samson

    I'm using ffmpeg to capture jpeg images from an rtmp stream. Here is the command I use :

    /usr/local/bin/ffmpeg -threads 4 -i rtmp://..../chat/mp4:<variable>.mp4
    -q:v 0.6 -r 15 -s 320x240 /frames/10021237_data/frame-%0999d.jpg

    ffmpeg version N-55388-g9386f33 Copyright (c) 2000-2013 the FFmpeg developers
     built on Aug  8 2013 14:07:38 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
     configuration:
     libavutil      52. 41.100 / 52. 41.100
     libavcodec     55. 24.100 / 55. 24.100
     libavformat    55. 13.102 / 55. 13.102
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 82.100 /  3. 82.100
     libswscale      2.  4.100 /  2.  4.100
     libswresample   0. 17.103 /  0. 17.103
    Input #0, flv, from &#39;rtmp://......./mp4:10021237.mp4&#39;:
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: h264 (Main), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1.92 tbr, 1k tbn, 40 tbc
       Stream #0:1: Audio: nellymoser, 44100 Hz, mono, flt
    [swscaler @ 0x1910000] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to &#39;/frames/10021237_data/frame-%0999d.jpg&#39;:
     Metadata:
       encoder         : Lavf55.13.102
       Stream #0:0: Video: mjpeg, yuvj420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 15 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> mjpeg)
    Press [q] to stop, [?] for help
    </variable>

    However after a few minutes I get this line (before the process exits) :

    video:5264kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000408%

    What exactly is the "muxing overhead" and why is it causing a crash ? Can I solve this or get it some other way (by restarting the process when it exits) ?

    EDIT :

    Actually it's not a crash. I'm running this command from a PHP CLI when a stream starts :

    $command = "/usr/local/bin/ffmpeg -i ".$rtmp." -q:v 0.6 -r 12 -s 320x240 ".__DIR__."/".$dir."/".$naming." >/dev/null 2>/dev/null &amp;";
    shell_exec($command);

    but when one stops streaming all the ffmpeg processes end. Is there a way to make them independent ?

    Even opening 2 terminals and running the command (with different rtmp s)in each (for different streams), killing one of them closes the other one also.

    Bottom line is : How can I make 2 ffmpeg instances independent so as killing one does not kill the other. Is this behaviour expected ?

  • FFMpeg outputs empty stream/file in C#

    15 juin 2017, par Dark0Matter

    I’m making a bot for discord, and I’m currently trying to use ffmpeg to stream an audio file through voice chat. (Which, many other people succeeded in doing it)

    So basically, I’m using libsodium.dll + opus.dll + ffmpeg.exe to turn an mp3 file into a stream using ffmpeg, and output it.

    This is my "CreateStream" function which starts ffmpeg and turns the mp3 file into a stream/pipe.

       private Process CreateStream(string path)
       {
           var ffmpeg = new ProcessStartInfo
           {
               FileName = "ffmpeg.exe",
               //Arguments = $"-hide_banner -loglevel panic -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1",
               Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 pipe:1",
               //Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 testingtesting.mp3",
               UseShellExecute = false,
               RedirectStandardOutput = true,
           };
           return Process.Start(ffmpeg);
       }

    The commented arguments are the other arguments that I’ve tried. (e.g. the last commented arguments line was an attempt to output it to a file instead of a stream, and the file turned out to be empty)

    So basically, my current arguments are

    Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 pipe:1"

    (where pipe:1 is replaceable by any filename such as test.wav)

    and here’s my problem in case you didn’t catch it :

    ffmpeg always outputs empty streams/files.

    Here’s the output that I got in the console.
    https://pastebin.com/zvGgsZZ6

    So my question is,

    Am I using the wrong arguments ?

    And if so, what other arguments can I try to get it fixed ?

    Tl ;dr : ffmpeg outputs empty data to a stream, and it does the same thing when the pipe is replaced by a .wav/.mp3 file.

    EDIT1 : After some time of waiting, I got this : https://pastebin.com/y8rjnsMb

    EDIT2 : I searched for more argument combinations that worked for other people and stumbled upon Arguments = $"-i \"path\" -ab 48000 -f mp3 test.mp3",
    when I tried writing to test.mp3, it worked, but the quality was low.
    Then I tried replacing test.mp3 with pipe:1, but that didn’t work. Help ?

  • ffmpeg x11grab moov atom not found

    30 mars 2021, par Jintor

    2 FFMPEG process

    &#xA;

    (1) generating a ffmpeg x11grab to a .mp4&#xA;(2) take the .mp4 and restream it simultaneously to multiple rtmp endpoints

    &#xA;

    ISSUE the generated file in (1) have this error "moov atom not found"

    &#xA;

    This is the command that generate (1) :

    &#xA;

    ffmpeg -re -y -f x11grab -draw_mouse 0 -framerate 30 &#xA;-video_size $RESOLUTION -i :$DISPLAY_NUM -c:a aac -c:v libx264 &#xA;-movflags &#x2B;faststart -preset ultrafast -crf 28 -refs 4 -qmin 4 &#xA;-pix_fmt yuv420p -filter:v fps=30 file.mp4&#xA;

    &#xA;

    in the (2) => when I try to ffmpeg -i file.mp4 output somewhere : I get "moov atom not found" so the (2) can't read or open (1).

    &#xA;

    What I'm I missing

    &#xA;

    in (1) -movflags &#x2B;faststart doesn't seem to fix the issue

    &#xA;

    ••••••• EDIT : more details on the context ••••••

    &#xA;

    I'm using openvidu : webrtc with kurento and coturn.

    &#xA;

    The record feature creates a .mp4 on the fly as the chat is going on.

    &#xA;

    To start the recording, there is an API call i can make to my server and it automatically stops when all users leaves the chatroom OR do an other api call to stop. see composed video in this link https://docs.openvidu.io/en/2.17.0/advanced-features/recording/

    &#xA;

    openvidu have also webhooks.

    &#xA;

    My problem is not how to stop ffmpeg, but getting FFMPEG to encode while the mp4 or other is being generated "on the fly".

    &#xA;

    There is 2 options :

    &#xA;

    OPTION 1 : individual => 1 .webm per camare => this .webm ffmpeg can restream as hls or RTMP => it's working.

    &#xA;

    OPTION 2 : ** but the issue is with "Composed" video => it's using ffmpeg to x11grab the session... but it's mp4 without moov ato, so ffmpeg don't do anything with this.

    &#xA;

    see the composed.sh script here&#xA;https://github.com/OpenVidu/openvidu/blob/master/openvidu-server/docker/openvidu-recording/scripts/composed.sh

    &#xA;