Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (101)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang 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.

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (9150)

  • How can I simply do color interpolation on this image and then save the image ? With RGBA channels as example

    24 août 2020, par karl-police

    So I got this GIF here :

    


    


    As you can see, it has Red, Green and Blue in it. And it also has a full transparency in it. This was composed together with FFMPEG out of images that looked exactly like that.

    


     

    


    Then, with FFMPEG I "decomposed" the RGB and Alpha channels using the filter "extractplanes".

    


    The gallery of that, in correct order starting from up to down, can be found here :

    


    https://imgur.com/a/WN0aGuW

    


    I am not sure if this actually helps me or if I'm supposed to decompose them. Because apperantly now, after decomposing them, I'm supposed to modify them, but I'm not really sure how. It's like how do I modify the red channel that only has black and white, so all at the end, will match to the specified HEX color that I want it to be to.

    


     

    


    Now, my question is. How do I exactly make the color changing happen ? Can I do this simply with JavaScript ? Is it possible to do with FFMPEG, if possible without ImageMagicks ? Maybe a programming language where not much installation is needed to do that ?

    


    What I understood is that. These channels basically contain values from 0 to 255 with black and white. I think the "brightness" is that what 0 and 255. So something inbetween, would be like grey.

    


    So basically, like we do (255,0,0) for red. In these channels, if I want red somewhere I need to put one fully white pixel on the red channel and on all the other channels, there has to be a fully black pixel.

    


    That's the concept. Now is the question, how can I do this ?

    


     

    


    At the end I want to make it look like this one as example :

    


    


    This is from a game. So basically that's how it looks like in the game. And the game files only use these RGBA template sprites.

    


     

    


    I asked a similar question here : How to change colors of an image using RGBA and more channels independently of their color

    


    But somehow, I might didn't seem to explain it that well.

    


     

    


    I made a thing here to test around with things. I guess that's nearly close, but the lines are kinda weird. jsfiddle.net/qsgazubk

    


  • Why is the FindClass/JNI function behaving differently on nexus 5 and Honor Play ?

    17 août 2020, par Owl

    MobileFFmpeg v4.3.1LTS works on Honor Play, but doesn't work on Nexus 5. Why ?

    


    The build for Honor Play and nexus 5 is the same ->armeabi-v7a

    


    


    https://github.com/tanersener/mobile-ffmpeg/releases/tag/v4.3.1.LTS

    


    Nexus5 :enter image description here

    


    HonorPlay :enter image description here

    


    


    


    NDK = ndk-r14b

    


    


    


    JDK = jdk1.8.0_77

    


    


    I will ask the question immediately in English stackoverflow. Developing a game in Unreal Engine 4 v24.3. In the code itself there are only 2 lines that relate to MobileFFmpeg :

    


    Enabling the function :

    


    extern "C"
{
    int ffmpeg_execute(int argc, char** argv);
}


    


    Calling a function with ffmpeg parameters

    


    ffmpeg_execute(arg.size(), arg.data());


    


    Without mobile FFmpeg, the app on nexus 5 starts and works stably. When I start with FFmpeg, an error immediately appears and the app crashes :

    


    enter image description here

    


    The FindClass function does not work, the call itself is declared in mobile ffmpeg.c :

    


    /** Full name of the Config class */
const char *configClassName = "com/arthenica/mobileffmpeg/Config";


    


    ...

    


    /**
 * Called when 'mobileffmpeg' native library is loaded.
 *
 * @param vm pointer to the running virtual machine
 * @param reserved reserved
 * @return JNI version needed by 'mobileffmpeg' library
 */
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
    JNIEnv *env;
    if ((*vm)->GetEnv(vm, (void**)(&env), JNI_VERSION_1_6) != JNI_OK) {
        LOGE("OnLoad failed to GetEnv for class %s.\n", configClassName);
        return JNI_FALSE;
    }

    jclass localConfigClass = (*env)->FindClass(env, configClassName);
    if (localConfigClass == NULL) {
        LOGE("OnLoad failed to FindClass %s.\n", configClassName);
        return JNI_FALSE;
    }
...


    


    I can't see what the FindClass(C++) function returns, Android Studio doesn't want to stop on the JNI_OnLoad(C++) function during debug.

    


    What are the assumptions why FindClass behavior is different on two phones ?

    


  • ffmpeg burned-in subtitles render in the wrong font

    21 août 2024, par dv151

    Trying to burn in subtitles to a video in FFMPEG in GothamProBold font. No matter what I do it keeps reverting to Helvetica. From the console, I see that FFMPEG seems to load the font without error. Then switches over to font provider "coretext"

    


    [Parsed_subtitles_0 @ 0x7fed054048c0] Loading font file '/Projects/Fonts/GothaProBol.otf'
[Parsed_subtitles_0 @ 0x7fed054048c0] Using font provider coretext
[Parsed_subtitles_0 @ 0x7fed054048c0] fontselect: (GothaProBol.otf, 400, 0) -> /System/Library/Fonts/Helvetica.ttc, -1, Helvetica


    


    It seems like it has my font loaded, then loads what is likely a system default of Helvetica instead. My guess is that my chosen font isn't actually loading after all.

    


    FFMPEG command (called from python) is as follows :

    


    ffmpeg_cmd = ["ffmpeg", 
              "-i", self.source_video_uri, 
              "-y",
              "-c:v", "prores", "-profile:v", "1", 
              "-c:a", "pcm_s16be", 
              "-vf", f"subtitles={srt_uri}:fontsdir=/Projects/Fonts:force_style='Fontname=GothaProBol.otf'",
              f"{self.source_video_uri}_render.mov"]

subprocess.call(ffmpeg_cmd)


    


    Any ideas ?

    


    UPDATE : Found this setting in libass header file "ass.h" - which ffmpeg calls when using the subtitle filter. Don't know how to actually set this variable when ffmpeg calls libass, but here it is. Line 182 :

    


     * \brief Default Font provider to load fonts in libass' database
 *
 * NONE don't use any default font provider for font lookup
 * AUTODETECT use the first available font provider
 * CORETEXT force a CoreText based font provider (OS X only)
 * FONTCONFIG force a Fontconfig based font provider
 *
 * libass uses the best shaper available by default.
 */
typedef enum {
    ASS_FONTPROVIDER_NONE       = 0,
    ASS_FONTPROVIDER_AUTODETECT = 1,
    ASS_FONTPROVIDER_CORETEXT,
    ASS_FONTPROVIDER_FONTCONFIG,
    ASS_FONTPROVIDER_DIRECTWRITE,
} ASS_DefaultFontProvider;


    


    RE : ANSWER BELOW : For the most part, it seems that if your font is installed in /System/Fonts or /Library/Fonts then CoreText can find it. Though in some cases, the naming conventions can be quite particular and non-intuitive. It also can't seem to find all fonts, necessarily.

    


    For example : Gotham Pro Bold, in the /Library/Fonts folder on my system, file named "GothaProBol.otf" is correctly passed to fontname as : GothamPro-Bold or just Gotham Pro. Gotham Pro Bold, GothamPro, Gotham Pro-Bold, GothaProBol, and GothaProBol.otf do NOT work.

    


    For most fonts it seems the preferred convention is FontName-Style/Weight as displayed in Mac OS's FontBook, not the filename.

    


    That said, I have a novelty 'Game of Thrones.ttf' font in the same folder as Gotham Pro, and I can't get CoreText to connect to it under any of the above naming conventions.