
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (57)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (6271)
-
How i can convert with Python (audio file from .oga format to .wav format) without using ffmpeg ?
21 août 2021, par MaksTelegram save audio file with .oga, but in my telegram bot i using googleSpeech recognition library which takes .wav file format.
I used ffmpeg with my computer, but it needs to install the program and runs it in subprocess, but if i want deploy bot in some host, i need install ffmpeg on it.
How can i convert .oga to .wav using only python libraries ?
Here is my part of code, if who needs.


def convert_file(self):
 if os.path.exists(os.path.abspath(self.filename)) and os.path.exists(self.new_file):
 pass
 else:
 process = subprocess.run(["ffmpeg", "-hide_banner", "-i", 
(os.path.abspath(self.filename)), self.new_file])
 if process.returncode != 0:
 raise Exception("Something went wrong")

async def recognize_file(self):
 try:
 tlg_audio = sr.AudioFile(os.path.abspath(self.new_file))
 r = sr.Recognizer()
 with tlg_audio as source:
 audio = r.listen(source)
 if self.language is None:
 self.language = "ru-Ru"
 text = r.recognize_google(audio, language=self.language)
 return text
 else:
 text = r.recognize_google(audio, language=self.language)
 return text
 except sr.UnknownValueError:
 return "I not hear you"



-
fluent-ffmpeg add multiple languages from method dynamically nodejs
18 février 2021, par AmitKumarI am trying to add multiple languages and subtitles to a video dynamically. but I am not able to find any solution, I found many results for the command line.


I want to call this command script from my nodejs method


ffmpeg -i captain-marvel-trailer.mp4 -i tamil.mp3 -i telugu.mp3 -i hindi.mp3 -map 1 -map 2 -map 3 -metadata:s:a:0 language=eng -metadata:s:a:1 language=tam -metadata:s:a:2 language=tel -metadata:s:a:3 language=hin -codec copy multilanguage.mp4



Here is my codes :


lodash.each(payloadData.languages,function(language){
 let start = 0;
 let max = payloadData.languages.length;
 while (start < max) {
 // fname = `${path.resolve(`contents/hindi.mp3`)} -map 1 -metadata:s:a:0 language=hin -codec copy ${finalVideoPath}`
 // ffmpeg().input(fname) 
 start += 1;
 }
})
 
ffmpeg('./sample.mov')
 .withOutputFormat('.mp4')
 .size('1920x1080')
 .on("end", function (stdout, stderr) { 

 })
}).on("error", function (err) {
 console.log("an error happened: " + err.message);
}).save(finalVideoPath)



-
How to make your plugin multilingual – Introducing the Piwik Platform
29 octobre 2014, par Thomas Steur — DevelopmentThis is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was Generating test data – Introducing the Piwik Platform). This time you’ll learn how to equip your plugin with translations. Users of your plugin will be very thankful that they can use and translate the plugin in their language !
Getting started
In this post, we assume that you have already set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.
Managing translations
Piwik is available in over 50 languages and comes with many translations. The core itself provides some basic translations for words like “Visitor” and “Help”. They are stored in the directory
/lang
. In addition, each plugin can provide its own translations for wordings that are used in this plugin. They are located in/plugins/*/lang
. In those directories you’ll find one JSON file for each language. Each language file consists in turn of tokens that belong to a group.{
"MyPlugin":{
"BlogPost": "Blog post",
"MyToken": "My translation",
"InteractionRate": "Interaction Rate"
}
}A group usually represents the name of a plugin, in this case “MyPlugin”. Within this group, all the tokens are listed on the left side and the related translations on the right side.
Building a translation key
As you will later see to actually translate a word or a sentence you’ll need to know the corresponding translation key. This key is built by combining a group and a token separated by an underscore. You can for instance use the key
MyPlugin_BlogPost
to get a translation of “Blog post”. Defining a new key is as easy as adding a new entry to the “MyPlugin” group.Providing default translations
If a translation cannot be found then the English translation will be used as a default. Therefore, you should always provide a default translation in English for all keys in the file
en.json
(ie,/plugins/MyPlugin/lang/en.json
).Adding translations for other languages
This is as easy as creating new files in the lang subdirectory of your plugin. The filename consists of a 2 letter ISO 639-1 language code completed by the extension
.json
. This means German translations go into a file namedde.json
, French ones into a file namedfr.json
. To see a list of languages you can use have a look at the /lang directory.Reusing translations
As mentioned Piwik comes with quite a lot of translations. You can and should reuse them but you are supposed to be aware that a translation key might be removed or renamed in the future. It is also possible that a translation key was added in a recent version and therefore is not available in older versions of Piwik. We do not currently announce any of such changes. Still, 99% of the translation keys do not change and it is therefore usually a good idea to reuse existing translations. Especially when you or your company would otherwise not be able to provide them. To find any existing translation keys go to Settings => Translation search in your Piwik installation. The menu item will only appear if the development mode is enabled.
Translations in PHP
Use the Piwik::translate() function to translate any text in PHP. Simply pass any existing translation key and you will get the translated text in the language of the current user in return. The English translation will be returned in case none for the current language exists.
$translatedText = Piwik::translate('MyPlugin_BlogPost');
Translations in Twig Templates
To translate text in Twig templates, use the translate filter.
{{ 'MyPlugin_BlogPost'|translate }}
Contributing translations to Piwik
Did you know you can contribute translations to Piwik ? In case you want to improve an existing translation, translate a missing one or add a new language go to Piwik Translations and sign up for an account. You won’t need any knowledge in development to do this.
Advanced features
Of course there are more useful things you can do with translations. For instance you can use placeholders like
%s
in your translations and you can use translations in JavaScript as well. In case you want to know more about those topics check out our Internationalization guide. Currently, this guide only covers translations but we will cover more topics like formatting numbers and handling currencies in the future.Congratulations, you have learnt how to make your plugin multilingual !
If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.