Recherche avancée

Médias (91)

Autres articles (72)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (3568)

  • Trying to change extension of filename on an ffmpeg script

    22 janvier 2019, par prat67

    (first time posting a question here)

    So I’m looking to write a ffmmpeg script to automate encoding my files to VP9.
    The problem I’m having is when I try to strip the extension and add a new one.

    For example
    Demo.mp4

    Should change to
    Demo.webm

    I’m running this on a Ubuntu-16.04 (Server Non-GI Version)
    I’ve tried a few different ways to accomplish this (using google and other posts on StackOverflow) but I can’t seem to make it work

    This is the error I keep getting..

    line 31 : Demo.mp4+.vp9 : syntax error : invalid arithmetic operator (error token is ".mp4+.vp9")

    I’ve also commented (in the code below) where the syntax error is pointing to..

    #!/bin/bash

    # Welcome Message

    clear
    printf "====================================\n"
    printf "FFMPEG Encoder\n"
    printf "(Using HDR-4k Profile)\n"
    printf "====================================\n\n"
    printf " Loading Files in Current Directory...\n\n"
    sleep 3s


    # Variables

    i=1
    ext=".webm"
    vadd=4000000
    vsub=2000000


    # Iterate through files in current directory

    for j in *.{mp4,mkv};
    do
    echo "$i.$j"
    file[i]=$j
    i=$(( i + 1 ))
    done


    # Select File & Bitrate

    printf "Enter file number\n"
    read fselect
    printf "${file[$fselect]}: Selected for encoding\n\n"

    printf "Enter Average Bitrate (Eg: 8000000)\n\n"
    read bselect


    # ***THIS IS WHERE THE PROBLEM IS***
    # Prepare output file, strip trailing extension (eg .mkv) and add .webm

    ftemp1="${file[$fselect]}"
    ftemp2="${ftemp1::-4}"
    fout="$(($ftemp2+$ext))"
    printf "Output file will be: $fout"
    printf "Preparing to encode..."
    sleep 5s


    # Encode with User-Defined Parameters

    ffmpeg -y -report -i ${file[$fselect]} -b:v $bselect -speed 4 -pass 1 \
     -pix_fmt yuv420p10le \
     -color_primaries 9 -color_trc 16 -colorspace 9 -color_range 1 \
     -maxrate "$(($bselect+$vadd))" -minrate "$(($bselect-$vsub))" \
     -profile:v 2 -vcodec libvpx-vp9 -f webm /dev/null && \
    ffmpeg -y -report -i ${file[$fselect]} -b:v $bselect -pass 2 \
     -pix_fmt yuv420p10le \
     -color_primaries 9 -color_trc 16 -colorspace 9 -color_range 1 \
     -maxrate "$(($bselect+$vadd))" -minrate "$(($bselect-$vsub))" \
     -profile:v 2 -vcodec libvpx-vp9 \
    $fout

    I’m certain there is a much cleaner way to do this - but I’m not expecting help with that :P

    My suspicion is that I’m trying to add two different types of variables ? But I thought I defined them as strings..I could be wrong

    Please Help... lol

  • ffmpeg change metadata inside video file

    26 novembre 2020, par virtualsets

    Hello I have problems to change timecode insdie metadata of a video file "mov"

    


    ruta=r"E:\Brutos-sin-eliminar\inma-ruben-22-2-2020\multicam\\"
nombre=r"A019_02230134_C186.mov"
comand="ffmpeg -i " + nombre + " -ss 0 -map 0 -acodec copy -vcodec copy -timecode 01:20:10:00 -metadata:s:2:0 timecode=01:20:10:00 -metadata:s:1:0 timecode=01:20:10:00 -metadata:s:0:2 -metadata:s:0:2  timecode=01:10:10:00"+ " convert_" + nombre

os.popen(comand)


    


    I need to put muy own timecode to the file but this command not works.

    


    The console give me

    


      mov @ 00000225287fdc00] You requested a copy of the original timecode track so timecode metadata are now ignored
Output #0, mov, to 'convert_A019_02230134_C186.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    com.blackmagic-design.camera.windowedSensor: 1
    com.apple.proapps.manufacturer: Blackmagic Design
    com.blackmagic-design.camera.uuid: 3cf1dd9e-e307-47ff-864e-5487fea3fa47
    com.blackmagic-design.camera.projectFPS: 25
    com.apple.proapps.shootingRate: 50
    com.blackmagic-design.camera.cameraType: Blackmagic Pocket Cinema Camera 4K
    com.blackmagic-design.camera.shutterAngle: 180°
    com.blackmagic-design.camera.shutterMode: Angle
    com.blackmagic-design.camera.iso: 3200
    com.blackmagic-design.camera.whiteBalanceKelvin: 3000
    com.blackmagic-design.camera.whiteBalanceTint: -44
    com.apple.proapps.customgamma: com.blackmagic-design.camera.filmlog
    com.blackmagic-design.camera.look.LUTName: Blackmagic Pocket 4K Film to Extended Video.cube
    com.blackmagic-design.camera.guides.aspectRatio: 2:1
    com.blackmagic-design.camera.guides.safeArea: 90
    com.blackmagic-design.camera.firmware: 6.6
    com.apple.proapps.clipID: A019_02230134_C186
    com.apple.proapps.reel: 19
    com.apple.proapps.scene: 1
    com.apple.proapps.shot: 99
    com.apple.proapps.isGood: 0
    com.blackmagic-design.camera.environment: interior
    com.blackmagic-design.camera.dayNight: day
    com.apple.proapps.cameraName: A
    com.blackmagic-design.camera.colorScience: Blackmagic Pocket Cinema Camera 4K, Color Science Gen 4
    com.blackmagic-design.camera.dateRecorded: 2020:02:23
    timecode        : 01:20:10:00
    encoder         : Lavf58.11.101
    Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le(bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 122315 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 01:10:10:00
      handler_name    : ?Apple Alias Data Handler
      encoder         : Apple ProRes 422
      timecode        : 01:10:10:00
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2020-02-23T00:34:02.000000Z
      handler_name    : ?Apple Alias Data Handler
      timecode        : 01:20:10:00
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2020-02-23T00:34:02.000000Z
      handler_name    : ?Apple Alias Data Handler
      timecode        : 01:20:10:00
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame=  467 fps=0.0 q=-1.0 Lsize=  281452kB time=00:00:18.64 bitrate=123693.3kbits/s speed=71.1x    
video:278913kB audio:2531kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002533%


    


    I dont understand why not modificate the mov file... when open the metadata it is oringinal.

    


    Reggards

    


  • How do I add a dependency to my application ?

    30 juin 2017, par Aang

    I’m currently working on an application called SatStressGUI, a GUI application written in Python, which was passed down to me from previous interns who have worked on it. It relies on dependencies such as wxPython (which, as most of you probably know, must be installed on the user’s own computer before the application the user is trying to run runs properly if the application calls on the the wxPython library). In the gitHub, under contents->resources->lib->python2.5->sitepackages, you’ll see all the libraries which the application is dependent on (wxPython is under the name wx, for example) copied and pasted. If I am correct, the existence of these libraries in sitepackages makes it so that the user does not have to manually install libraries such as wxPython themselves : the user can simply run the GUI application by downloading the whole package under "clone or download" in the main page and run the satstressgui executable file located in contents->MacOS. I believe there is a file somewhere, perhaps boot.py (located in contents->resources) that says, "hey, before the user runs this executable file, download the libraries under contents->resources->lib->python2.5->sitepackages."

    All that being said, I want to add a new dependency to the program. I am trying to use FFMPEG, which is an external program that allows you to take a sequence of images and convert it to a video. In satstressgui.py, which is the main source code file for this application (located in contents->resources) I use the subprocess python module to call on the external program FFMPEG. Here is the code snippet :

    #FFMPEG is an external program that converts a sequence of images to a video.
    subprocess.call(['/usr/local/bin/ffmpeg', '-framerate', \
                            framerate, '-f', 'image2','-pattern_type', \
                            'glob', '-i', self.directory + '/orbit_*.png', \
                            '-r', '10', '-s', '620x380', self.directory +
                            ".avi"])

    At the moment, this works on my own computer because I have FFMPEG installed (in case it matters, I installed it using homebrew). How do I make it so that FFMPEG becomes a dependency in my program just like wxPython (i.e., I make it so that FFMPEG is "installed" on my user’s computer before they run the application) ? I’ve looked on FFMPEG’s website and it looks as if there is a gitHub for it, but other than that I’m quite lost.

    NOTE : I’ve also tried to use imageio (another Python library) to convert a sequence of images to a video in my application, but I’ve failed. I tried to copy and paste the files from imageio’s gitHub to contents->resources->lib->python2.5->sitepackages, but whenever I try to "import imageio" it fails. This might be because I am adding the dependency wrong or because imageio only works on Python 2.6 and above and my program is written in Python 2.5. If someone could give me an answer to any of these questions and help me import a module such as imageio or add an external program such as FFMPEG as a dependency in my application, that’d be very much appreciated ! I can’t link imageio’s main website because of some restrictions by Stack Overflow, but you should be able to find it by simply searching it up on google (the main website has a photo of an astronaut in it’s top banner). I would more prefer a solution using FFMPEG, however, seeing as I’ve already implemented it in my code.

    Thank you so much in advance for your help ! I’m quite new to computer science and programming so I apologize if a lot of the clarifications or questions I’m asking are rudimentary.

    Here is the link to the gitHub of my application : https://github.com/nhudoan/SatStressGUI

    Here is the link to FFMPEG’s main website : https://ffmpeg.org/download.html#repositories