
Recherche avancée
Autres articles (69)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (9363)
-
Revision 96808 : Le plug n’est que pour spip 3.1 donc, je monte les version mini des ...
25 avril 2016, par spip.franck@… — LogLe plug n’est que pour spip 3.1 donc, je monte les version mini des "necessite" et "utilise" au première version compatible spip 3.1 car ce n’est pas possible d’avoir des bornes mini plus petite.
Ce commit ne change rien au plugin, mais ainsi ceux qui consultent le xml sur plugin.spip ont une information fiable
http://zone.spip.org/trac/spip-zone/browser/_plugins_/saisies/trunk/paquet.xml?rev=86449
http://zone.spip.org/trac/spip-zone/browser/_plugins_/champs_extras/core/trunk/paquet.xml?rev=85878
http://zone.spip.org/trac/spip-zone/browser/_plugins_/verifier/paquet.xml?rev=85813
http://zone.spip.org/trac/spip-zone/browser/_squelettes_/zpip-dist/branches/zpip_v1/plugin.xml?rev=86098
http://zone.spip.org/trac/spip-zone/browser/_core_/tags/spip-3.1.0/plugins/mediabox/paquet.xml
http://zone.spip.org/trac/spip-zone/browser/_plugins_/pages/trunk/paquet.xml?rev=85669
http://zone.spip.org/trac/spip-zone/browser/_plugins_/notifications/trunk/paquet.xml?rev=86486
http://zone.spip.org/trac/spip-zone/browser/_plugins_/openid/trunk/paquet.xml -
Anomalie #2379 (Fermé) : sql_updateq() et base externe / problème de description_table() [+mini-pa...
23 octobre 2011, par gvincent -Salut, sous SPIP2.1 rev.18614 j’ai un problème détecté lors de l’utilisation de sql_updateq() sur une base externe. description_table() ne prend pas en compte la base et donc ne trouve pas d’infos pour faire la mise à jour. D’où mon patch ci-dessous pour que ça fonctionne : Index : req/mysql.php (...)
-
Getting Error message Unknown encoder 'libx264' , any help appreciated
16 janvier 2022, par Alex.FosterI 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)