Recherche avancée

Médias (91)

Autres articles (23)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (5619)

  • MoviePy does not save anything anywhere. But also no error

    27 mai 2023, par Paul Spieker

    I tried running simple moviepy code. It does not save anything. Exit code 0. No error message. No sucessfully saved print. I have the newest version of moviepy and ffmpeg. Doesnt work with or without specifying an output directory. I am on windows 10, working in PyCharm with Python 3.9 . I am super new to coding if it isnt obvious, thankful for any help !! Here is the code I used :

    


    from moviepy.editor import VideoClip
from moviepy.video.io.ffmpeg_writer import FFMPEG_VideoWriter




    w, h = 640, 480
    red = int(255 * t)
    green = int(255 * (1 - t))
    blue = 0
    frame = np.zeros((h, w, 3), dtype=np.uint8)
    frame[:, :, 0] = red
    frame[:, :, 1] = green
    frame[:, :, 2] = blue
    return frame


duration = 5  # in seconds
fps = 30
width, height = 640, 480
video_clip = VideoClip(make_frame, duration=duration)


output_path = "output.mp4"


video_clip.write_videofile(output_path, fps=fps, codec='libx264')

print("File saved successfully!")


    


    I was expecting to get any file saved at all. Nothing shows up in my folder. I have double checked MoviePy and ffmpeg as stated.

    


  • Install FFmpeg on OS X 10.8 [closed]

    22 octobre 2012, par Shuyinsama

    Is there a good place or bash script I can use (or at least a version I can build myself) for FFmpeg on OS X Mountain Lion (10.8) ?

    I have Xcode installed as well as the CLI for Xcode (gcc etc).

    I have a version of FFmpeg currently installed, but somehow I get a segmentation error on libx264 as well as the libvpx (I can't convert to MP4 and WebM).

    All I want to do is batch convert video files to HTML5 compatible videos. All my source videos consist of .mov .mp4 and .wmv files. .ogv works fine by the way.

    So the real question :

    1. How to uninstall everything of FFmpeg on my Mac now
    2. Reinstall a FFmpeg version that can convert to .mp4, .webm, and .ogv

    I also tried the precompiled version of Miro video converter but somehow that doesn't work either.

  • Convert a YUVJ422 and YUVJ420 frame into YV12 in C++ with FFmpeg

    22 janvier 2024, par Can

    I am currently writing a program, to convert YUVJ422 and YUVJ420 frames into YV12. The YV12 frame is then uploaded to the GPU and there converted into RGB again, but that part should work fine (more on that later).

    


    1080p and 720p are working very good and performant (no delays or anything) already with my program, but 540p has a weird artifact in the bottom of the frame (8 pixels are green ish, but also kind of transparent, so copying the information about the brightness worked but the U and/or ? V plane seem to be missing something at the end.

    


    My thoughts are, that maybe because 540 is not even when dividing with 8, the copy operation misses somehting ? Also could be some padding that is not considered ? So I tried to hard-code the height to 544, before decoding and providing a height of 544 to the FFmpeg decoder, but that didn't work either and resulted in a similar output.

    


    Another reason for the green line could be, that the shader does not take any padding into account, the height provided into the shader is 540, but I am not quite sure, if the shader is the problem, as it works for the other formats and a green line seems to indicate more, that not enough data was copied, as green lines usually mean zeroed memory, as a zero would translate to green in YUV.

    


    I am now out of ideas, why the code fails for 540p formats, so I hope that someone already had this issue before maybe and provide some clarification, here is my code to convert the pixel data, keep in mind that the code is not fully optimized yet and I already planned to write shaders to convert from the YUVJ420 and YUVJ422 formats directly into RGBA as that would be much faster, but for now I have to take this "workaround" to convert the data first to YV12 for other reasons.

    


            if (mCurrentFrame->format == AV_PIX_FMT_YUVJ420P)
        {
            if (540 == mCurrentFrame->height)
            {
                int uvHeight = mCurrentFrame->height / 2;
                int offset   = 0;

                // Copy Y plane
                for (int y = 0; y < mCurrentFrame->height; ++y)
                {
                    memcpy(decodedFrame->GetData() + offset, mCurrentFrame->data[0] + mCurrentFrame->linesize[0] * y, mCurrentFrame->width);
                    offset += mCurrentFrame->width;
                }

                // Copy V plane
                for (int v = 0; v < uvHeight; ++v)
                {
                    memcpy(decodedFrame->GetData() + offset, mCurrentFrame->data[2] + mCurrentFrame->linesize[2] * v, mCurrentFrame->width / 2);
                    offset += mCurrentFrame->width / 2;
                }

                // Copy U plane
                for (int u = 0; u < uvHeight; ++u)
                {
                    memcpy(decodedFrame->GetData() + offset, mCurrentFrame->data[1] + mCurrentFrame->linesize[1] * u, mCurrentFrame->width / 2);
                    offset += mCurrentFrame->width / 2;
                }
            }
            else
            {
                int ySize  = mCurrentFrame->width * mCurrentFrame->height;
                int uvSize = (mCurrentFrame->width / 2) * (mCurrentFrame->height / 2);

                // Copy Y plane
                memcpy(decodedFrame->GetData(), mCurrentFrame->data[0], ySize);

                // Copy V plane
                memcpy(decodedFrame->GetData() + ySize, mCurrentFrame->data[2], uvSize);

                // Copy U plane
                memcpy(decodedFrame->GetData() + ySize + uvSize, mCurrentFrame->data[1], uvSize);
            }
        }
        else if (mCurrentFrame->format == AV_PIX_FMT_YUVJ422P)
        {
            int offset = 0;

            if (540 == mCurrentFrame->height)
            {
                // Copy Y plane, but linewise
                for (int y = 0; y < mCurrentFrame->height; ++y)
                {
                    memcpy(decodedFrame->GetData() + offset, mCurrentFrame->data[0] + mCurrentFrame->linesize[0] * y, mCurrentFrame->width);
                    offset += mCurrentFrame->width;
                }
            }
            else
            {
                int ySize = mCurrentFrame->width * mCurrentFrame->height;
                offset    = ySize;

                // Copy Y plane
                memcpy(decodedFrame->GetData(), mCurrentFrame->data[0], ySize);
            }

            // Copy V plane, but linewise
            for (int v = 0; v < mCurrentFrame->height; v += 2)
            {
                memcpy(decodedFrame->GetData() + offset, mCurrentFrame->data[2] + mCurrentFrame->linesize[2] * v, mCurrentFrame->width / 2);
                offset += mCurrentFrame->width / 2;
            }

            // Copy U plane, but linewise
            for (int u = 0; u < mCurrentFrame->height; u += 2)
            {
                memcpy(decodedFrame->GetData() + offset, mCurrentFrame->data[1] + mCurrentFrame->linesize[1] * u, mCurrentFrame->width / 2);
                offset += mCurrentFrame->width / 2;
            }
        }


    


    mCurrentFrame is the normal AVFrame structure from FFmpeg.

    


    I still think it might be a padding issue, but any help would be much appreciated !