Recherche avancée

Médias (91)

Autres articles (47)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (5202)

  • FFmpeg avutil.lib unresolved external symbol

    2 août 2022, par Sere

    i'm trying to use FFmpeg with visual sudio 2022 .NET 6 through an MSVC project.
I followed this tutorial : https://www.youtube.com/watch?v=qMNr1Su-nR8&ab_channel=HakanSoyalp.
I mean I have configureg Include (.h) file, library (.lib) files and dynamic (.dll) file copied into bin folder.
If I call for example the avformat_alloc_context() method inside the avformat.lib all work rightly, if I call for example av_file_map(...) inside the avutil.lib the compiler give me an error :
LNK2019 unresolved external symbol "int __cdecl av_file_map ...
But the avutil.lib is linked !!!
The same happen if I call other methods inside avutil.lib module.

    


    Thanks for help...

    


    Code :

    


    extern "C"&#xA;{&#xA;    #include <libavformat></libavformat>avformat.h>&#xA;    #include <libavutil></libavutil>file.h> // av_file_map&#xA;}&#xA;&#xA;int ConvertJPEGtoNALs(int argc, char* argv[])&#xA;{&#xA;    AVFormatContext* fmt_ctx = NULL;&#xA;    AVIOContext* avio_ctx = NULL;&#xA;    uint8_t* buffer = NULL, * avio_ctx_buffer = NULL;&#xA;    size_t buffer_size, avio_ctx_buffer_size = 4096;&#xA;    char* input_filename = NULL;&#xA;    int ret = 0;&#xA;    struct buffer_data bd = { 0 };&#xA;    if (argc != 2) {&#xA;        fprintf(stderr, "usage: %s input_file\n"&#xA;            "API example program to show how to read from a custom buffer "&#xA;            "accessed through AVIOContext.\n", argv[0]);&#xA;        return 1;&#xA;    }&#xA;    input_filename = argv[1];&#xA;    /* register codecs and formats and other lavf/lavc components*/&#xA;    //av_register_all();    //!deprecated&#xA;    /* slurp file content into buffer */&#xA;    ret = av_file_map(input_filename, &amp;buffer, &amp;buffer_size, 0, NULL);&#xA;    /* fill opaque structure used by the AVIOContext read callback */&#xA;    bd.ptr = buffer;&#xA;    bd.size = buffer_size; ???&#xA;    if (!(fmt_ctx = avformat_alloc_context())) {&#xA;        ret = AVERROR(ENOMEM);&#xA;        goto end;&#xA;    }&#xA;    //... to be continue ...&#xA;}&#xA;

    &#xA;

  • OpenCV Python, reading video from named-pipe

    29 février 2020, par BlueNut

    I am trying to achieve results as shown on the video (Method 3 using netcat) https://www.youtube.com/watch?v=sYGdge3T30o
    It is to stream video from raspberry pi to PC and process it using openCV and python.

    I use command

    raspivid -vf -n -w 640 -h 480 -o - -t 0 -b 2000000 | nc 192.168.1.137 8000

    to stream the video to my PC and then on the PC I created name pipe ’fifo’ and redirected the output

    nc -l -p 8000 -v > fifo

    then i am trying to read the pipe and display the result in the python script

    import cv2
    import subprocess as sp
    import numpy

    FFMPEG_BIN = "ffmpeg.exe"
    command = [ FFMPEG_BIN,
           '-i', 'fifo',             # fifo is the named pipe
           '-pix_fmt', 'bgr24',      # opencv requires bgr24 pixel format.
           '-vcodec', 'rawvideo',
           '-an','-sn',              # we want to disable audio processing (there is no audio)
           '-f', 'image2pipe', '-']    
    pipe = sp.Popen(command, stdout = sp.PIPE, bufsize=10**8)

    while True:
       # Capture frame-by-frame
       raw_image = pipe.stdout.read(640*480*3)
       # transform the byte read into a numpy array
       image =  numpy.frombuffer(raw_image, dtype='uint8')
       image = image.reshape((480,640,3))          # Notice how height is specified first and then width
       if image is not None:
           cv2.imshow('Video', image)

       if cv2.waitKey(1) &amp; 0xFF == ord('q'):
           break
       pipe.stdout.flush()

    cv2.destroyAllWindows()

    But I got this error :

    Traceback (most recent call last):
     File "C:\Users\Nick\Desktop\python video stream\stream.py", line 19, in <module>
       image = image.reshape((480,640,3))          # Notice how height is specified first and then width
    ValueError: cannot reshape array of size 0 into shape (480,640,3)
    </module>

    It seems that the numpy array is empty, so any ideas to fix this ?

  • FFMPEG - Concat 3 videos with one of the videos becoming a picture in picture overlay

    7 décembre 2022, par John

    I have been getting to grips with FFMPEG for the last few days...so please excuse my lack of knowledge. It's very much early days.

    &#xA;

    I need to join 3 video elements together with one of the videos becoming an overlay at a specific time.

    &#xA;

    intro.mp4

    &#xA;

    mainvideo.mp4

    &#xA;

    endboard.mp4

    &#xA;

    I need the intro.mp4 to bolt on to the front of the mainvideo.mp4 and then ideally with 20 seconds to go before the end of the mainvideo.mp4, I need the endboard.mp4 video to be bolted on to the sequence and take over the frame. When this happens, I then need the mainvideo.mp4 to be overlayed in the top left corner and continue playing seamlessly through the transition.

    &#xA;

    I also need the audio from the main video to play until the end of the video.

    &#xA;

    I currently achieve this but putting all of the video elements into Premiere and exporting them out but I know this process can be much quicker with FFMPEG. For reference, here is an example of how it looks. If you skip to the end of the video below (just after 45 mins into the video) as the credits are rolling you will see the main video transition to the picture in picture overlay, and the endboard video take over the main frame.

    &#xA;

    https://www.youtube.com/watch?v=RtgIvWxZUwM&t=2723s

    &#xA;

    There will be lots of mainvideo.mp4 files that this will be applied to individually, and the lengths of these videos will always be different. I am hoping that there is a way to have the transition to the endboard.mp4 happen relative to 20secs before the end of the files. If not I guess I would have to manually input the time I want this change over transition to happen.

    &#xA;

    I roughly understand in theory what needs to be done, but being so new to this world I am really unsure of how something this complicated would be pieced together.

    &#xA;

    If there is anyone out there that can help me , it would be greatly appreciated !

    &#xA;

    I have got my head around the process of merging videos together with a simple concat command and I can see that overlaying a video in the top left corner of the frame is also possible...but my brain cannot figure out the sequence of events that needs to happen to bolt the intro video on to the main video....and then have the main video transition into the picture in picture overlay video at a specific time, while also bolting on the endboard video for the main video to overlay onto.

    &#xA;

    Any help for a complete newb would be so unbelievably appreciated !

    &#xA;