Recherche avancée

Médias (91)

Autres articles (105)

  • 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

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

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

Sur d’autres sites (12529)

  • ffmpeg return black and white image

    16 décembre 2011, par njai

    Video capture device is kworld dvd maker 2 (em2861)
    It returns the image in "black and white" with green line at the bottom of screen ; but when I tested it with webcam, it worked properly.

    Here is 30s video. http://www.youtube.com/watch?v=7q2wFGVwGGI

    How can I convert it to color ?

    [root@localhost ~]# ffmpeg -f video4linux2 -i /dev/video0 -vcodec mpeg4 -y output.mp4
    ffmpeg version git-2011-11-05-5fd1a69, Copyright (c) 2000-2011 the FFmpeg developers
    built on Nov  5 2011 21:10:52 with gcc 4.4.4 20100726 (Red Hat 4.4.4-13)
    configuration: --enable-libx264 --enable-gpl --enable-libvpx
    libavutil    51. 23. 0 / 51. 23. 0
    libavcodec   53. 27. 0 / 53. 27. 0
    libavformat  53. 18. 0 / 53. 18. 0
    libavdevice  53.  4. 0 / 53.  4. 0
    libavfilter   2. 47. 0 /  2. 47. 0
    libswscale    2.  1. 0 /  2.  1. 0
    libpostproc  51.  2. 0 / 51.  2. 0
    [video4linux2,v4l2 @ 0x2a64780] Estimating duration from bitrate, this may be inaccurate
    Input #0, video4linux2,v4l2, from '/dev/video0':
    Duration: N/A, start: 1320637788.113946, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 165888 kb/s, 25 tbr, 1000k tbn, 25 tbc
    Incompatible pixel format 'yuyv422' for codec 'mpeg4', auto-selecting format 'yuv420p'
    [buffer @ 0x2a63920] w:720 h:576 pixfmt:yuyv422 tb:1/1000000 sar:0/1 sws_param:
    [buffersink @ 0x2a63cc0] auto-inserting filter 'auto-inserted scale 0' between the filter    'src' and the filter 'out'
    [scale @ 0x2a64560] w:720 h:576 fmt:yuyv422 -> w:720 h:576 fmt:yuv420p flags:0x4
    Output #0, mp4, to 'output.mp4':
    Metadata:
    encoder         : Lavf53.18.0
    Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 720x576, q=2-31, 200 kb/s, 25    tbn, 25 tbc
    Stream mapping:
    Stream #0.0 -> #0.0 (rawvideo -> mpeg4)
    Press [q] to stop, [?] for help
    frame=  969 fps= 25 q=31.0 Lsize=    1547kB time=00:00:38.76 bitrate= 327.0kbits/s    
    video:1538kB audio:0kB global headers:0kB muxing overhead 0.561411%
  • swscale : add two spatially stable dithering methods

    23 mars 2014, par Øyvind Kolås
    swscale : add two spatially stable dithering methods
    

    Both of these dithering methods are from http://pippin.gimp.org/a_dither/ for
    GIF they can be considered better than bayer (provides more gray-levels), and
    spatial stability - often more than twice as good compression and less visual
    flicker than error diffusion methods (the methods also avoids error-shadow
    artifacts of diffusion dithers).

    These methods are similar to blue/green noise type dither masks ; but are
    simple enough to generate their mask on the fly. They are still research work
    in progress ; though more expensive to generate masks (which can be used in a
    LUT) like ’void and cluster’ and similar methods will yield superior results

    • [DH] doc/scaler.texi
    • [DH] libswscale/options.c
    • [DH] libswscale/output.c
    • [DH] libswscale/swscale_internal.h
    • [DH] libswscale/utils.c
  • canvas to ffmpeg - invalid data error

    12 juillet 2017, par nameless

    I’m curently trying to pipe some raw data directly into ffmpeg. The data comes from a canvas. What I do is the following :

    var imageData = ctx.getImageData(0,0,600,600);
    var dataArray = imageData.data;
    var rgbArray = [];
    for (var i = 0; i < dataArray.length; i+=4) {
       rgbArray.push([dataArray[i], dataArray[i+1], dataArray[i+2]])
    }

    var rgb24Array = rgbArray.map(function(rgbList){
       return (rgbList[0] << 16) | (rgbList[1] << 8) | (rgbList[2])
    });

    The ffmpegArgs are set like this :

    var ffmpegArgs = [
       '-c:v', 'rawvideo' // input container
       '-f', 'rawvideo',
       '-pix_fmt', 'rgb24', // input pixel format
       '-s', '600x600' //input size
       '-i', 'pipe:0', // input source
       '-format', 'mp4', // output container format
       '-c:v', 'libx264', // output video codec
       '-b:v', '2m', // output bitrate
       'udp://239.255.123.46:1234' // output destination
    ];

    So basically, the imageData I get from the canvas has 4 elements for each pixel (rgba), I first filter out the rgb values and then pack them to send them to ffmpeg, I directly pipe them in like ffmpeg.stdin.write(rgb24Array).

    But I get a TypeError: invalid data and I’m not sure why... I also tried to leave data as it is and use rgba as pix_fmt, but same error.

    The stacktrace of the error is :

    TypeError: invalid data
      at Socket.write (net.js:617:11)
      at null._repeat (....line with ffmpeg.stdin.write() in it)
      at wrapper [as_onTimeout] (timers.js:275:11)
      at Timer.listonTimeout (timers.js:92:15)

    Does anybody have a idea where the problem could be ?

    Edit :
    changed some things, first, I now use a Uint8Array :

    var imageData = ctx.getImageData(0,0,600,600);
               var srcArray = imageData.data;
               var dstArray = new Uint8Array(imageData.width * imageData.height * 3);
               for(var i = 0, p = 0; i < srcArray.length; i++) { // i++ skips alpha
                 dstArray[p++] = srcArray[i++];                   // red comp. and incr.
                 dstArray[p++] = srcArray[i++];                   // green comp. and incr.
                 dstArray[p++] = srcArray[i++];                   // blue comp. and incr.
               }

               ffmpeg.stdin.write(dstArray);

    Also added -video_size parameter to the ffmpegArgs. But still it’s not working and I get the same errors.