Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (10)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (3062)

  • Piping ppm files to ffmpeg to create movie in c++

    15 août 2015, par chasep255

    I want to create a movie of a zoom on the Mandelbrot set. To do this I want to create image data in the ppm format and then pipe it into ffmpeg using popen. The following command works if I first save the ppm to my disc and then run ffmpeg through the terminal.

    ffmpeg -i out.ppm -r 1/5 out.mp4

    Here is what I am trying to do in code.

    FILE* p = popen("ffmpeg -i /dev/stdin -r 1/5 out.mp4", "w");
    ppm_pipe(p, pix_buffers[0], w, h);
    fclose(p);
    ...
    void ppm_pipe(FILE* f, unsigned char* pix, int w, int h)
    {
       assert(fprintf(f, "P6 %d %d 255\n", w, h) > 0);
       size_t sz = 3 * (size_t)w * (size_t)h;
       assert(fwrite(pix, 1, sz, f) == sz);
    }

    I get the following error message.

    ffmpeg version 2.5.8-0ubuntu0.15.04.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    /dev/stdin: Invalid data found when processing input
  • How to create a fixed image video with ffmpeg that avoids pixelization when it's not maximized ?

    11 août 2022, par Nelson Teixeira

    I have a waiting video in the project I develop. This video is a fixed waiting image with music. I was asked to change the image in the video due to deprecated logo.

    


    So initially I tried just to replace the image in the video using this command :

    


    ffmpeg -i old_waiting_video.mp4 -i new_image.png -filter_complex "[1][0]scale2ref[i][v];[v][i]overlay" -c:a copy new_waiting_video.mp4


    


    This lead to the image became pixelated when the video isn't maximized. When maximized the image is OK. But it looks terrible in the small player.

    


    Here is an image of the problem :

    


    enter image description here

    


    The above image is the image without zoom out. The left bottom image is a screen capture when I resize it in an image tool and the right bottom is a screen capture of how it looks like in the player.
The image has more than this text, but I thought that wouldn't be appropriate to display my company's logo here. The logo itself is even more pixelized and looks terrible.

    


    So to try to solve this problem I extracted the audio from the file and try to add the image and the audio together to see if it removed the pixelization. So I used this command :

    


    ffmpeg -i audio.m4a -i new_image.png new_waiting_video.mp4


    


    When it failed, searching a bit I came across this other command :

    


    ffmpeg -loop 1 -i new_image.png -i audio.m4a -c:v libx264 -tune stillimage -c:a copy -pix_fmt yuv420p -shortest new_waiting_video.mp4


    


    Again the pixelization ocurred. I know it's possible because this problem doesn't occur in the old logo.

    


    What would be the correct command that allowed that the zoomed out image in the player doesn't pixelate ?

    


    Edit 1

    


    I would also be interested in a command that substitutes the image on the old video as long it doesn't pixelate in the non-maximized player.

    


    Edit 2

    


      

    • Video resolution : 1920x1080
    • 


    • New image resolution : 1920x1080
    • 


    • Non-maximized video player size : 640x360
    • 


    • Video tag : <video src="my-video-url.mp4" style="width: 640px;"></video>
    • &#xA;

    &#xA;

  • Evolution #4271 (Nouveau) : valider_url_distante => pouvoir déclarer des domaines distants et pas ...

    21 janvier 2019, par - Equipement

    Bonjour,

    La fonction valider_url_distante permet de déclarer des hosts distants :

    1. <span class="CodeRay"><span class="local-variable">$known_hosts</span> = pipeline(<span class="string"><span class="delimiter">'</span><span class="content">declarer_hosts_distants</span><span class="delimiter">'</span></span>, <span class="local-variable">$known_hosts</span>);
    2. </span>

    Télécharger

    C’est très bien, mais avec plusieurs centaines de hosts à déclarer (dont la liste varie dans le temps), cela devient compliqué à gérer.

    Serait-il possible d’avoir, en plus, la possibilité de déclarer des domaines distants ?

    Une première piste serait de pouvoir déclarer .example.com dans le pipeline pour inclure tous les *.example.com au lieu des les énumérer un par un.

    Une seconde piste consisterait à s’inspirer de la function need_proxy (via une constante avec la même syntaxe que pour le http_noproxy) :

    // Pour mémoire code actuel à conserver ...

    1. <span class="CodeRay">    <span class="local-variable">$is_known_host</span> = <span class="predefined-constant">false</span>;
    2.     <span class="keyword">foreach</span> (<span class="local-variable">$known_hosts</span> <span class="keyword">as</span> <span class="local-variable">$known_host</span>) {
    3.         <span class="local-variable">$parse_known</span> = <span class="predefined">parse_url</span>(<span class="local-variable">$known_host</span>);
    4.         <span class="keyword">if</span> (<span class="local-variable">$parse_known</span>
    5.           <span class="keyword">and</span> <span class="predefined">strtolower</span>(<span class="local-variable">$parse_known</span>[<span class="string"><span class="delimiter">'</span><span class="content">host</span><span class="delimiter">'</span></span>]) === <span class="predefined">strtolower</span>(<span class="local-variable">$parsed_url</span>[<span class="string"><span class="delimiter">'</span><span class="content">host</span><span class="delimiter">'</span></span>])) {
    6.             <span class="local-variable">$is_known_host</span> = <span class="predefined-constant">true</span>;
    7.             <span class="keyword">break</span>;
    8.         }
    9.     }
    10. </span>

    Télécharger

    // ... que l’on pourrait faire suivre de ce code (complètement inspiré de function need_proxy) :

    1. <span class="CodeRay">    <span class="keyword">if</span> (!<span class="local-variable">$is_known_host</span>) {
    2.                 <span class="local-variable">$known_domaines</span> = _DECLARER_DOMAINES_DISTANTS;
    3.  
    4.                 <span class="local-variable">$known_domaines</span> = <span class="predefined">str_replace</span>(<span class="string"><span class="delimiter">"</span><span class="char">\n</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content"> </span><span class="delimiter">"</span></span>, <span class="local-variable">$known_domaines</span>);
    5.                 <span class="local-variable">$known_domaines</span> = <span class="predefined">str_replace</span>(<span class="string"><span class="delimiter">"</span><span class="char">\r</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content"> </span><span class="delimiter">"</span></span>, <span class="local-variable">$known_domaines</span>);
    6.                 <span class="local-variable">$known_domaines</span> = <span class="string"><span class="delimiter">"</span><span class="content"> </span><span class="local-variable">$known_domaines</span><span class="content"> </span><span class="delimiter">"</span></span>;
    7.                 <span class="local-variable">$domain</span> = <span class="predefined">strtolower</span>(<span class="local-variable">$parsed_url</span>[<span class="string"><span class="delimiter">'</span><span class="content">host</span><span class="delimiter">'</span></span>]);
    8.  
    9.                 <span class="keyword">if</span> (<span class="predefined">strpos</span>(<span class="local-variable">$known_domaines</span>, <span class="string"><span class="delimiter">"</span><span class="content"> </span><span class="local-variable">$domain</span><span class="content"> </span><span class="delimiter">"</span></span>) !== <span class="predefined-constant">false</span>){
    10.                     <span class="local-variable">$is_known_host</span> = <span class="predefined-constant">true</span>;
    11.                 }
    12.  
    13.                 <span class="keyword">while</span> (<span class="predefined">strpos</span>(<span class="local-variable">$domain</span>, <span class="string"><span class="delimiter">'</span><span class="content">.</span><span class="delimiter">'</span></span>) !== <span class="predefined-constant">false</span>) {
    14.                         <span class="local-variable">$domain</span> = <span class="predefined">explode</span>(<span class="string"><span class="delimiter">'</span><span class="content">.</span><span class="delimiter">'</span></span>, <span class="local-variable">$domain</span>);
    15.                         <span class="predefined">array_shift</span>(<span class="local-variable">$domain</span>);
    16.                         <span class="local-variable">$domain</span> = <span class="predefined">implode</span>(<span class="string"><span class="delimiter">'</span><span class="content">.</span><span class="delimiter">'</span></span>, <span class="local-variable">$domain</span>);
    17.  
    18.                         <span class="keyword">if</span> (<span class="predefined">strpos</span>(<span class="local-variable">$known_domaines</span>, <span class="string"><span class="delimiter">"</span><span class="content"> .</span><span class="local-variable">$domain</span><span class="content"> </span><span class="delimiter">"</span></span>) !== <span class="predefined-constant">false</span>) {
    19.                             <span class="local-variable">$is_known_host</span> = <span class="predefined-constant">true</span>;
    20.                         }
    21.                 }
    22.         }
    23. </span>

    Télécharger

    Cordialement
    Equipement