Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (8)

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

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

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

Sur d’autres sites (2704)

  • Exception thrown at 0x00007FFC0B57BCEF (swscale-6.dll) in App.exe : 0xC0000005 : Access violation reading location 0xFFFFFFFFFFFFFFFF

    9 novembre 2023, par JIUN-YU

    Trying to play a video using FFmpeg on visual studio 2022 on windows 10.
Exception is thrown at sws_scale in the code. Don't know why this is occurred.
It is worth noting that this error sometimes occurs when reading the camera and sometimes it does not.

    


    here is my code

    


    bool CalibrationPanel::video_reader_read_frame(VReaderState* state, cv::Mat cvimg)
{
    // Unpack members of state
    auto& width = state->width;
    auto& height = state->height;
    auto& av_format_ctx = state->av_format_ctx;
    auto& av_codec_ctx = state->av_codec_ctx;
    auto& video_stream_index = state->video_stream_index;
    auto& av_frame = state->av_frame;
    auto& av_packet = state->av_packet;
    auto& sws_scaler_ctx = state->sws_scaler_ctx;


    // Decode one frame
    int response;
    while (av_read_frame(av_format_ctx, av_packet) >= 0)
    {
        if (av_packet->stream_index != video_stream_index)
        {
            av_packet_unref(av_packet);
            continue;
        }

        response = avcodec_send_packet(av_codec_ctx, av_packet);
        if (response < 0)
        {
            char errStr[256] = {0};
            av_strerror(response, errStr, sizeof(errStr));
            printf("Failed to decode packet: %s\n", errStr);
            return false;
        }

        response = avcodec_receive_frame(av_codec_ctx, av_frame);
        if (response == AVERROR(EAGAIN) || response == AVERROR_EOF)
        {
            av_packet_unref(av_packet);
            continue;
        }
        else if (response < 0)
        {
            char errStr[256] = {0};
            av_strerror(response, errStr, sizeof(errStr));
            printf("Failed to decode packet: %s\n", errStr);
            return false;
        }

        av_packet_unref(av_packet);
        break;
    }
    int64_t* pts = &ppts;
    *pts = av_frame->pts;

    // Set up sws scaler
    if (!sws_scaler_ctx)
    {
        sws_scaler_ctx = sws_getContext(width, height, av_codec_ctx->pix_fmt,
                                        width, height, AV_PIX_FMT_BGR24,
                                        SWS_BILINEAR, NULL, NULL, NULL);
        if (!sws_scaler_ctx)
        {
            printf("Couldn't initialize sw scaler\n");
            return false;
        }
    }


    // Creating an image space to hold YUV images
    AVFrame* frameYUV = av_frame_alloc();
    auto* out_buffer = (unsigned char*)av_malloc(av_image_get_buffer_size(AV_PIX_FMT_BGR24, width, height, 1));
    av_image_fill_arrays(frameYUV->data, frameYUV->linesize, (const uint8_t*)out_buffer, AV_PIX_FMT_BGR24, width, height, 1);

    uint8_t* dest[4] = {cvimg.data, NULL, NULL, NULL};
    sws_scale(sws_scaler_ctx, av_frame->data, av_frame->linesize, 0, av_frame->height, dest, frameYUV->linesize);

    return true;
}


    


    fixed this bug, so it's not luck that makes the camera turn on every time.

    


  • Latest FFmpeg fails to create a good MP4 out of JPG file (Windows 10)

    30 décembre 2023, par mengrie

    I am using FFmpeg to create an MP4 file out of several JPG files. The command to accomplish this

    


    ffmpeg.exe ^
-hide_banner -nostats -loglevel error -y ^
-loop 1 -t 6 -i 001.jpg ^
-loop 1 -t 6 -i 002.jpg ^
-loop 1 -t 6 -i 003.jpg ^
-loop 1 -t 6 -i 004.jpg ^
-loop 1 -t 6 -i 005.jpg ^
-loop 1 -t 6 -i 006.jpg ^
-filter_complex ^
"[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=out:st=5:d=1[v0]; ^
[1:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1[v1]; ^
[2:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1[v2]; ^
[3:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1[v3]; ^
[4:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1[v4]; ^
[5:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1[v5]; ^
[v0][v1][v2][v3][v4][v5]concat=n=6:v=1:a=0,format=yuv420p[v]" -map "[v]" -r 30 006.mp4


    


    Using "ffmpeg version 2022-12-25-git-eeb280f351-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.1.0 (Rev2, Built by MSYS2 project)" does the job as expected.

    


    However, yesterdag I downloaded (from gyan.dev - Windows - ffmpeg-git-full.7z) the latest version and upgrade the tool. "ffmpeg version 2023-12-28-git-c1340f3439-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.0 (Rev10, Built by MSYS2 project)"

    


    Using this version, the MP4 contains only a few JPGs and timing is also messed up, resulting in a useless MP4.

    


    Has something changed or are these parameters causing a new behaviour ?

    


    Thx

    


    In meanwhile I went back to older version

    


  • FFmpeg batchfile to compress images JPG JPEGs and keep EXIF (metadata)

    24 novembre 2023, par esdoublelef

    I tried searching everywhere for a possible solution but I really can't find it. Hope someone can help me out here.

    


    I have written a batch file to use FFmpeg to compress and sharpen JPGs in a folder.

    


    @ECHO ON
  FOR %%a in (*.jpg) DO (ffmpeg -i "%%a" -q:v 8 -vf unsharp=5:5:1.0:5:5:0.0 "2022 01 22 %%~na".jpg)
PAUSE


    


    The new file comes out smaller in size, but is missing all the EXIF information that the original photo has.

    


    I tried to add in the command -metadata but apparently it works for MP4 only. I have an existing solution with ImageMagick but I'm hoping to solve this via FFmpeg.

    


    Or is there a way to integrate exiftool into the batch file ?

    


    Thank you and I really appreciate any help here.