Recherche avancée

Médias (91)

Autres articles (75)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9959)

  • Use the referer protocol+host only for the redirect match.

    12 juin 2015, par blueimp
    Use the referer protocol+host only for the redirect match.
  • avutil/tx_template : Don't waste space for inexistent factors

    22 octobre 2022, par Andreas Rheinhardt
    avutil/tx_template : Don't waste space for inexistent factors
    

    It is possible to avoid the factors array for the power-of-two
    tables for which said array is unused by using a different
    structure for initialization for power-of-two tables than for
    non-power-of-two-tables. This saves 3*15*16B from .data.

    Reviewed-by : Lynne <dev@lynne.ee>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavutil/tx_template.c
  • 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 ?

    &#xA;

    import os, ffmpeg&#xA;##import section:this part is where I import all of the modules I will use&#xA;import  tkinter&#xA;import shutil&#xA;from tkinter import filedialog&#xA;import os&#xA;&#xA;&#xA;def fileSelect():                                                                           #start of fileSelect function&#xA;    global startingLocation                                                                 #declares startingLocation as global variable&#xA;    global originalName                                                                     #declares originalName as global variable&#xA;    global fileType                                                                         #declares fileType as global variable&#xA;    startingLocation = filedialog.askopenfilename(initialdir="/", title="Select file",      #tkinter function that opens file explorer, lets user select file saves the file path as a variable&#xA;                    filetypes=(("video files", "*.mp4"),("images", "*.jpg*")))&#xA;    originalName = os.path.basename(startingLocation)                                       #os function that gets the actaul file name from the path string&#xA;    print (originalName)                                                                    #print statement to check if originalName has been found&#xA;    fileType = startingLocation.split(&#x27;.&#x27;)                                                  #splits original name where any full stop in found and saves array as variable&#xA;    fileType = fileType[-1]                                                                 #changes variable to have the str value of the final item in the array; the file type&#xA;    fileType = &#x27;.&#x27; &#x2B; fileType                                                               #adds fullstop to the start of the file type so i dont have to repeatedly do it&#xA;    print (fileType)                                                                        #print statement to check file type is found correctly&#xA;&#xA;def outputSelect():                                                                         #start of outputSelect function&#xA;     global outputLocation                                                                  #declares outputLocation as global variable&#xA;     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&#xA;&#xA;def fileNewName():                                                                          #start of fileNewName function&#xA;    global customName                                                                       #declares customName as global variable&#xA;    customName = input("Enter the end name of your file")                                   #simple code assigning user input to the custom name vairable&#xA;    customName = customName &#x2B; fileType                                                      #add the fileType onto the end of the custom name&#xA;&#xA;def compress():                                                                             #start of compress function&#xA;    fileSelect()                                                                            #calls the fileSelect function&#xA;    outputSelect()                                                                          #calls the outputSelect function&#xA;    fileNewName()&#xA;    global src&#xA;    global dst                                                                           #calls the fileNewName function&#xA;    src = startingLocation                                                                  #assigns startingLocation str as src, so the shutil module is able to use it in a cleaner way&#xA;    dst = outputLocation                                                                    #assigns outputLocation dst as src, so the shutil module is able to use it in a cleaner way&#xA;    shutil.copy(src, dst)                                                                   #shutil command that copies the file from src to dst&#xA;    src = outputLocation &#x2B; &#x27;/&#x27; &#x2B; originalName                                               #reassigns src as the location of the file copy&#xA;    dst = outputLocation &#x2B; &#x27;/&#x27; &#x2B; customName                                                 #reassigns dst as the location of the file copy but with a new name&#xA;    shutil.move(src,dst)&#xA;&#xA;&#xA;def compress_video(video_full_path, output_file_name, target_size):&#xA;    # Reference: https://en.wikipedia.org/wiki/Bit_rate#Encoding_bit_rate&#xA;    min_audio_bitrate = 32000&#xA;    max_audio_bitrate = 256000&#xA;&#xA;    probe = ffmpeg.probe(video_full_path)&#xA;    # Video duration, in s.&#xA;    duration = float(probe[&#x27;format&#x27;][&#x27;duration&#x27;])&#xA;    # Audio bitrate, in bps.&#xA;    audio_bitrate = float(next((s for s in probe[&#x27;streams&#x27;] if s[&#x27;codec_type&#x27;] == &#x27;audio&#x27;), None)[&#x27;bit_rate&#x27;])&#xA;    # Target total bitrate, in bps.&#xA;    target_total_bitrate = (target_size * 1024 * 8) / (1.073741824 * duration)&#xA;&#xA;    # Target audio bitrate, in bps&#xA;    if 10 * audio_bitrate > target_total_bitrate:&#xA;        audio_bitrate = target_total_bitrate / 10&#xA;        if audio_bitrate &lt; min_audio_bitrate &lt; target_total_bitrate:&#xA;            audio_bitrate = min_audio_bitrate&#xA;        elif audio_bitrate > max_audio_bitrate:&#xA;            audio_bitrate = max_audio_bitrate&#xA;    # Target video bitrate, in bps.&#xA;    video_bitrate = target_total_bitrate - audio_bitrate&#xA;&#xA;    i = ffmpeg.input(video_full_path)&#xA;    ffmpeg.output(i, os.devnull,&#xA;                  **{&#x27;c:v&#x27;: &#x27;libx264&#x27;, &#x27;b:v&#x27;: video_bitrate, &#x27;pass&#x27;: 1, &#x27;f&#x27;: &#x27;mp4&#x27;}&#xA;                  ).overwrite_output().run()&#xA;    ffmpeg.output(i, output_file_name,&#xA;                  **{&#x27;c:v&#x27;: &#x27;libx264&#x27;, &#x27;b:v&#x27;: video_bitrate, &#x27;pass&#x27;: 2, &#x27;c:a&#x27;: &#x27;aac&#x27;, &#x27;b:a&#x27;: audio_bitrate}&#xA;                  ).overwrite_output().run()&#xA;&#xA;compress()&#xA;compress_video(dst, outputLocation, 3 * 1000)&#xA;

    &#xA;