
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (87)
-
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 (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe 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 (9994)
-
avcodec/movtextdec : Sanitize style entries
7 décembre 2021, par Andreas Rheinhardtavcodec/movtextdec : Sanitize style entries
There are three types of style entries which are redundant :
a) Entries with length zero. They are already discarded.
b) Entries that are equivalent to the default style :
They can be safely discarded.
c) Entries that are equivalent to the immediately preceding style
if the start of the current style coincides with the end of the
preceding style. In this case the styles can be merged.This commit implements discarding/merging in cases b) and c).
This fixes ticket #9548. In said ticket each packet contained
exactly one style entry that covered the complete packet with
the exception of the last character (probably created by a tool
that didn't know that the style's end is exclusive). Said style
coincided with the default style, leading to a superfluous reset,
which is now gone.Reviewed-by : Philip Langdale <philipl@overt.org>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com> -
python 3 using ffmpeg in a subprocess getting stderr decoding error
4 mai 2024, par jdauthreI am running ffmpeg as a subprocess and using the stderr to get various bits of data like the subtitles stream Id's. It works fine for most videos, but one with japanese subtitles results in an error :


'charmap' codec can't decode byte in position xxx : character maps to


Much googling suggests the problem is that the japanese requires unicode, whereas English does not. Solutions offered refer to problems with files, and I cannot find a way of doing the same with the stderr. Relevent Code is below :


command = [ffmpeg,"-y","-i",fileSelected,"-acodec","pcm_s16le",
 "-vn","-t","3", "-f", "null","-"]
print(command) 
proc = subprocess.Popen(command,stderr=PIPE,Jstdin=subprocess.PIPE,
 universal_newlines=True,startupinfo=startupinfo)
 
stream = "" 
for line in proc.stderr:
 try:
 print("line",line)
 except exception as error:
 print("print",error)
 line = line[:-1]
 if "Stream #" in line:
 estream = line.split("#",1)[1]
 estream =estream.split(" (",1)[0]
 print("estream",estream)
 stream = stream + estream +"\n" #.split("(",1)[0] 
 stream = stream + estream +"\n"



-
How to convert to QString from const char* result from ffmpeg C function
18 octobre 2022, par LucasI use the ffmpeg library in c++ / qt project


extern "C" {
 #include <libavformat></libavformat>avformat.h>
 #include <libavutil></libavutil>dict.h>
}



With this I read the media metadata from a local music file. This works quite fine :


avformat_open_input(&format_song, path, NULL, NULL);

while((tag = av_dict_get(format_song->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))){
 std::cout << tag.key << tag.value << std::endl;
 // tag.value is a const char* (but in C!?)
}



Altough the encoding of the
tag.value
seems to be different for files (maybe saved different in the id3tags). Here are some examples of different title values for different files :

"Töhne" [ö]
"Die Ärzte" [Ä]
"Für Immer"



How to convert this to a readable QString ?


There are some problems with the encoding of special characters. For most cases the following works :


QString result = QString(tag->value).normalized(QString::NormalizationForm_C);
//or:
QString result = QString::fromUtf8(tag->value);



But sometimes this results in a U+FFFD � REPLACEMENT CHARACTER for some "Ü" "Ä" "ß" etc. chars.
But in in that cases
fromLocal8Bit
works. So I end up testing for replacement characters and choose a different conversion :

if(result.contains(QChar::ReplacementCharacter)){
 result = QString::fromLocal8Bit(tag->value);
}



I expect there is a better way to do this ?