Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (96)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (6030)

  • lavd/v4l2 : Add ARGB and XRGB packed pixel formats

    10 mai 2018, par Anton Leontiev
    lavd/v4l2 : Add ARGB and XRGB packed pixel formats
    

    Formats ARGB32, XRGB32, ABGR32, and XBGR32 were added to V4L2 instead
    of ill-defined deprecated RGB32/BGR32 pixel formats.

    When pixel format is not specified explicitly FFmpeg tries formats in
    order in which they are stored in the table. Therefore formats are
    sorted as follows : BGR is preferred over RGB and XBGR is preferred
    over ARGB, because it could give better performance by ignoring alpha
    component.

    • [DH] libavdevice/v4l2-common.c
  • How do I write audio and video to the same file using FFMPEG and C ?

    29 juin 2018, par benwiz

    I am consuming an audio file and a video file using ffmpeg in a C program. I am modifying both the audio and the video data. In working the code below I write both each of these streams to its own file. How can I write both streams to the same file ?

    #include
    #include
    #include

    // Video resolution
    #define W 1280
    #define H 720

    // Allocate a buffer to store one video frame
    unsigned char video_frame[H][W][3] = {0};

    int main()
    {
       // Audio pipes
       FILE *audio_pipein = popen("ffmpeg -i data/daft-punk.mp3 -f s16le -ac 1 -", "r");
       FILE *audio_pipeout = popen("ffmpeg -y -f s16le -ar 44100 -ac 1 -i - out/daft-punk.mp3", "w");

       // Video pipes
       FILE *video_pipein = popen("ffmpeg -i data/daft-punk.mp4 -f image2pipe -vcodec rawvideo -pix_fmt rgb24 -", "r");
       FILE *video_pipeout = popen("ffmpeg -y -f rawvideo -vcodec rawvideo -pix_fmt rgb24 -s 1280x720 -r 25 -i - -f mp4 -q:v 5 -an -vcodec mpeg4 out/daft-punk.mp4", "w");

       // Audio vars
       int16_t audio_sample;
       int audio_count;
       int audio_n = 0;

       // Video vars
       int x = 0;
       int y = 0;
       int video_count = 0;

       // Read, modify, and write one audio_sample and video_frame at a time
       while (1)
       {
           // Audio
           audio_count = fread(&audio_sample, 2, 1, audio_pipein); // read one 2-byte audio_sample
           if (audio_count == 1)
           {
               ++audio_n;
               audio_sample = audio_sample * sin(audio_n * 5.0 * 2 * M_PI / 44100.0);
               fwrite(&audio_sample, 2, 1, audio_pipeout);
           }

           // Video
           video_count = fread(video_frame, 1, H * W * 3, video_pipein); // Read a frame from the input pipe into the buffer
           if (video_count == H * W * 3)                                 // Only modify and write if frame exists
           {
               for (y = 0; y < H; ++y)     // Process this frame
                   for (x = 0; x < W; ++x) // Invert each colour component in every pixel
                   {
                       video_frame[y][x][0] = 255 - video_frame[y][x][0]; // red
                       video_frame[y][x][1] = 255 - video_frame[y][x][1]; // green
                       video_frame[y][x][2] = 255 - video_frame[y][x][2]; // blue
                   }
               fwrite(video_frame, 1, H * W * 3, video_pipeout); // Write this frame to the output pipe
           }

           // Break if both complete
           if (audio_count != 1 && video_count != H * W * 3)
               break;
       }

       // Close audio pipes
       pclose(audio_pipein);
       pclose(audio_pipeout);

       // Close video pipes
       fflush(video_pipein);
       fflush(video_pipeout);
       pclose(video_pipein);
       pclose(video_pipeout);

       return 0;
    }

    I took the base for this code from this article.

    Thanks !

  • Issues with fluent-ffmpeg plugin in angular-cli project

    8 août 2018, par Esco

    I’have installed ’fluent-ffmpeg’ plugin in my project and I’m including it in the following way in my component.ts file

    declare var require;
    var ffmpeg = require('fluent-ffmpeg');

    I’m getting the following issues while building using ng serve

    ERROR in ./node_modules/fluent-ffmpeg/index.js
    Module not found: Error: Can't resolve './lib-cov/fluent-ffmpeg' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg'
    ERROR in ./node_modules/fluent-ffmpeg/lib/ffprobe.js
    Module not found: Error: Can't resolve 'child_process' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/utils.js
    Module not found: Error: Can't resolve 'child_process' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js
    Module not found: Error: Can't resolve 'child_process' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js
    Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/capabilities.js
    Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js
    Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/isexe/windows.js
    Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/isexe'
    ERROR in ./node_modules/isexe/mode.js
    Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/isexe'
    ERROR in ./node_modules/isexe/index.js
    Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/isexe'
    ERROR in ./node_modules/fluent-ffmpeg/lib/utils.js
    Module not found: Error: Can't resolve 'os' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js
    Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js
    Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js
    Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/capabilities.js
    Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ERROR in ./node_modules/fluent-ffmpeg/lib/options/misc.js
    Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib/options'
    ERROR in ./node_modules/which/which.js
    Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/which'
    ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js
    Module not found: Error: Can't resolve 'stream' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib'
    ℹ 「wdm」: Failed to compile.

    Can somebody help me in resolving this ?