Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (46)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (7606)

  • Cannot create SDL_Window giving SDL_Main.h error even though included

    27 février 2015, par user2270995

    I am trying to play network stream using FFMPEG(Fetching, decoding.etc) and trying to render it using SDL.

    When I run my Application it starts normally but as soon as I call OpenFile() which contains code for opening network stream and creating SDL_Window and then SDL_Renderer but it gives me a error on SDL_CreateWindow() saying :

    Window not created: [Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?].

    Even though I have included SDL_main.h.

    #include
    #include
    ..... //other header files

    #define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
    #define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)

    SDL_Window *window;
    SDL_Renderer *renderer;

    int main(int argc, char *argv[])
    {
       if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER))
       {
         LOGE("Could not initialize SDL - %s\n", SDL_GetError());
         exit(1);
       }
       return 0;
    }

    void Java_com_my_app_MainActivity_openFile(JNIEnv * env, jobject this, jstring url)
    {
       ......
       ...... //FFMPEG code

     //---------------------------SDL part -------------------------//

     window = SDL_CreateWindow("Window", SDL_WINDOWPOS_UNDEFINED,
              SDL_WINDOWPOS_UNDEFINED, 0, 0,
              SDL_WINDOW_SHOWN | SDL_WINDOW_FULLSCREEN);

      if(window == NULL)
      {
          LOGE("Window not created: [%s]", SDL_GetError());
          return;
      }
      LOGE("Window created");

     renderer = SDL_CreateRenderer(window,-1,SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
      if(renderer == NULL)
      {
          LOGE("renderer not created: [%s]", SDL_GetError());
          return;
      }
      LOGE("Rendering Created...");
    }

    Here’s code from another project i tried (following this tutorial) in which i do not in my MainActivity and i works fine

      #include
      #include
      #include

      #include "SDL.h"

    typedef struct Sprite
    {
      SDL_Texture* texture;
      Uint16 w;
      Uint16 h;
    } Sprite;

    Sprite LoadSprite(const char* file, SDL_Renderer* renderer)
    {
       Sprite result;
       result.texture = NULL;
       result.w = 0;
       result.h = 0;

       SDL_Surface* temp;

       /* Load the sprite image */
       temp = SDL_LoadBMP(file);
       if (temp == NULL)
       {
           fprintf(stderr, "Couldn't load %s: %s\n", file, SDL_GetError());
           return result;
       }
       result.w = temp->w;
       result.h = temp->h;

       /* Create texture from the image */
       result.texture = SDL_CreateTextureFromSurface(renderer, temp);
       if (!result.texture) {
           fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError());
           SDL_FreeSurface(temp);
           return result;
       }
       SDL_FreeSurface(temp);

       return result;
    }

    void draw(SDL_Window* window, SDL_Renderer* renderer, const Sprite sprite)
    {
       int w, h;
       SDL_GetWindowSize(window, &w, &h);
       SDL_Rect destRect = {w/2 - sprite.w/2, h/2 - sprite.h/2, sprite.w, sprite.h};
       /* Blit the sprite onto the screen */
       SDL_RenderCopy(renderer, sprite.texture, NULL, &destRect);
    }

    int main(int argc, char *argv[])
    {
       if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER))
       {
            fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
            exit(1);
       }

       SDL_Window *window;
       SDL_Renderer *renderer;

       if(SDL_CreateWindowAndRenderer(0, 0, 0, &window, &renderer) < 0)
           exit(2);

       Sprite sprite = LoadSprite("image.bmp", renderer);
       if(sprite.texture == NULL)
           exit(2);

       /* Main render loop */
       Uint8 done = 0;
       SDL_Event event;
       while(!done)
       {
           /* Check for events */
           while(SDL_PollEvent(&event))
           {
               if(event.type == SDL_QUIT || event.type == SDL_KEYDOWN )//|| event.type == SDL_FINGERDOWN)
               {
                   done = 1;
               }
           }


       /* Draw a gray background */
       SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
       SDL_RenderClear(renderer);

       draw(window, renderer, sprite);

       /* Update the screen! */
       SDL_RenderPresent(renderer);

       SDL_Delay(10);
    }

    exit(0);

    }

    Note : I created the first project (the one giving error) from this fine working project

    I have tried removing SDL_main.h’, using #undef main but none of it works. Now it has started giving me a error Saying 'java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "SDL_main" referenced by "libmain.so"...

    My Android.mk

    LOCAL_PATH := $(call my-dir)

    include $(CLEAR_VARS)
    LOCAL_MODULE := ffmpeg
    LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libffmpeg.so
    LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/$(TARGET_ARCH_ABI)/include
    include $(PREBUILT_SHARED_LIBRARY)


    include $(CLEAR_VARS)
    SDL_PATH := ../SDL
    MY_FILES_PATH := ../src
    LOCAL_MODULE    := main
    # Add your application source files here...
    LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
                      $(patsubst $(LOCAL_PATH)/%, %, $(wildcard $(LOCAL_PATH)/src/*.c))

    LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
    LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ljnigraphics -lGLESv1_CM -lGLESv2 -llog -lz -lm
    LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
    LOCAL_SHARED_LIBRARIES := SDL2
    LOCAL_SHARED_LIBRARIES += ffmpeg
    include $(BUILD_SHARED_LIBRARY)
  • FFMPEG - how to add a text and crop a video at the same time

    18 janvier 2023, par ProgramadorLIXO

    Im trying to learn FFMPEG.
I am having trouble figuring out how to add a text on top of a cropped video with only one line code.

    


    I want to know how to do both at the same time !

    


    I tried something but it did not work.

    


    This is what I tried :

    


    -i GoopDeer.mp4 -ss 00:03:23 -to 00:03:33 -filter_complex "[0:v]scale=iw*2:-1,crop=1920:1088:1920:1088[Vídeo];
drawtext=text='IT'S NATHAN!!!': fontsize=100: fontcolor=white[texto];[Vídeo][texto]overlay" 10.mp4


    


    but is not correct, it's not rendering.
This is the error i got -

    


    


    bash : !' : event not found

    


    


    How do i do this ?

    


  • How to trigger from button in UVC camera

    8 août 2016, par Buddhishan Manamperi

    I’m taking pictures from a webcam using Intel Edison. I was able to capture still images from the camera after installing uvc driver for linux and ffmpeg software. I use a script to capture.

    ./ffmpeg -s 640x640 -f video4linux2 -i /dev/video0 -vframes 1 image.jpeg;

    I want to capture the image from the button (in the web cam) press event. I used a USB analyzer in windows to analyze packets. It was found that URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is transferring UP and DOWN when the button is pressed.

    Please Help me to implement button press triggering on Linux so that I could use it on Edison.