Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (92)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • 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 (...)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

Sur d’autres sites (5228)

  • Use avformat_open_input on Android platform crash

    25 avril 2016, par Kyle Lo

    I have a ndk-builded FFmepg video player ,and it renders the frames on screen by using openGL. I put the video file in /sdcard folder. The code works fine on my Acer Liquid S1(API 17).

    But when I install my application to other device (nexus5, A9, Note5 etc.) it crashed, and generates with the error log below.

    E/JNI_LOG : -13

    A/libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 9859

    A/libc : Unable to open connection todebuggerd : Connection refused

    I found that the error is occurred at avformat_open_input in my VideoPlay.cpp. it always returns -13.

    I have checked my video path is correct, and the format is also right.
    Finally I added permission into my AndroidManifest.xml with the solution in this question.
    But it still does not work, showing the same error.

    I have uploaded my code and Demo video below, hope someone can help me !

    Source Code

    Demo Video

    Thank you !

  • Access Violation at avcodec_encode_video2()

    23 mars 2016, par bot1131357

    I am trying to understand the FFmpeg API by following online examples available but it seems that the FFmpeg API has changed over time, making most of the examples obsolete ; I hope some of you can help me make more sense of the FFmpeg API examples.

    I am currently trying to understand the encoding-example from FFmpeg, but I am getting an Access Violation error at this line :

    out_size = avcodec_encode_video2(codecCtx, &avpkt, picture, &got_packet);

    where I get "Unhandled exception at 0x77c29e42 in test01_encode.exe : 0xC0000005 : Access violation reading location 0xccccccc8." from Visual Studio.

    I understand that avcodec_encode_video() is deprecated in favour of avcodec_encode_video2(), which uses AVPacket. I’ve allocated a buffer to data member of AVPacket and set its size, but still the same. What did I miss ?

    The library that I’m using is ffmpeg-20160219-git-98a0053-win32-dev. I would really really appreciate if you could help me out of this confusion.

    (Side : What does it mean by "get delayed frames" and why are we encoding by specifying AVFrame* parameter as NULL ?)

    /*
    * Video encoding example
    */
    char filename[] = "test.mpg";
    int main(int argc, char** argv)
    {
       AVCodec *codec;
       AVCodecContext *codecCtx= NULL;
       int i, out_size, size, x, y, outbuf_size;
       FILE *f;
       AVFrame *picture;
       uint8_t *outbuf, *picture_buf;

       printf("Video encoding\n");

       // Register all formats and codecs
       av_register_all();

       /* find the mpeg1 video encoder */
       codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
       if (!codec) {
           fprintf(stderr, "codec not found\n");
           exit(1);
       }

       codecCtx= avcodec_alloc_context3(codec);
       picture= av_frame_alloc();

       /* put sample parameters */
       codecCtx->bit_rate = 400000;
       /* resolution must be a multiple of two */
       codecCtx->width = 352;
       codecCtx->height = 288;
       /* frames per second */
       //codecCtx->time_base= (AVRational){1,25};
       codecCtx->time_base.num = 1;
       codecCtx->time_base.den = 25;

       codecCtx->gop_size = 10; /* emit one intra frame every ten frames */
       codecCtx->max_b_frames=1;
       codecCtx->pix_fmt = AV_PIX_FMT_YUV420P;

       /* open it */
       if (avcodec_open2(codecCtx, codec, NULL) < 0) {
           fprintf(stderr, "could not open codec\n");
           exit(1);
       }

       fopen_s(&f,filename, "wb");
       if (!f) {
           fprintf(stderr, "could not open %s\n", filename);
           exit(1);
       }

       /* alloc image and output buffer */
       outbuf_size = 100000;
       outbuf = (uint8_t*) malloc(outbuf_size);
       size = codecCtx->width * codecCtx->height;
       picture_buf = (uint8_t*) malloc((size * 3) / 2); /* size for YUV 420 */

       picture->data[0] = picture_buf;
       picture->data[1] = picture->data[0] + size;
       picture->data[2] = picture->data[1] + size / 4;
       picture->linesize[0] = codecCtx->width;
       picture->linesize[1] = codecCtx->width / 2;
       picture->linesize[2] = codecCtx->width / 2;

       picture->width = codecCtx->width;
       picture->height = codecCtx->height;
       picture->format = codecCtx->pix_fmt;

       AVPacket avpkt;
       int got_packet;

       avpkt.size=av_image_get_buffer_size(codecCtx->pix_fmt, codecCtx->width,
                       codecCtx->height,1);    
       avpkt.data = (uint8_t *)av_malloc(avpkt.size*sizeof(uint8_t));

       /* encode 1 second of video */
       for(i=0;i<25;i++) {
           fflush(stdout);
           /* prepare a dummy image */
           /* Y */
           for(y=0;yheight;y++) {
               for(x=0;xwidth;x++) {
                   picture->data[0][y * picture->linesize[0] + x] = x + y + i * 3;
               }
           }

           /* Cb and Cr */
           for(y=0;yheight/2;y++) {
               for(x=0;xwidth/2;x++) {
                   picture->data[1][y * picture->linesize[1] + x] = 128 + y + i * 2;
                   picture->data[2][y * picture->linesize[2] + x] = 64 + x + i * 5;
               }
           }

           /* encode the image */
           //out_size = avcodec_encode_video(codecCtx, outbuf, outbuf_size, picture);
           // <access violation="violation">
           out_size = avcodec_encode_video2(codecCtx, &amp;avpkt, picture, &amp;got_packet);
           printf("encoding frame %3d (size=%5d)\n", i, out_size);
           //fwrite(outbuf, 1, out_size, f);
           fwrite(avpkt.data, 1, avpkt.size, f);
       }

       /* get the delayed frames */
       for(; out_size; i++) {
           fflush(stdout);

           //out_size = avcodec_encode_video(codecCtx, outbuf, outbuf_size, NULL);
           out_size = avcodec_encode_video2(codecCtx, &amp;avpkt, NULL, &amp;got_packet);
           printf("write frame %3d (size=%5d)\n", i, out_size);
           //fwrite(outbuf, 1, out_size, f);
           fwrite(avpkt.data, 1, avpkt.size, f);
       }

       /* add sequence end code to have a real mpeg file */
       outbuf[0] = 0x00;
       outbuf[1] = 0x00;
       outbuf[2] = 0x01;
       outbuf[3] = 0xb7;
       fwrite(outbuf, 1, 4, f);
       fclose(f);
       free(picture_buf);
       free(outbuf);

       avcodec_close(codecCtx);
       av_free(codecCtx);
       av_free(picture);
       printf("\n");
    }
    </access>
  • Change youtube-dl download output (Windows)

    13 avril 2016, par Inforcer25

    I hope you can help me.

    I am using youtube-dl on windows (youtube-dl.exe)
    Downloading the video works great and also just the audio. But what i want is for it to save the audio file in a different place eg. C :\Users*******\Desktop

    I made a batch file with this code :

    :audio
    cls
    echo.
    echo.
    echo Your audio vill be downloaded and saved as a .mp3 format
    echo.
    echo.
    set /p audio=Enter Video URL here:
    cls
    youtube-dl.exe --extract-audio --audio-format mp3 --output C:\Users\*******\Desktop\(ext)s.%(ext)s %audio%
    pause
    cls
    echo.
    echo.
    echo.
    echo.
    echo Your audio has now been downloaded.
    ping localhost -n 3 >nul
    exit

    and then it gives me this

    Usage: youtube-dl.exe [OPTIONS] URL [URL...]

    youtube-dl.exe: error: You must provide at least one URL.
    Type youtube-dl --help to see a list of all options.
    Press any key to continue . . .

    It works fine if i use this but it saves it in the same folder.

    :audio
    cls
    echo.
    echo.
    echo Your audio vill be downloaded and saved as a .mp3 format
    echo.
    echo.
    set /p audio=Enter Video URL here:
    cls
    youtube-dl.exe --extract-audio --audio-format mp3 %audio%
    pause
    cls
    echo.
    echo.
    echo.
    echo.
    echo Your audio has now been downloaded.
    ping localhost -n 3 >nul
    exit

    Also please keep in mind that it also uses ffprobe.exe and ffmpeg.exe (They are both in the same folder as youtube-dl.exe