Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (61)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (13314)

  • Reading colors encoded in image at a position changes its value after decoded from video using php and ffmpeg

    29 novembre 2022, par Jeenus Junanio

    I created a piece of code to encode unique color on image and converted the image to PNG so that it would be lossless. After This I created a video with the frame using this image using the ffmpeg in php shellexec(). After saving this video I reopened it to extract the frmae image added and tried to read those values from the image. Now the values on the image are a bit changed.

    


    Here is the code that I tried to create the video :

    


    $canvas = imagecreatefromjpeg('translate/first_frame.jpg');
        // create a random color
        $rand = str_pad(dechex(rand(0x000000, 0xFFFFFF)), 6, 0, STR_PAD_LEFT);
        $dec_color= hexdec($rand);

        // add the new color to image

        for ($i=0; $i < 24; $i++) { 
           imagesetpixel($canvas,$i,0,$dec_color);
        }

        // store the image and close the file opened

        // $filename = 'translate/test/output.png'; 
        $filename = 'translate/test/output.bmp'; 

        // imagepng($canvas, $filename);
        imagebmp($canvas, $filename);

        imagedestroy($canvas);

        $frame      = $filename; // an image(png,gif,etc)
        $audio      = 'translate/output/audio/abcdefghijklmnopqrstuvwxya.mp3';
        $output     = 'translate/output/video/'.time().'.mp4';   

        $cmd = 'ffmpeg -loop 1 -y -i '.$frame.' -i '.$audio.' -c:v libx264 -tune stillimage -c:a copy -shortest '.$output;
        shell_exec($cmd);


    


    This above code is creating the video with the image.

    


    Now I tried to extract the image video and color from image, the colors are a bit changed.

    


    if($request->hasFile(&#x27;video&#x27;)){&#xA;            $file = $request->file(&#x27;video&#x27;);&#xA;            $filename = $file->getClientOriginalName();&#xA;            $path = public_path(&#x27;translate/test/&#x27;);&#xA;        }else{&#xA;            return &#x27;No file uploaded&#x27;;&#xA;        }&#xA;        &#xA;        &#xA;        if ($file->move($path, $filename)) {&#xA;            $video = &#x27;translate/test/&#x27;.$filename;&#xA;        }else{&#xA;            return &#x27;error file upload&#x27;;&#xA;        }&#xA;&#xA;       &#xA;        // $output = &#x27;translate/output/image/&#x27;.time().&#x27;.png&#x27;;&#xA;        $output = &#x27;translate/output/image/&#x27;.time().&#x27;.bmp&#x27;;&#xA;        // $output = &#x27;translate/output/image/&#x27;.time().&#x27;.jpg&#x27;;&#xA;&#xA;        $cmd = &#x27;ffmpeg -i &#x27;.$video.&#x27; -vframes 1 &#x27;.$output;&#xA;        shell_exec($cmd);&#xA;&#xA;&#xA;// $dimg = imagecreatefrompng($output);&#xA;        $dimg = imageCreateFromBmp($output);&#xA;        // $dimg = imagecreatefromjpeg($output);&#xA;&#xA;        $extracted_color = array();&#xA;&#xA;        for ($x=0; $x &lt; 24 ; $x&#x2B;&#x2B;) { &#xA;          $extracted_color[]= imagecolorat($dimg, $x, 0);&#xA;        }&#xA;&#xA;        echo "<br />Retrived colors:<pre>".print_r($extracted_color,1)."</pre>";&#xA;&#xA;        imagedestroy($dimg);&#xA;&#xA;&#xA;&#xA;

    &#xA;

    The color added was 44743072 but the colors retrieved are 4539914,4474121,4408072,4408326 from x=0,y=0 to x=24,y=0.

    &#xA;

    In both PNG and BMP I am loosing the added pixels. You can clearly see in my code i have commented the code for png to read the image as bmp.

    &#xA;

    Can someone let me know if I miss anything here.

    &#xA;

  • FFMPEG Stream to Instagram Via instafeed.me OR YellowDuck

    3 mars 2024, par Jintor

    I'm trying to do video stream via RTMP to Instagram with FFMPEG

    &#xA;

    I'm able to do it to facebook and twitter, but instagram is an other beast...

    &#xA;

    when I create a live broadcast in rtmp.in or yellowduck I get a stream key

    &#xA;

    when I do this

    &#xA;

    ffmpeg -rtbufsize 256M -re -i file.webm -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv rtmps://live-upload.instagram.com:443/rtmp/--key--here--&#xA;

    &#xA;

    ffmpeg outputs nothing, no error and I see no video in instafeed panel :(

    &#xA;

    In other network I got sometimes error in ffmpeg log... but when it's to instagram : just blank nothing

    &#xA;

    what do I miss ?

    &#xA;

    here the log

    &#xA;

    ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)&#xA;  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;

    &#xA;

    and completely blank, no error, no framerate infos like any other transcoding...

    &#xA;

  • FFMPEG Multiple outputs from BlackMagic input

    24 septembre 2018, par leo_dragons

    I’m currently needing help to achieve multiple outputs from one input.
    Right now, the outputs are set like this :

    ffmpeg -re -f decklink -i "DeckLink Mini Recorder" -y -pix_fmt yuv420p -c:v h264 -preset fast -tune zerolatency -c:a aac -ac 2 -b:a 128k -ar 44100 -async 1 -b:v 2300k -g 5 -probesize 32 -framerate 30 -movflags +faststart -s 1280x720 -bufsize 1000k -maxrate 3072k -shortest -f flv "rtmp://10.0.0.172:1935/Testing/live_720p"
    ffmpeg -re -i "rtmp://10.0.0.172:1935/Testing/live_720p" -c:v h264 -preset fast -tune zerolatency -c:a aac -ac 2 -b:a 114k -ar 44100 -async 1 -b:v 900k -g 5 -probesize 32 -framerate 30 -movflags +faststart -s 854x480 -bufsize 400k -maxrate 1000k -shortest -f flv "rtmp://10.0.0.172:1935/Testing/live_480p_hq"
    ffmpeg -re -i "rtmp://10.0.0.172:1935/Testing/live_720p" -c:v h264 -preset fast -tune zerolatency -c:a aac -ac 2 -b:a 114k -ar 44100 -async 1 -b:v 550k -g 5 -probesize 32 -framerate 30 -movflags +faststart -s 854x480 -bufsize 400k -maxrate 500k -shortest -f flv "rtmp://10.0.0.172:1935/Testing/live_480p_lq"
    ffmpeg -re -i "rtmp://10.0.0.172:1935/Testing/live_720p" -c:v h264 -preset fast -tune zerolatency -c:a aac -ac 2 -b:a 114k -ar 44100 -async 1 -b:v 450k -g 5 -probesize 32 -framerate 30 -movflags +faststart -s 640x360 -bufsize 400k -maxrate 500k -shortest -f flv "rtmp://10.0.0.172:1935/Testing/live_360p"

    This uses quite a lot of processing power, and also generates unnecessary latency (since I have to stream to WOWZA first, then back to FFMPEG and then back to WOWZA).

    And I want to optimize this.

    I’ve been trying several methods, but I only managed to overflow the decklink buffer. How could I solve this ?