Recherche avancée

Médias (0)

Mot : - Tags -/performance

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (96)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

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

Sur d’autres sites (10206)

  • Getting Error message Unknown encoder 'libx264' , any help appreciated

    16 janvier 2022, par Alex.Foster

    I am trying to compress videos files to a target size within python using ffmpeg-python for an A level project as part of my coursework, I keep getting this error saying it doesn't know the encoder. Not sure what I'm meant to do as this is literally an entirely new space to me. Am I meant to have installed the codec or something, or is there an alternative I can use ?

    


    import os, ffmpeg
##import section:this part is where I import all of the modules I will use
import  tkinter
import shutil
from tkinter import filedialog
import os


def fileSelect():                                                                           #start of fileSelect function
    global startingLocation                                                                 #declares startingLocation as global variable
    global originalName                                                                     #declares originalName as global variable
    global fileType                                                                         #declares fileType as global variable
    startingLocation = filedialog.askopenfilename(initialdir="/", title="Select file",      #tkinter function that opens file explorer, lets user select file saves the file path as a variable
                    filetypes=(("video files", "*.mp4"),("images", "*.jpg*")))
    originalName = os.path.basename(startingLocation)                                       #os function that gets the actaul file name from the path string
    print (originalName)                                                                    #print statement to check if originalName has been found
    fileType = startingLocation.split('.')                                                  #splits original name where any full stop in found and saves array as variable
    fileType = fileType[-1]                                                                 #changes variable to have the str value of the final item in the array; the file type
    fileType = '.' + fileType                                                               #adds fullstop to the start of the file type so i dont have to repeatedly do it
    print (fileType)                                                                        #print statement to check file type is found correctly

def outputSelect():                                                                         #start of outputSelect function
     global outputLocation                                                                  #declares outputLocation as global variable
     outputLocation = filedialog.askdirectory(initialdir="/", title="Select folder")        #tkinter function that opens file explorer, lets the user select of folder as saves the folder path as a variable

def fileNewName():                                                                          #start of fileNewName function
    global customName                                                                       #declares customName as global variable
    customName = input("Enter the end name of your file")                                   #simple code assigning user input to the custom name vairable
    customName = customName + fileType                                                      #add the fileType onto the end of the custom name

def compress():                                                                             #start of compress function
    fileSelect()                                                                            #calls the fileSelect function
    outputSelect()                                                                          #calls the outputSelect function
    fileNewName()
    global src
    global dst                                                                           #calls the fileNewName function
    src = startingLocation                                                                  #assigns startingLocation str as src, so the shutil module is able to use it in a cleaner way
    dst = outputLocation                                                                    #assigns outputLocation dst as src, so the shutil module is able to use it in a cleaner way
    shutil.copy(src, dst)                                                                   #shutil command that copies the file from src to dst
    src = outputLocation + '/' + originalName                                               #reassigns src as the location of the file copy
    dst = outputLocation + '/' + customName                                                 #reassigns dst as the location of the file copy but with a new name
    shutil.move(src,dst)


def compress_video(video_full_path, output_file_name, target_size):
    # Reference: https://en.wikipedia.org/wiki/Bit_rate#Encoding_bit_rate
    min_audio_bitrate = 32000
    max_audio_bitrate = 256000

    probe = ffmpeg.probe(video_full_path)
    # Video duration, in s.
    duration = float(probe['format']['duration'])
    # Audio bitrate, in bps.
    audio_bitrate = float(next((s for s in probe['streams'] if s['codec_type'] == 'audio'), None)['bit_rate'])
    # Target total bitrate, in bps.
    target_total_bitrate = (target_size * 1024 * 8) / (1.073741824 * duration)

    # Target audio bitrate, in bps
    if 10 * audio_bitrate > target_total_bitrate:
        audio_bitrate = target_total_bitrate / 10
        if audio_bitrate < min_audio_bitrate < target_total_bitrate:
            audio_bitrate = min_audio_bitrate
        elif audio_bitrate > max_audio_bitrate:
            audio_bitrate = max_audio_bitrate
    # Target video bitrate, in bps.
    video_bitrate = target_total_bitrate - audio_bitrate

    i = ffmpeg.input(video_full_path)
    ffmpeg.output(i, os.devnull,
                  **{'c:v': 'libx264', 'b:v': video_bitrate, 'pass': 1, 'f': 'mp4'}
                  ).overwrite_output().run()
    ffmpeg.output(i, output_file_name,
                  **{'c:v': 'libx264', 'b:v': video_bitrate, 'pass': 2, 'c:a': 'aac', 'b:a': audio_bitrate}
                  ).overwrite_output().run()

compress()
compress_video(dst, outputLocation, 3 * 1000)


    


  • can't install ffmpeg in ubuntu

    5 février 2013, par john

    I tried to install ffmpeg in ubundu.using the command sudo apt-get install ffmpeg

    But i can't install it.It Shows an error.Following is the out put when i tried to install ffmpeg.

    wds@wds:~$ sudo apt-get install ffmpeg
    [sudo] password for wds:
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    The following extra packages will be installed:
     libavfilter1
    The following NEW packages will be installed:
     ffmpeg libavfilter1
    0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
    Need to get 357kB of archives.
    After this operation, 1,282kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    WARNING: The following packages cannot be authenticated!
     libavfilter1 ffmpeg
    Install these packages without verification [y/N]? y
    Err http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main libavfilter1 i386 4:0.6-2ubuntu6.3
     404  Not Found [IP: 91.189.91.15 80]
    Err http://security.ubuntu.com/ubuntu/ maverick-security/main libavfilter1 i386 4:0.6-2ubuntu6.3
     404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com/ubuntu/ maverick-security/main ffmpeg i386 4:0.6-2ubuntu6.3
     404  Not Found [IP: 91.189.92.200 80]
    Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/f/ffmpeg/libavfilter1_0.6-2ubuntu6.3_i386.deb  404  Not Found [IP: 91.189.92.200 80]
    Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/f/ffmpeg/ffmpeg_0.6-2ubuntu6.3_i386.deb  404  Not Found [IP: 91.189.92.200 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    wds@wds:~$

    It shows a 404 error.when installing.

  • Anomalie #3435 : Avertir l’auteur quand il modifie un document attaché à plusieurs objets

    5 mai 2015, par Eric Lupinacci

    C’est exact, mais on peut dire que le problème est surtout dans la page d’un article quand on utilise les flèches de rotation car dans le bloc illustration il n’est fait aucune mention du nombre d’utilisations du document.
    Donc outre, le fait qu’on ne sait pas si il est utilisé ailleurs on peut avoir l’impression qu’on ne modifie le document que pour cet article ce qui est trompeur.
    Pour les autres accès via la mediathèque ou en cliquant su modifier on voit toujours la liste des utilisations exactes.

    On pourrait éventuellement ajouter un commentaire dans ces fenêtres de modification des documents pour avertir l’auteur qu’étant utilisé plusieurs fois, les modifications toucheront tous les objets liés (sous la liste des objets liés).
    Par contre, pour les rotations dans le bloc illustration, ne faudrait-il pas uniquement ajouter le nombre d’utilisations dans le bloc ?