Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (51)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (8270)

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

    


  • 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

    


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