Recherche avancée

Médias (91)

Autres articles (49)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (3036)

  • FFmpeg concat produces bad Video

    6 mars 2019, par Amorphis

    I have installed ffmpeg on a microsoft/dotnet:2.2-aspnetcore-runtime docker container using
    1.apt-get update
    2.apt-get install ffmpeg.

    seems to be installed fine, but when I try and use it as such
    ffmpeg -f concat -i /data/mylist.txt -c : copy /data/output.mp4

    the output is that the first video part is ok, but the second colors are all messy (hard to explain) and when I change the order of the videos in the list still the first in the list is ok and the second is messed up.

    p.s same settings on a different machine works (ffmpeg for ubuntu)

    bad

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ccbcce90c0] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from '/data/mylist.txt':
     Duration: N/A, start: 0.000000, bitrate: 14915 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 14915 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
       Metadata:
         creation_time   : 2014-10-17T04:06:30.000000Z
         handler_name    : GPAC ISO Video Handler
    Output #0, mp4, to '/data/output.mp4':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0(und): Video: h264 (Constrained Baseline) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 14915 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
       Metadata:
         creation_time   : 2014-10-17T04:06:30.000000Z
         handler_name    : GPAC ISO Video Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)

    good

    Input #0, concat, from '/data/mylist.txt':
     Duration: N/A, start: 0.000000, bitrate: 14915 kb/s
       Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 14915 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
       Metadata:
         creation_time   : 2014-10-17T04:06:30.000000Z
         handler_name    : GPAC ISO Video Handler
    Output #0, mp4, to '/data/outGood1.mp4':
     Metadata:
       encoder         : Lavf58.20.100
       Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 14915 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
       Metadata:
         creation_time   : 2014-10-17T04:06:30.000000Z
         handler_name    : GPAC ISO Video Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
  • ffmpeg doesn't recognize Quicktime DV codec

    8 août 2017, par 3pointedit

    I have had success with excellent advice, on a Mac OSX10.5, converting a modified MXF media structure to h264 while retaining multitrack audio. But I cannot get ffmpeg to work in Windows environment.

    See this page.

    Here’s the result of latest failure-

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    F:\>h:

    H:\>cd conversion folder


    H:\Conversion folder>ffmpeg ffmpeg -report -enable_drefs 1 -use_absolute_path 1
    -i fdb9_AerialsEagleFarm_0610.mov -map 0:v -map 0:a -write_tmcd 1 fd9_AerialsEag
    leFarm_A0609.mp4
    ffmpeg started on 2017-08-08 at 15:01:24
    Report written to "ffmpeg-20170808-150124.log"
    ffmpeg version N-86950-g1bef008 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.1.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
    nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
    enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
    --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
    bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
    -enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
    e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
    bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
    e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
    -libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 70.100 / 55. 70.100
     libavcodec     57.102.100 / 57.102.100
     libavformat    57. 76.100 / 57. 76.100
     libavdevice    57.  7.100 / 57.  7.100
     libavfilter     6. 98.100 /  6. 98.100
     libswscale      4.  7.102 /  4.  7.102
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] Opening 'video.vid' for reading
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] stream 0, error opening alias: path
    ='/VibrintAVFiles/Xchange In/fdb9_AerialsEagleFarm_0610.vmf/video.vid', dir='fdb
    9_AerialsEagleFarm_0610.vmf', filename='video.vid', volume='default', nlvl_from=
    1, nlvl_to=1
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] Opening 'audio_0.pcm' for reading
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] stream 1, error opening alias: path
    ='/VibrintAVFiles/Xchange In/fdb9_AerialsEagleFarm_0610.vmf/audio_0.pcm', dir='f
    db9_AerialsEagleFarm_0610.vmf', filename='audio_0.pcm', volume='default', nlvl_f
    rom=1, nlvl_to=1
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] Opening 'audio_1.pcm' for reading
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] stream 2, error opening alias: path
    ='/VibrintAVFiles/Xchange In/fdb9_AerialsEagleFarm_0610.vmf/audio_1.pcm', dir='f
    db9_AerialsEagleFarm_0610.vmf', filename='audio_1.pcm', volume='default', nlvl_f
    rom=1, nlvl_to=1
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] Opening 'audio_2.pcm' for reading
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] stream 3, error opening alias: path
    ='/VibrintAVFiles/Xchange In/fdb9_AerialsEagleFarm_0610.vmf/audio_2.pcm', dir='f
    db9_AerialsEagleFarm_0610.vmf', filename='audio_2.pcm', volume='default', nlvl_f
    rom=1, nlvl_to=1
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] Opening 'audio_3.pcm' for reading
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] stream 4, error opening alias: path
    ='/VibrintAVFiles/Xchange In/fdb9_AerialsEagleFarm_0610.vmf/audio_3.pcm', dir='f
    db9_AerialsEagleFarm_0610.vmf', filename='audio_3.pcm', volume='default', nlvl_f
    rom=1, nlvl_to=1
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005c99a0] Could not find codec parameters for
    stream 0 (Video: dvvideo (dvpp / 0x70707664), none, 720x576, 28800 kb/s): unspe
    cified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Guessed Channel Layout for Input Stream #0.1 : mono
    Guessed Channel Layout for Input Stream #0.2 : mono
    Guessed Channel Layout for Input Stream #0.3 : mono
    Guessed Channel Layout for Input Stream #0.4 : mono
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fdb9_AerialsEagleFarm_0610.mov':
     Metadata:
       creation_time   : 2016-10-06T07:01:58.000000Z
     Duration: 00:12:43.90, start: 0.000000, bitrate: 1 kb/s
       Stream #0:0(eng): Video: dvvideo (dvpp / 0x70707664), none, 720x576, 28800 k
    b/s, SAR 118:81 DAR 295:162, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default)
       Metadata:
         creation_time   : 2016-10-06T07:01:58.000000Z
         handler_name    : Apple Alias Data Handler
         timecode        : 01:17:27:12
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16,
    768 kb/s (default)
       Metadata:
         creation_time   : 2016-10-06T07:01:58.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16,
    768 kb/s (default)
       Metadata:
         creation_time   : 2016-10-06T07:01:58.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16,
    768 kb/s (default)
       Metadata:
         creation_time   : 2016-10-06T07:01:58.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16,
    768 kb/s (default)
       Metadata:
         creation_time   : 2016-10-06T07:01:58.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:5(eng): Data: none (tmcd / 0x64636D74) (default)
       Metadata:
         creation_time   : 2016-10-06T07:01:58.000000Z
         handler_name    : Apple Handle Data Handler
         timecode        : 01:17:27:12
    [NULL @ 00000000005cad20] Unable to find a suitable output format for 'ffmpeg'
    ffmpeg: Invalid argument

    And a screen grab of file structure (although I’m using an alias for target)

    alt mxf media

  • Convert individual pixel values from RGB to YUV420 and save the frame - C++

    24 mars 2014, par learner

    I have been working with RGB->YUV420 conversion for sometime using the FFmpeg library. Already tried the sws_scale functionality but its not working well. Now, I have decided to convert each pixel individually, using colorspace conversion formulae. So, following is the code that gets me few frames and allows me to access individual R,G,B values of each pixel :

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

               // Did we get a video frame?
               if(frameFinished)
               {
                   i++;
                   sws_scale(img_convert_ctx, (const uint8_t * const *)pFrame->data,
                             pFrame->linesize, 0, pCodecCtx->height,
                             pFrameRGB->data, pFrameRGB->linesize);

                   int x, y, R, G, B;
                   uint8_t *p = pFrameRGB->data[0];
                   for(y = 0; y < h; y++)
                   {  
                       for(x = 0; x < w; x++)
                       {
                           R = *p++;
                           G = *p++;
                           B = *p++;
                           printf(" %d-%d-%d ",R,G,B);
                       }
                   }

                   SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, i);
               }
           }

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

    I read online that to convert RGB->YUV420 or vice-versa, one should first convert to YUV444 format. So, its like : RGB->YUV444->YUV420. How do I implement this in C++ ?

    Also, here is the SaveFrame() function used above. I guess this will also have to change a little since YUV420 stores data differently. How to take care of that ?

    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);
    }

    Can somebody please suggest ? Many thanks !!!