Recherche avancée

Médias (91)

Autres articles (88)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

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

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

  • How to wrap a C library parameter ?(Creating x264 .Net wrapper)

    6 décembre 2016, par Rella

    so in dll we have x264_param_t structure\object and a function for its setting up x264_param_apply_profile. in C we use such code to set it up

    x264_param_t param;
    x264_param_default_preset(&param, "veryfast", "zerolatency");
    param.i_threads = 1;
    param.i_width = width;
    param.i_height = height;
    param.i_fps_num = fps;
    param.i_fps_den = 1;
    // Intra refres:
    param.i_keyint_max = fps;
    param.b_intra_refresh = 1;
    //Rate control:
    param.rc.i_rc_method = X264_RC_CRF;
    param.rc.f_rf_constant = 25;
    param.rc.f_rf_constant_max = 35;
    //For streaming:
    param.b_repeat_headers = 1;
    param.b_annexb = 1;
    x264_param_apply_profile(&param, "baseline");

    I want to create wrapper for such.. thing. so I have libx264.dll and visual studio 2010 pro.

    How can I create .Net C# wrapper for it ?

    I am a beginner in P\Invoke stuff so I do not get a lot of it...

    what I want to achive is is frame by frame level of working with x264... By now I need only encoding parts... And all needed sample code for doing it in C is in How does one encode a series of images into H264 using the x264 C API ? . So I need to write a wrapper only for stuff mentioned there... So I am asking - how to create a wrapper on Parameter and on Function that sets up thap param. And I would love to see how to call that wrapper back from c#. So if you could provide any code in support I’d be glad to see it.

  • Encode videos to send with WhatsApp

    28 avril 2017, par piegames

    I have a series of PNG images of a video I rendered and now I want so send it via WhatsApp. I used to encode my videos with the command from this answer, but apparently the videos can only be played from WhatsApp web ; on the phone I still get an error message. How do I convert them so that they can also be played on phone ?

    Command used :

    %PATH_TO_FFMPEG%\ffmpeg.exe -i paint\out%04d.png -c:v libx264 -c:a aac ./videos/out7.mp4

    Log :

    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    Input #0, image2, from 'paint2\out%04d.png':
     Duration: 00:00:45.00, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: png, rgba(pc), 384x240 [SAR 2835:2835 DAR 8:5], 25 fps, 25 tbr, 25 tbn, 25 tbc
    No pixel format specified, yuv444p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 000000000061a660] using SAR=1/1
    [libx264 @ 000000000061a660] using cpu capabilities: MMX2 SSE2Fast LZCNT
    [libx264 @ 000000000061a660] profile High 4:4:4 Predictive, level 1.3, 4:4:4 8-bit
    [libx264 @ 000000000061a660] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to './videos/out6.mp4':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 384x240 [SAR 1:1 DAR 8:5], q=-1--1, 25 fps, 12800 tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.64.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=   79 fps=0.0 q=28.0 size=      19kB time=00:00:01.04 bitrate= 152.5kbits/frame=  171 fps=168 q=28.0 size=      21kB time=00:00:04.72 bitrate=  36.4kbits/frame=  255 fps=168 q=28.0 size=      24kB time=00:00:08.08 bitrate=  24.1kbits/frame=  309 fps=153 q=28.0 size=      48kB time=00:00:10.24 bitrate=  38.6kbits/frame=  383 fps=151 q=28.0 size=      51kB time=00:00:13.20 bitrate=  31.7kbits/frame=  452 fps=148 q=28.0 size=      54kB time=00:00:15.96 bitrate=  27.7kbits/frame=  534 fps=151 q=28.0 size=      59kB time=00:00:19.24 bitrate=  25.1kbits/frame=  622 fps=154 q=28.0 size=      85kB time=00:00:22.76 bitrate=  30.7kbits/frame=  706 fps=155 q=28.0 size=      90kB time=00:00:26.12 bitrate=  28.1kbits/frame=  795 fps=157 q=28.0 size=      94kB time=00:00:29.68 bitrate=  25.9kbits/frame=  893 fps=161 q=28.0 size=     121kB time=00:00:33.60 bitrate=  29.5kbits/frame=  985 fps=162 q=28.0 size=     126kB time=00:00:37.28 bitrate=  27.6kbits/frame= 1084 fps=165 q=28.0 size=     153kB time=00:00:41.24 bitrate=  30.3kbits/frame= 1125 fps=163 q=-1.0 Lsize=     168kB time=00:00:44.88 bitrate=  30.6kbits/s speed=6.52x
    video:154kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.859178%
    [libx264 @ 000000000061a660] frame I:5     Avg QP:14.73  size: 22873
    [libx264 @ 000000000061a660] frame P:384   Avg QP:14.24  size:    65
    [libx264 @ 000000000061a660] frame B:736   Avg QP:16.11  size:    24
    [libx264 @ 000000000061a660] consecutive B-frames:  7.3% 13.7%  8.3% 70.8%
    [libx264 @ 000000000061a660] mb I  I16..4: 35.6% 47.1% 17.3%
    [libx264 @ 000000000061a660] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  1.2%  0.1%  0.0%  0.0%  0.0%    skip:98.6%
    [libx264 @ 000000000061a660] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.4%  0.0%  0.0%  direct: 0.0%  skip:99.6%  L0:53.1% L1:46.0% BI: 0.9%
    [libx264 @ 000000000061a660] 8x8 transform intra:47.2% inter:15.9%
    [libx264 @ 000000000061a660] coded y,u,v intra: 80.7% 29.5% 0.9% inter: 0.1% 0.0% 0.0%
    [libx264 @ 000000000061a660] i16 v,h,dc,p: 24% 15% 55%  6%
    [libx264 @ 000000000061a660] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  5%  7% 62% 14%  6%  1%  2%  1%  2%
    [libx264 @ 000000000061a660] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10%  9% 29% 11%  8%  5% 14%  5%  9%
    [libx264 @ 000000000061a660] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 000000000061a660] ref P L0: 27.3%  0.7% 36.5% 35.6%
    [libx264 @ 000000000061a660] ref B L0: 59.9% 29.7% 10.4%
    [libx264 @ 000000000061a660] ref B L1: 96.7%  3.3%
    [libx264 @ 000000000061a660] kb/s:27.91

    Error on my Phone : "Dieses Video kann leider nicht wiedergegeben werden"

  • Shaking/trembling in video slideshow generated by frames from an image

    18 mai 2017, par raziel

    I have a PHP program which is used to generate a video slideshow from the series of images. Basically, I just need to smoothly ‘move’ from one image area to the another one according to the specified top/left coordinates and width/height area of the image. In order to do smooth movement, I use easing functions during the coordinates calculations for the each of video frame. I make an jpeg image frame based on these calculations using PHP’s Imagick library, then I combine all the generated frames into a single video using ffmpeg command.

    <?php
    const TEMP_FRAMES_DIR = __DIR__;
    const VIDEO_WIDTH = 1080;
    const VIDEO_HEIGHT = 720;
    const FPS = 30;
    const MOVEMENT_DURATION_SECONDS = 3;

    const IMAGE_PATH = __DIR__ . '/test_image.png';

    $start_coords = [
       'x' => 100,
       'y' => 100,
       'width'  => 480,
       'height' => 270
    ];
    $end_coords = [
       'x' => 400,
       'y' => 200,
       'width'  => 480,
       'height' => 270
    ];

    $timeline = make_timeline($start_coords, $end_coords);
    render_frames(IMAGE_PATH, $timeline);
    render_video_from_frames();

    function make_timeline($start_coords, $end_coords) {
       $timeline = [];

       $total_frames = MOVEMENT_DURATION_SECONDS * FPS;

       $x_change      = $end_coords['x']      - $start_coords['y'];
       $y_change      = $end_coords['y']      - $start_coords['y'];
       $width_change  = $end_coords['width']  - $start_coords['width'];
       $height_change = $end_coords['height'] - $start_coords['height'];

       for ($i = 0; $i < $total_frames; $i++) {
           $timeline[$i] = [
               'x'      => easingOutExpo($i, $start_coords['x'], $x_change, $total_frames),
               'y'      => easingOutExpo($i, $start_coords['y'], $y_change, $total_frames),
               'width'  => easingOutExpo($i, $start_coords['width'], $width_change, $total_frames),
               'height' => easingOutExpo($i, $start_coords['height'], $height_change, $total_frames)
           ];
       }
       return $timeline;
    }

    function render_frames($image_path, $timeline) {
       $image = new Imagick($image_path);
       //remove frames from the previous render
       array_map('unlink', glob( TEMP_FRAMES_DIR . "/frame*" ));

       foreach ($timeline as $frame_number => $frame) {
           $frame_img = clone $image;
           $frame_img->cropImage($frame["width"],$frame["height"], $frame["x"],$frame["y"]);
           $frame_img->resizeImage(VIDEO_WIDTH, VIDEO_HEIGHT, imagick::FILTER_LANCZOS, 0.9);
           $frame_img->writeImage(TEMP_FRAMES_DIR. "/frame$frame_number.jpg");
       }
    }

    function render_video_from_frames() {
       $fps = FPS;
       $frames_dir = TEMP_FRAMES_DIR;
       $SEP = DIRECTORY_SEPARATOR;

       $video_file = $frames_dir. $SEP . 'video.mp4';

       if (file_exists($video_file)) unlink($video_file);

       system("ffmpeg -framerate $fps -i $frames_dir{$SEP}frame%01d.jpg $video_file");
    }

    function easingOutExpo($t, $b, $c, $d) {
       return $c * ( -pow( 2, -10 * $t/$d ) + 1 ) + $b;
    }

    The problem is that I have annoying shaking/trembling when I need to move at a low speed (like at the end of easing out expo function).
    Here you can get the test video with the problem, the test image which was used and the PHP script :
    https://drive.google.com/drive/u/1/folders/0B9FOrF6IlWaGeHJCS1h6djhVZ28

    You can see this shaking starting from the middle of the test video ( 1.5 sec).

    How can I avoid shaking in such kind of situations ? Thanks in advance !