Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (105)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9631)

  • Remux RTSP stream into container ? (Write read frame without decoding it)

    1er septembre 2016, par Aram

    I’m trying to use dranger tutorials for writing a RTSP h264 streamed video directly to a file without decoding and encoding it (ffmpeg 3.0/3.1 library). But I’m a bit lost on how do I need to populate the AVFormatContext pointer for the av_write_frame once I get the corresponding AVPacket.

    Trying to clarify. What I want to do is this

    1. Open webcam stream in h264
    2. Read a frame
    3. Save it to a file without decoding and encoding it.

    EDIT : I’ve also tried to use the remuxing example in ffmpeg’s documentation (doing a network init()) but I’m getting dts and pts sync errors when going from rtsp -> .mp4

    Copy pasting the code from the tutorial :

    #include
    #include <libavutil></libavutil>pixfmt.h>
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavutil></libavutil>avconfig.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libavformat></libavformat>avformat.h>

    int main(int argc, char *argv[]) {
       av_register_all();
       avcodec_register_all();
       avformat_network_init();

       AVFormatContext *pFormatCtx = avformat_alloc_context();

       // Camera comes from argv[1]
       avformat_open_input(&amp;pFormatCtx, argv[1], NULL, NULL);
       avformat_find_stream_info(pFormatCtx, NULL);
       av_dump_format(pFormatCtx, 0, argv[1], 0);

       int video_stream_idx = -1;

       for (int i = 0; i &lt; pFormatCtx->nb_streams; i++) {
           if (pFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
               video_stream_idx = i;
               break;
           }
       }

       AVCodecContext *pCodecContext = NULL;
       AVCodecContext *pCodecContextOrig = NULL;

       pCodecContextOrig = pFormatCtx->streams[video_stream_idx]->codec;
       AVCodec *pCodec;
       pCodec = avcodec_find_decoder(pCodecContextOrig->codec_id);
       pCodecContext = avcodec_alloc_context3(pCodec);
       avcodec_copy_context(pCodecContext, pCodecContextOrig);
       avcodec_open2(pCodecContext, pCodec, NULL);

       AVFrame *pFrame = av_frame_alloc();
       AVFrame *pFrameRGB = av_frame_alloc();

       uint8_t *buffer = NULL;
       int buffer_size = avpicture_get_size(AV_PIX_FMT_RGB24, pCodecContext->width,
                                            pCodecContext->height);
       buffer = (uint8_t *)av_malloc(buffer_size * sizeof(uint8_t));

       // fill buffer
       avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24,
                      pCodecContext->width, pCodecContext->height);

       struct SwsContext *sws_ctx = NULL;
       int frame_finished = 0;
       AVPacket packet;

       // Size(src), fmt(src), Size(dst), fmt(dst) .. flags
       sws_ctx = sws_getContext(pCodecContext->width, pCodecContext->height,
                                pCodecContext->pix_fmt, pCodecContext->width,
                                pCodecContext->height, AV_PIX_FMT_RGB24,
                                SWS_BILINEAR, NULL, NULL, NULL);


       AVFormatContext *out_fmt_ctx;

       avformat_write_header(out_fmt_ctx, NULL);

       int i = 0;
       while (i &lt; 100 &amp;&amp; (av_read_frame(pFormatCtx, &amp;packet) >= 0)) {
           // Want to write these frames to disk
           i++;
       }

       av_write_trailer(out_fmt_ctx);

       av_free(buffer);
       av_free(pFrameRGB);
       av_free(pFrame);

       avcodec_close(pCodecContext);
       avcodec_close(pCodecContextOrig);

       avformat_close_input(&amp;pFormatCtx);

       return 0;
    }

    I think a lot of stuff of this code can be removed. I’m trying to learn :).

    Linking against -lavutil -lavformat -lavcodec -lz -lavutil -lm -lswscale

  • Seek and cut mp4 http stream on the fly with mp4Parser java library

    27 septembre 2016, par xyman

    Is it possible to create new mp4 file(which will be just one small video segment of full length mp4 file) from mp4 http stream without downloading the whole mp4 file to disk and feeding it to mp4Parser. If any other stable java library exist which could do the sam job please point me to it.

    I know it can be done with ffmpeg as explained in this post but i want to avoid using full feature heavy library(cutting the mp4 file doesn’t involve transcoding the video, this operation just repacks the mp4 file) for just cutting the mp4 file.

    ffmpeg -ss 00:01:00.000 -i "http://myfile.mp4" -t 00:02:00.000 -c:a copy -c:v copy output.mp4

  • Raw extraction of frames from a movie

    29 septembre 2016, par vkubicki

    I would like to extract images from a grayscale mj2 movie. Each pixel is encoded using 16 bits. Since this is a technical movie, I need to extract the value at each pixel without processing, as those values linearly map to a physical quantity (a heatmap from an infrared camera). I am using Scala, and I do not find any suitable solution for a direct extraction (either in Scala or in Java, but I am a beginner). Therefore I intend to use ffmpeg to extract individual frames on the disk, then load them as BufferedImage in Scala and process them.

    Is this a good approach ? Which format should I use to avoid any transformation in the data ? I want each extracted frame to ba as "raw" as possible ? Is it possible to directly output a csv containing the aforementionned values ?