Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (54)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (10428)

  • Undefined references to swscale functions

    22 novembre 2015, par rightaway717

    My app fails to link to swscale library at all. I mean that any swscale method I’m trying to use in my code becomes an undefined reference.
    I know what this error means - a linker couldn’t find any definition of used functions.

    But the problem is that I made sure that :

    1. -L/usr/local/Cellar/ffmpeg/2.8.2/lib -lswscale is in linker output, and the linker actually finds the lib, otherwise it would complain about missing swscale
    2. The library is really there :

      $ll /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale*

    output :

    -r--r--r--  1 myuser  admin   519K Nov 20 19:33 /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.3.1.101.dylib
    lrwxr-xr-x  1 myuser  admin    24B Nov 20 19:32 /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.3.dylib -> libswscale.3.1.101.dylib
    -r--r--r--  1 myuser  admin   607K Nov 20 19:32 /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.a
    lrwxr-xr-x  1 myuser  admin    24B Nov 20 19:32 /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.dylib -> libswscale.3.1.101.dylib
    1. The library is of the correct architecture :

      $lipo -info /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.3.dylib

    output :

    Non-fat file: /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.3.dylib is architecture: x86_64

    My machine architecture :

    $uname -m

    output :

    x86_64
    1. The symbols exist in the binary, for example :

      $nm /usr/local/Cellar/ffmpeg/2.8.2/lib/libswscale.3.1.101.dylib | grep sws_alloc_context

    output :

    000000000004e3b4 T _sws_alloc_context
    1. I also tried a couple of different swscale binaries, not only the "brew" ones, but nothing changed. I also tried to do the same on my Ubuntu laptop, but it is still the same.

    This is actually a QT app I’m trying to build. I should mention, that I don’t have issues with linking other libraries the same way.
    I also compiled successfully swscale-test.c (which is in libwscale sources) using :

    clang swscale-test.c -lswscale -lavutil

    Do you have any ideas what is wrong or what else can I try to find out the reason ?

  • Copy C++ FFmpeg AVFrame to C# WritableBitmap

    2 janvier 2023, par Spuriga

    I have a C++ function definition with ffmpeg scaler The last two parameter is my question (buffer and stride) :

    


    int scale_decoded_video_frame(void* handle, void* scalerHandle, void* scaledBuffer, int scaledBufferStride) 

sws_scale(
    scalerContext->sws_context,
    srcData,
    context->frame->linesize,
    0, 
    scalerContext->source_height,
    reinterpret_cast(&scaledBuffer),
    &scaledBufferStride);


    


    When I declared it in C# I use the following code :

    


    [DllImport(LibraryName, EntryPoint = "scale_decoded_video_frame", CallingConvention = CallingConvention.Cdecl)]
public static extern int ScaleDecodedVideoFrame(IntPtr handle, IntPtr scalerHandle, IntPtr scaledBuffer, int scaledBufferStride);


    


    And the C# call :

    


    WriteableBitmap w = new WriteableBitmap(1920, 1080, 96, 96, PixelFormats.Pbgra32, null);
RenderOptions.SetBitmapScalingMode(w, BitmapScalingMode.NearestNeighbor);
w.Lock();

Int32Rect rect = new Int32Rect(0, 0, 1920, 1080);

resultCode = FFmpegVideoPInvoke.ScaleDecodedVideoFrame(decoderPtr, scalerHandle, w.BackBuffer, w.BackBufferStride);
if (resultCode == 0)
   w.AddDirtyRect(rect);

w.Unlock();


    


    It works perfect, but I want to skip the scale function and only want to get the decoded image to the WritableBitmap buffer. I try to use this code, change the sws_scale function to memcpy, but it shows nothing. The context->frame is AVFrame*.

    


    memcpy(scaledBuffer, context->frame->data, AV_NUM_DATA_POINTERS * sizeof(uint8_t));
memcpy(&scaledBufferStride, context->frame->linesize, AV_NUM_DATA_POINTERS * sizeof(int));


    


    How can I copy the AVFrame buffer to the WritableBitmap buffer ?

    


  • Why are Cb and Cr planes displaced differently from lum by the displace complex filter in ffmpeg ?

    10 janvier 2024, par Neb

    I have a video encoded with the yuv420p pixel format and I want to displace its pixels. I'm using ffmpeg and its new displace filter. The filter takes as inputs (the video to be displaced and) two displacement maps respectively for X and Y axis. I decided to create the displacement maps directly into ffmpeg using the nullsrc video source filter and the geq filter to specify the value of the three planes : lum, Cb, Cr. The script is the following :

    



    ffmpeg INPUT.mp4 -f lavfi -i nullsrc=size=${WIDTH}x${HEIGHT}:d=0.1,geq='lum=128+30*sin(2*PI*X/400):Cb=128+30*sin(2*PI*X/400):Cr='128+30*sin(2*PI*X/400)' -f lavfi -i nullsrc=size=${WIDTH}x${HEIGHT}:d=0.1,geq='lum=128+30*sin(2*PI*X/400):Cb=128+30*sin(2*PI*X/400):Cr=128+30*sin(2*PI*X/400)' -lavfi '[0][1][2]displace' OUTPUT.mp4


    



    I used the example provided in the documentation of ffmpeg, since the expression used in geq is irrelevant for the purposes of the problem.

    



    At the and of the computation, I get the pixels of the input video not properly displaced, meaning that I can clearly see a sort of ghost carrying-color-information video under a displaced but b/w one.
After some tests, I noticed that the displacemnt map created had only the luma plane displaced correctly while the chrominance planes were displaced, but differently from luma, which is the origin of the planes disalignment in the intput video as you can see in the following extract frames :

    



    enter image description here

    



    I also noticed that the video describing the Cb and Cr planes of the displacement maps have half resolution of the luma plane.

    



    My question is : how can i setup correctly the Cr and Cb planes in the geq definition so that they are exactly identical to the luma plane ?

    



    It would be also great if someone could explain me why ffmpeg gives me an output so much different for luma and Cb, Cr planes even if the function provided is the same.

    



    If, it can help, i'm using ffmpeg 3.3-static build.

    



    Thanks for your time.