Recherche avancée

Médias (91)

Autres articles (43)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (3315)

  • Visualizing Call Graphs Using Gephi

    1er septembre 2014, par Multimedia Mike — General

    When I was at university studying computer science, I took a basic chemistry course. During an accompanying lab, the teaching assistant chatted me up and asked about my major. He then said, “Computer science ? Well, that’s just typing stuff, right ?”

    My impulsive retort : “Sure, and chemistry is just about mixing together liquids and coming up with different colored liquids, as seen on the cover of my high school chemistry textbook, right ?”


    Chemistry fun

    In fact, pure computer science has precious little to do with typing (as is joked in CS circles, computer science is about computers in the same way that astronomy is about telescopes). However, people who study computer science often pursue careers as programmers, or to put it in fancier professional language, software engineers.

    So, what’s a software engineer’s job ? Isn’t it just typing ? That’s where I’ve been going with this overly long setup. After thinking about it for long enough, I like to say that a software engineer’s trade is managing complexity.

    A few years ago, I discovered Gephi, an open source tool for graph and data visualization. It looked neat but I didn’t have much use for it at the time. Recently, however, I was trying to get a better handle on a large codebase. I.e., I was trying to manage the project’s complexity. And then I thought of Gephi again.

    Prior Work
    One way to get a grip on a large C codebase is to instrument it for profiling and extract details from the profiler. On Linux systems, this means compiling and linking the code using the -pg flag. After running the executable, there will be a gmon.out file which is post-processed using the gprof command.

    GNU software development tools have a reputation for being rather powerful and flexible, but also extremely raw. This first hit home when I was learning how to use the GNU tool for code coverage — gcov — and the way it outputs very raw data that you need to massage with other tools in order to get really useful intelligence.

    And so it is with gprof output. The output gives you a list of functions sorted by the amount of processing time spent in each. Then it gives you a flattened call tree. This is arranged as “during the profiled executions, function c was called by functions a and b and called functions d, e, and f ; function d was called by function c and called functions g and h”.

    How can this call tree data be represented in a more instructive manner that is easier to navigate ? My first impulse (and I don’t think I’m alone in this) is to convert the gprof call tree into a representation suitable for interpretation by Graphviz. Unfortunately, doing so tends to generate some enormous and unwieldy static images.

    Feeding gprof Data To Gephi
    I learned of Gephi a few years ago and recalled it when I developed an interest in gaining better perspective on a large base of alien C code. To understand what this codebase is doing for a particular use case, instrument it with gprof, gather execution data, and then study the code paths.

    How could I feed the gprof data into Gephi ? Gephi supports numerous graphing formats including an XML-based format named GEXF.

    Thus, the challenge becomes converting gprof output to GEXF.

    Which I did.

    Demonstration
    I have been absent from FFmpeg development for a long time, which is a pity because a lot of interesting development has occurred over the last 2-3 years after a troubling period of stagnation. I know that 2 big video codec developments have been HEVC (next in the line of MPEG codecs) and VP9 (heir to VP8’s throne). FFmpeg implements them both now.

    I decided I wanted to study the code flow of VP9. So I got the latest FFmpeg code from git and built it using the options "--extra-cflags=-pg --extra-ldflags=-pg". Annoyingly, I also needed to specify "--disable-asm" because gcc complains of some register allocation snafus when compiling inline ASM in profiling mode (and this is on x86_64). No matter ; ASM isn’t necessary for understanding overall code flow.

    After compiling, the binary ‘ffmpeg_g’ will have symbols and be instrumented for profiling. I grabbed a sample from this VP9 test vector set and went to work.

    ./ffmpeg_g -i vp90-2-00-quantizer-00.webm -f null /dev/null
    gprof ./ffmpeg_g > vp9decode.txt
    convert-gprof-to-gexf.py vp9decode.txt > /bigdisk/vp9decode.gexf
    

    Gephi loads vp9decode.gexf with no problem. Using Gephi, however, can be a bit challenging if one is not versed in any data exploration jargon. I recommend this Gephi getting starting guide in slide deck form. Here’s what the default graph looks like :


    gprof-ffmpeg-gephi-1

    Not very pretty or helpful. BTW, that beefy arrow running from mid-top to lower-right is the call from decode_coeffs_b -> iwht_iwht_4x4_add_c. There were 18774 from the former to the latter in this execution. Right now, the edge thicknesses correlate to number of calls between the nodes, which I’m not sure is the best representation.

    Following the tutorial slide deck, I at least learned how to enable the node labels (function symbols in this case) and apply a layout algorithm. The tutorial shows the force atlas layout. Here’s what the node neighborhood looks like for probing file type :


    gprof-ffmpeg-gephi-2

    Okay, so that’s not especially surprising– avprobe_input_format3 calls all of the *_probe functions in order to automatically determine input type. Let’s find that decode_coeffs_b function and see what its neighborhood looks like :


    gprof-ffmpeg-gephi-3

    That’s not very useful. Perhaps another algorithm might help. I select the Fruchterman–Reingold algorithm instead and get a slightly more coherent representation of the decoding node neighborhood :


    gprof-ffmpeg-gephi-4

    Further Work
    Obviously, I’m just getting started with this data exploration topic. One thing I would really appreciate in such a tool is the ability to interactively travel the graph since that’s what I’m really hoping to get out of this experiment– watching the code flows.

    Perhaps someone else can find better use cases for visualizing call graph data. Thus, I have published the source code for this tool at Github.

  • Malformed header from CGI script

    13 janvier 2014, par user3188518

    This message is driving me crazy :

    Malformed header from CGI script:
    ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
     built on May 10 2013 16:31:05 with gcc 4.8.0 (GCC) 20130502 (prerelease)
     configuration: --prefix=/usr --disable-debug --disable-static --enable-avresample --enable-dxva2 --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-postproc --enable-runtime-cpudetect --enable-shared --enable-vdpau --enable-version3 --enable-x11grab
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, wav, from '/projekt/aplikacja/app/92ed9478ecfa4a4dfb176f417d4ef66c/2014-01-12-220148_sample_1.wav':
     Duration: 00:02:35.62, bitrate: 1411 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Output #0, wav, to '/projekt/aplikacja/app/webroot/files/preview/2014-01-12-234038_52d327f6b2939.wav':
     Metadata:
       ISFT            : Lavf54.63.104
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, 1411 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=     864kB time=00:00:05.01 bitrate=1411.3kbits/s    
    video:0kB audio:864kB subtitle:0 global headers:0kB muxing overhead 0.009042%
    Status: 302
    Location: http://www.example.org/
    Content-type: text/html

    After executing this function :

      public function createpreview(){
            if ($this->request->is('post')) {
              foreach($this->request->data['TrackId'] as $key => $value){
                   $TrackId[] = $key;
               }
               $this->Track->recursive = -1;
               $view =  $this->Track->find('all', array(
                                 'conditions' => array(
                                 "Track.id" => $TrackId
                                  )));
               ini_set('date.timezone', 'Europe/London');

              foreach ($view as $v){
                 $comand_1 = 'ffmpeg -i '.APP.'92ed9478ecfa4a4dfb176f417d4ef66c'.DS. $v['Track']['filename'].' 2>&1';
                 $time_data = shell_exec($comand_1);
                 $search = '/Duration: (.*?),/';
                 $duration = preg_match($search, $time_data, $matches, PREG_OFFSET_CAPTURE, 3);
                 $time = explode('.', $matches[1][0]);
                 $time = explode(":", $time[0]);
                 $seconds = $time[0]*3600 + $time[1]*60 + $time[2];
                 if ($seconds >= 30){

                $now = date('Y-m-d-His');
                    $prew_file_name = $now .'_'. uniqid().'.wav';
                    $comand_2 = 'ffmpeg  -ss 00:00:25.000 -analyzeduration 99999999  -i '.APP.'92ed9478ecfa4a4dfb176f417d4ef66c'.DS. $v['Track']['filename'].' -t 5 -c:v copy -c:a copy '.WWW_ROOT.'files'.DS.'preview'.DS.$prew_file_name;
                       $t = shell_exec($comand_2);
                       $this->Track->updateAll(array('Track.preview' => "'.$prew_file_name.'"), array('Track.id' => $v['Track']['id']));
                     }
                  }

           }
            header('Location: http://www.example.org/');
          // $this->redirect(array('controller'=>'albums', 'action'=>'menage_index'));
      }

    As far as i know this shell_exec($comand_2) couses error (after i comment it out, it redirects me correctly).Googling this didn't gave me answers, the wierd part is previews aka shell_exec($comand_2) are made and fine, i just can't get it to redirect me. I tried non cake way but it doesn't work either.

    What I'm doing wrong ?

  • Merge commit ’6a8b35dc88b4a1a452f192fbbf53ae7f59bc3f23’

    14 mars 2014, par Michael Niedermayer
    Merge commit ’6a8b35dc88b4a1a452f192fbbf53ae7f59bc3f23’
    

    * commit ’6a8b35dc88b4a1a452f192fbbf53ae7f59bc3f23’ :
    dsputilenc_mmx : Merge two assignment blocks with identical conditions

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/x86/dsputilenc_mmx.c