Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (65)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (6676)

  • How can I create a side-by-side horizontally stacked video with a delay in video and audio using ffmpeg-python ?

    3 septembre 2021, par kup

    I am trying to create a video from two videos that will be stacked horizontally, but the resulting video is not what I expected. The same video is appearing on both sides (left and right). How can that be achieved ?

    


    The ffmpeg command I tried, which kind of worked :

    


    ffmpeg -i left.mp4 -i right.mp4 -filter_complex "
[0:v]setpts=PTS-STARTPTS[l];
[1:v]setpts=PTS-STARTPTS,tpad=start_duration=14:start_mode=add:color=black[r];
[l][r]hstack=inputs=2[stacked]; [0:a][1:a]amix=inputs=2[a]
" -map "[stacked]" -map "[a]" -c:a aac -preset superfast result.mp4


    


    The ffmpeg-python script that's not working :

    


    in0 = ffmpeg.input('0.mp4')
in1 = ffmpeg.input('right.mkv')
aout = ffmpeg.filter([in0.audio, in1.audio.filter('adelay', "5000|5000")],'amix')
vout = ffmpeg.filter([inv0.video, inv1.video.filter('tpad', start_duration=5, start_mode='add', color='black')], 'hstack')

(
    ffmpeg
    .concat(vout, aout, v=1, a=1)
    .output("out.mkv")
    .run()
)


    


    This script is not resulting in the expected output which is two videos side-by-side horizontally stacked.

    


  • Trying to save frames as colored image using Ffmpeg in C++

    2 septembre 2021, par Tolga

    I am new to FFmpeg and I am trying to save the video frames as colored images. I have achieved saving them as grayscale using Netpbm, however, I need to save the frames as colored. I have tried implementing the code in this link.

    


    However, I get an error :

    


    'Exception thrown at 0x00E1FC4F (swscale-5.dll) in VideoDecoding2.exe:
 0xC0000005: Access violation writing location 0xCCCCCCCC.'


    


    Is there any way to improve this code or another way to save frames as colored ?

    


    Here is my code below.

    


      

    • src_pix_fmt is AV_PIX_FMT_YUV420p.
    • 


    • dst_pix_fmt is AV_PIX_FMT_RGB24.
    • 


    


    src_pix_fmt = avcc->pix_fmt;

src_width = avcc->width;
src_height = avcc->height;

dst_width = src_width;
dst_height = src_height;

numBytes = av_image_get_buffer_size(dst_pix_fmt, dst_width, dst_height, 0);

buffer = (uint8_t*)av_malloc(numBytes);

if ((ret = av_image_alloc(src_data, src_linesize, src_width, src_height, src_pix_fmt, 16)) < 0)
{
    printf("Couldn't allocate source image.\n");
    return 0;
}

av_image_fill_arrays(frameRGB->data, frameRGB->linesize, buffer, dst_pix_fmt, dst_width, dst_height, 0);

while (av_read_frame(avfc, packet) >= 0)
{
    ret = avcodec_send_packet(avcc, packet);
    if (ret < 0)
    {
        printf("Packets could not supplied to decoder.\n");
        return -1;
    }

    ret = avcodec_receive_frame(avcc, frame);
    printf("%d", ret);

    if (packet->stream_index == videoStream)
    {
        sws_ctx = sws_getContext(src_width, src_height, src_pix_fmt,
            dst_width, dst_height, dst_pix_fmt,
            SWS_BILINEAR, NULL, NULL, NULL);

        if (!sws_ctx)
        {
            printf("Cannot create scale context for conversion\n"
                "fmt:%s s:%dx%d --> fmt:%s s:%dx%d\n",
                av_get_pix_fmt_name(src_pix_fmt), src_width, src_height,
                av_get_pix_fmt_name(dst_pix_fmt), dst_width, dst_height);
            return 0;
        }

        sws_scale(sws_ctx, (const uint8_t* const*)frame->data, frame->linesize, 0, frame->height, dst_data, dst_linesize);

        FILE* f;
        char szFilename[32];
        int y;

        snprintf(szFilename, sizeof(szFilename), "frame%d.ppm", avcc->frame_number);
        fopen_s(&f, szFilename, "wb");
        
        if (f == NULL)
        {
            printf("Couldn't open file.\n");
            return 0;
        }
        
        fprintf(f, "P6\n%d %d\n255\n", dst_width, dst_height);

        for (y = 0; y < dst_height; y++)
            fwrite(frameRGB->data[0] + y * frameRGB->linesize[0], 1, dst_width * 3, f);
        
        fclose(f);
    }
}


    


  • LibVLC : Is a filter like v360:fisheye from ffmpeg available in LibVLC ?

    8 septembre 2021, par Craab

    I'm having problem playing fisheye(180) videos panoramically on the fly
using LibVlcSharp in a WinForms appliction.

    


    More specifically : what I want to do is filtering video with libvlcsharp in a WinForms application(c#) with the same effect like

    


    -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=90


    


    from ffmpeg.

    


    FYI : this will not make the video tagged with equirectanglar projection, the v360=fisheye filter dewarps the video and the video stays rectanglar.

    


    The input video is like this :

    


    enter image description here

    


    And the the expected output should be like :

    


    output video

    


    This can be achieved by :

    


    ./ffmpeg -i input.mov  -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=90,crop=in_w:in_h/2:in_w:in_h/2 output.mov


    


    but I need to do this with LibVLC and on the fly.

    


    Can I achieve this with LibVLC's video filter ?

    


    Or I need to develop my own filter and make a wrapper for c# ?