Recherche avancée

Médias (91)

Autres articles (29)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (4292)

  • Monster Battery Power Revisited

    28 mai 2010, par Multimedia Mike — Python, Science Projects

    So I have this new fat netbook battery and I performed an experiment to determine how long it really lasts. In my last post on the matter, it was suggested that I should rely on the information that gnome-power-manager is giving me. However, I have rarely seen GPM report more than about 2 hours of charge ; even on a full battery, it only reports 3h25m when I profiled it as lasting over 5 hours in my typical use. So I started digging to understand how GPM gets its numbers and determine if, perhaps, it’s not getting accurate data from the system.

    I started poking around /proc for the data I wanted. You can learn a lot in /proc as long as you know the right question to ask. I had to remember what the power subsystem is called — ACPI — and this led me to /proc/acpi/battery/BAT0/state which has data such as :

    present :                 yes
    capacity state :          ok
    charging state :          charged
    present rate :            unknown
    remaining capacity :      100 mAh
    present voltage :         8326 mV
    

    "Remaining capacity" rated in mAh is a little odd ; I would later determine that this should actually be expressed as a percentage (i.e., 100% charge at the time of this reading). Examining the GPM source code, it seems to determine as a function of the current CPU load (queried via /proc/stat) and the battery state queried via a facility called devicekit. I couldn’t immediately find any source code to the latter but I was able to install a utility called ’devkit-power’. Mostly, it appears to rehash data already found in the above /proc file.

    Curiously, the file /proc/acpi/battery/BAT0/info, which displays essential information about the battery, reports the design capacity of my battery as only 4400 mAh which is true for the original battery ; the new monster battery is supposed to be 10400 mAh. I can imagine that all of these data points could be conspiring to under-report my remaining battery life.

    Science project : Repeat the previous power-related science project but also parse and track the remaining capacity and present voltage fields from the battery state proc file.

    Let’s skip straight to the results (which are consistent with my last set of results in terms of longevity) :



    So there is definitely something strange going on with the reporting— the 4400 mAh battery reports discharge at a linear rate while the 10400 mAh battery reports precipitous dropoff after 60%.

    Another curious item is that my script broke at first when there was 20% power remaining which, as you can imagine, is a really annoying time to discover such a bug. At that point, the "time to empty" reported by devkit-power jumped from 0 seconds to 20 hours (the first state change observed for that field).

    Here’s my script, this time elevated from Bash script to Python. It requires xdotool and devkit-power to be installed (both should be available in the package manager for a distro).

    PYTHON :
    1. # !/usr/bin/python
    2.  
    3. import commands
    4. import random
    5. import sys
    6. import time
    7.  
    8. XDOTOOL = "/usr/bin/xdotool"
    9. BATTERY_STATE = "/proc/acpi/battery/BAT0/state"
    10. DEVKIT_POWER = "/usr/bin/devkit-power -i /org/freedesktop/DeviceKit/Power/devices/battery_BAT0"
    11.  
    12. print "count, unixtime, proc_remaining_capacity, proc_present_voltage, devkit_percentage, devkit_voltage"
    13.  
    14. count = 0
    15. while 1 :
    16.   commands.getstatusoutput("%s mousemove %d %d" % (XDOTOOL, random.randrange(0,800), random.randrange(0, 480)))
    17.   battery_state = open(BATTERY_STATE).read().splitlines()
    18.   for line in battery_state :
    19.     if line.startswith("remaining capacity :") :
    20.       proc_remaining_capacity = int(line.lstrip("remaining capacity : ").rstrip("mAh"))
    21.     elif line.startswith("present voltage :") :
    22.       proc_present_voltage = int(line.lstrip("present voltage : ").rstrip("mV"))
    23.   devkit_state = commands.getoutput(DEVKIT_POWER).splitlines()
    24.   for line in devkit_state :
    25.     line = line.strip()
    26.     if line.startswith("percentage :") :
    27.       devkit_percentage = int(line.lstrip("percentage :").rstrip(\%))
    28.     elif line.startswith("voltage :") :
    29.       devkit_voltage = float(line.lstrip("voltage :").rstrip(’V’)) * 1000
    30.   print "%d, %d, %d, %d, %d, %d" % (count, time.time(), proc_remaining_capacity, proc_present_voltage, devkit_percentage, devkit_voltage)
    31.   sys.stdout.flush()
    32.   time.sleep(60)
    33.   count += 1
  • Single Command to crop, animate (effects) and add images and texts in one video

    7 mars 2019, par Vivek Faldu

    I want to create a command where i can perform single operation.

    I have few commands which are working well individually

    Add Background Music Command

    String[] command = {"-i", inputPath, "-i",
    audioPath, "-filter_complex", "amix", "-preset",
    "ultrafast", "-vcodec", "libx264", outputPath};

    Multiple Image OverLay Command

    String[] command = {"-i", inputPath, "-i",
    audio.getAbsolutePath(), "-i", image1,
    "-i", image2, "-i", image3, "-
    filter_complex","[0][1]overlay=x=W/2-w/2:y=H/2-
    h/2:enable='between(t,2,10)'[v1];[v1][2]overlay=x=W/2-w/2:y=H/2-
    h/2:enable='between(t,10,20)'[v2];[v2][3]overlay=x=W/2-w/2:y=H/2-
    h/2:enable='gt(t,20)'[v3]","-map", "[v3]", outputPath};

    Image OverLay Command

    String[] command = {"-i", inputPath, "-i",
    image,"-filter_complex","overlay=(main_w-overlay_w)/2:
    (main_h-overlay_h)/2","-codec:a", "copy", outputPath};

    Cropping Command

    String[] command = {"-i", inputPath, "-filter:v", "crop=iw/2:ih:"
    + 0 + ":" + 0, "-c:a", "copy", outputPath};

    Effect

    String[] command = {"-i", inputPath, "-loop", "1", "-t", "2", "-
    i", image1, "-loop", "1", "-t", "2", "-i",
    image2, "-filter_complex", "
    [0]boxblur=enable='lt(t,2)+gt(t,10)'[vid];
    [1:v]format=rgba,fade=in:st=0:d=0.5:alpha=1,
    fade=out:st=1.5:d=0.5:alpha=1[img1];
    [2:v]format=rgba,fade=in:st=0:d=0.5:alpha=1,
    fade=out:st=1.5:d=0.5:alpha=1,setpts
    =PTS+10/TB[img2];[vid][img1]overlay=(main_w-overlay_w)/2:(main_h-
    overlay_h)/2[bkg];[bkg][img2]overlay=(main_w-overlay_w)/2:(main_h-
    overlay_h)/2", "-preset", "ultrafast", "-c:a", "copy", outputPath};

    But I don’t have any clue how to combine this all to one single command. Please help me out.

    Thanks in advance.

  • Errors configuring ffmpeg on OS X El Capitan 10.11.1

    5 mars 2016, par Brian J

    I am trying to install ffmpeg so that I can convert .mp4 files to .ogv files. I have tried using Homebrew and downloading source from ffmpeg.org. I get the same errors either way and I don’t even have a clue what the fundamental problem might be.

    I have followed the sample from https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX. Here’s what I run in the shell :

    git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
    cd ffmpeg
    ./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass \
    --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
    --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
    make && sudo make install

    And here’s the error :

    ERROR: libmp3lame >= 3.98.3 not found

    But I have lame installed. Running :

    brew install lame

    returns :

    Warning: lame-3.99.5 already installed

    So apparently ffmpeg can’t find my lame installation ? I tried configuring ffmpeg with out --enable-libmp3lame

    ./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass \
    --enable-libfdk-aac --enable-libfreetype --enable-libopus  --enable-libtheora \
    --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid

    But then I get the error :

    ERROR: libtheora not found

    But I have already installed theora via homebrew :

    Warning: theora-1.1.1 already installed

    For what it’s worth I had no trouble installing everything on a Mac running Yosemite. If any of you can help out at all, I’d really appreciate it. I’m at a total loss here.