Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (9)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

Sur d’autres sites (2920)

  • using ffmpeg headers with a c program

    15 avril 2014, par orpgol

    i'm trying to learn ffmpeg from drangers guide (for school), i have a mac so the first thing i did was to use Macports and get ffmpeg and sdl...

    now when i'm tried to compile drangers code, the compiler didnt recognize the headers...
    so i used -I on gnu when compiling, and also gave the "whole/path/name..." to the headers,
    but i always get an error on some header missing...

    below i will put the code with my corrections.

    i also tried including all the headers that i get an error about but there is always another header the compiler can't find

    i tried both gnu (on console) and on xcode.

    // tutorial01.c
    // Code based on a tutorial by Martin Bohme (boehme@inb.uni-luebeckREMOVETHIS.de)
    // Tested on Gentoo, CVS version 5/01/07 compiled with GCC 4.1.1

    // A small sample program that shows how to use libavformat and libavcodec to
    // read video from a file.
    //
    // Use
    //
    // gcc -o tutorial01 tutorial01.c -lavformat -lavcodec -lz
    //
    // to build (assuming libavformat and libavcodec are correctly installed
    // your system).
    //
    // Run using
    //
    // tutorial01 myvideofile.mpg
    //
    // to write the first five frames from "myvideofile.mpg" to disk in PPM
    // format.

    #include "/opt/local/include/libavcodec/avcodec.h"
    #include "/opt/local/include/libavformat/avformat.h"

    #include

    void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) {
     FILE *pFile;
     char szFilename[32];
     int  y;

     // Open file
     sprintf(szFilename, "frame%d.ppm", iFrame);
     pFile=fopen(szFilename, "wb");
     if(pFile==NULL)
       return;

     // Write header
     fprintf(pFile, "P6\n%d %d\n255\n", width, height);

     // Write pixel data
     for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);

     // Close file
     fclose(pFile);
    }

    int main(int argc, char *argv[]) {
     AVFormatContext *pFormatCtx;
     int             i, videoStream;
     AVCodecContext  *pCodecCtx;
     AVCodec         *pCodec;
     AVFrame         *pFrame;
     AVFrame         *pFrameRGB;
     AVPacket        packet;
     int             frameFinished;
     int             numBytes;
     uint8_t         *buffer;

     if(argc < 2) {
       printf("Please provide a movie file\n");
       return -1;
     }
     // Register all formats and codecs
     av_register_all();

     // Open video file
     if(av_open_input_file(&pFormatCtx, argv[1], NULL, 0, NULL)!=0)
       return -1; // Couldn't open file

     // Retrieve stream information
     if(av_find_stream_info(pFormatCtx)<0)
       return -1; // Couldn't find stream information

     // Dump information about file onto standard error
     dump_format(pFormatCtx, 0, argv[1], 0);

     // Find the first video stream
     videoStream=-1;
     for(i=0; inb_streams; i++)
       if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) {
         videoStream=i;
         break;
       }
     if(videoStream==-1)
       return -1; // Didn't find a video stream

     // Get a pointer to the codec context for the video stream
     pCodecCtx=pFormatCtx->streams[videoStream]->codec;

     // Find the decoder for the video stream
     pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
     if(pCodec==NULL) {
       fprintf(stderr, "Unsupported codec!\n");
       return -1; // Codec not found
     }
     // Open codec
     if(avcodec_open(pCodecCtx, pCodec)<0)
       return -1; // Could not open codec

     // Allocate video frame
     pFrame=avcodec_alloc_frame();

     // Allocate an AVFrame structure
     pFrameRGB=avcodec_alloc_frame();
     if(pFrameRGB==NULL)
       return -1;

     // Determine required buffer size and allocate buffer
     numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
                     pCodecCtx->height);
     buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));

     // Assign appropriate parts of buffer to image planes in pFrameRGB
     // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
     // of AVPicture
     avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
            pCodecCtx->width, pCodecCtx->height);

     // Read frames and save first five frames to disk
     i=0;
     while(av_read_frame(pFormatCtx, &packet)>=0) {
       // Is this a packet from the video stream?
       if(packet.stream_index==videoStream) {
         // Decode video frame
         avcodec_decode_video(pCodecCtx, pFrame, &frameFinished,
                  packet.data, packet.size);

         // Did we get a video frame?
         if(frameFinished) {
       // Convert the image from its native format to RGB
       img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,
                       (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx->width,
                       pCodecCtx->height);

       // Save the frame to disk
       if(++i<=5)
         SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height,
               i);
         }
       }

       // Free the packet that was allocated by av_read_frame
       av_free_packet(&packet);
     }

     // Free the RGB image
     av_free(buffer);
     av_free(pFrameRGB);

     // Free the YUV frame
     av_free(pFrame);

     // Close the codec
     avcodec_close(pCodecCtx);

     // Close the video file
     av_close_input_file(pFormatCtx);

     return 0;
    }
  • ClassX installation "codec not found" due to dependencies [migrated]

    25 mars 2014, par khateeb

    ClassX is an interactive lecture streaming system developed in the Electrical Engineering Department at Stanford University.
    Unlike conventional lecture capturing systems, ClassX requires very simple consumer-grade equipment and minimal human operation.

    I faced problems during installing it, I hope you have a solution.

    BTW : I successfully installed it 2 years ago, but now I think the problem as the dependencies and Ubuntu versions are different than the versions we used two years ago.

    Detailed description of the problem :

    • I'm using Ubuntu 12.04
    • I followed the instructions @ ClassX installation guide, and all steps till step 4 are successfully done (the encoder bin file generated).
    • When trying to encode the video using the classX web system, it shows the encoding completed after few seconds.However, there are no tiles generated.
    • I tried to execute the command at CX_log.txt, and the following error appears.

      mahmoud@Mahmoud-HP-Pavilion-dv5-Notebook-PC : $ sudo perl /var/www/ClassXWebSystem/system/publishers/web/actions/encode.pl "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251" "/var/www/ClassXWebSystem/content/streaming/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/system/publishers/bin" classx y n n
      [sudo] password for mahmoud :
      00068.jpg
      ..
      .
      00068.mp4
      Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/00068.mp4' :
      Metadata :
      major_brand : isom
      minor_version : 512
      compatible_brands : isomiso2avc1mp41
      encoder : Lavf52.39.0
      Duration : 00:02:30.05, start : 0.000000, bitrate : 8141 kb/s
      Stream #0.0(und) : Video : h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 8007 kb/s, 29.95 fps, 29.97 tbr, 2997 tbn, 59.94 tbc
      Stream #0.1(und) : Audio : aac, 44100 Hz, stereo, s16, 128 kb/s
      Output #0, mp4, to '/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/stream0.mp4' :
      Stream #0.0 : Video : [0][0][0][0] / 0x0000, yuv420p, 640x360, q=32-36, 64 kb/s, 90k tbn, 14.99 tbc
      codec not found

  • ClassX installation "codec not found" due to dependencies [migrated]

    25 mars 2014, par khateeb

    ClassX is an interactive lecture streaming system developed in the Electrical Engineering Department at Stanford University.
    Unlike conventional lecture capturing systems, ClassX requires very simple consumer-grade equipment and minimal human operation.

    I faced problems during installing it, I hope you have a solution.

    BTW : I successfully installed it 2 years ago, but now I think the problem as the dependencies and Ubuntu versions are different than the versions we used two years ago.

    Detailed description of the problem :

    • I’m using Ubuntu 12.04
    • I followed the instructions @ ClassX installation guide, and all steps till step 4 are successfully done (the encoder bin file generated).
    • When trying to encode the video using the classX web system, it shows the encoding completed after few seconds.However, there are no tiles generated.
    • I tried to execute the command at CX_log.txt, and the following error appears.

      mahmoud@Mahmoud-HP-Pavilion-dv5-Notebook-PC : $ sudo perl /var/www/ClassXWebSystem/system/publishers/web/actions/encode.pl "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251" "/var/www/ClassXWebSystem/content/streaming/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/system/publishers/bin" classx y n n
      [sudo] password for mahmoud :
      00068.jpg
      ..
      .
      00068.mp4
      Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/00068.mp4’ :
      Metadata :
      major_brand : isom
      minor_version : 512
      compatible_brands : isomiso2avc1mp41
      encoder : Lavf52.39.0
      Duration : 00:02:30.05, start : 0.000000, bitrate : 8141 kb/s
      Stream #0.0(und) : Video : h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 8007 kb/s, 29.95 fps, 29.97 tbr, 2997 tbn, 59.94 tbc
      Stream #0.1(und) : Audio : aac, 44100 Hz, stereo, s16, 128 kb/s
      Output #0, mp4, to ’/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/stream0.mp4’ :
      Stream #0.0 : Video : [0][0][0][0] / 0x0000, yuv420p, 640x360, q=32-36, 64 kb/s, 90k tbn, 14.99 tbc
      codec not found