Recherche avancée

Médias (91)

Autres articles (72)

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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (9964)

  • The GStreamer custom plugin's _transform_frame_ip function is not working [closed]

    28 octobre 2024, par Amiya

    I have created a custom GStreamer plugin named brightness I checked it with the gst-inspect-1.0 and gst-launch-1.0 commands and am able to get video output. I used the following command :

    


    gst-launch-1.0 filesrc location=sample-15s.mp4 ! decodebin ! videoconvert ! video/x-raw,format=RGB ! brightness brightness=1.0 ! videoconvert ! vp8enc ! webmmux ! filesink location=capture1.webm


    


    Codebaselink : link

    


    In the codebase, I am setting all data to 0, so I expect a black video in the output file, capture1.webm. However, I'm getting the same video as the input. I also added a print statement after setting the data to 0, and it printed 0 as expected. I'm not sure why the output is not as expected.

    


    _transform_frame_ip function details :

    


    static GstFlowReturn gst_brightness_transform_frame_ip(GstVideoFilter *filter, GstVideoFrame *frame) {
    GstBrightness *brightness = GST_BRIGHTNESS(filter);
    guint8 *data = GST_VIDEO_FRAME_PLANE_DATA(frame, 0);
    gsize size = GST_VIDEO_FRAME_COMP_PSTRIDE(frame, 0) * GST_VIDEO_FRAME_HEIGHT(frame);

    printf("frame received:%f\n", brightness->brightness);
    for (gsize i = 0; i < size; i++) {
        gint pixel = data[i] + (gint)(brightness->brightness * 255.0);
        data[i] = 0; //CLAMP(pixel, 0, 255);
    }

    return GST_FLOW_OK;
}


    


    I am expecting black video in the output file.

    


  • FFmpeg insufficient thread locking only when deploying application using homebrew

    20 décembre 2012, par Kikohs

    I have the strangest bug of my life.
    I have installed ffmpeg using homebrew. I use it from a dll.
    I have set a lock manager because I use ffmpeg from multiple threads.

    In Engine.h :

    class EXPORT_LIB Engine
    {
    public:
       static int initEngine();    
       static int closeEngine();
    };

    In Engine.cpp :

    static int ff_lockmgr(void **mutex, enum AVLockOp op)
    {
    if (NULL == mutex)
       return -1;

    switch(op)
    {
    case AV_LOCK_CREATE:
    {
       *mutex = NULL;
       boost::mutex * m = new boost::mutex();
       *mutex = static_cast(m);
       break;
    }
    case AV_LOCK_OBTAIN:
    {
       boost::mutex * m =  static_cast(*mutex);
       m->lock();
       break;
    }
    case AV_LOCK_RELEASE:
    {
       boost::mutex * m = static_cast(*mutex);
       m->unlock();
       break;
    }
    case AV_LOCK_DESTROY:
    {
       boost::mutex * m = static_cast(*mutex);
       delete m;
       break;
    }
    default:
       break;
    }
    return 0;
    }


    int Engine::initEngine()
    {
       int res = -1;
       res = av_lockmgr_register(&ff_lockmgr);
       av_register_all();
       av_log_set_level(AV_LOG_QUIET); // ERROR, PANIC
       // Av lock manager success
       if( res == 0 ) {
           res = MULTITHREAD;
       }
       else {
           res = SINGLETHREAD;
       }
       return res;
    }

    int Engine::closeEngine()
    {
       int res = 0;
       res = av_lockmgr_register(NULL);
       return res;
    }

    So far so good, everything works as expected.

    When I deploy my app using CMake fix_bundle. I have an error message

    insufficient thread locking around avcodec_open/close()

    If I compile ffmpeg by hand in a custom location, when I deploy the app everything works as expected. What is wrong with homebrew ?

  • Inotifywait giving wrong file path after running ffmpeg

    23 mars 2019, par Morpheus

    So im running a little inotifywait script to monitor a folder for new files and transcode them if they are mxf and contain a video stream. But for some weird reason if the script does call ffmpeg the next fileevent by inotify is giving me a wrong path seemingly random cutting the filepath at any position.

    So far i tried moving the call to an external script, resetting the file variable which shouldnt matter anyway and adding a sleep to the script. I also tried using normal filepaths without whitespaces or - which shouldnt matter but that also didnt help.

    inotifywait -m -r -e close_write -e moved_to --format "%w%f"  "$dir" | while read f

    do
               if ffprobe "$file" 2>&1 | egrep 'Stream #0:0: Video' && ffprobe "$file" 2>&1 | egrep 'MXF' ; then
                   mkdir -vp "$movepath" && mkdir -vp "$trans$path3"  && mkdir -vp "$trans2$path3" && mv -fu "$f" "$trans2$path" && \
                   ffmpeg -y -i "$file" -map_metadata 0 -c:v h264_nvenc -b:v 2m -bufsize 2m -profile:v baseline -level:v 3.0 -pix_fmt yuv420p -vf yadif,scale="iw/4:ih/4" -an "$transpath" 2>> copy_ffmpeg_log.txt
    done

    expected :

    /media/raid/TMO_Media/INGEST-HP.1/WacinS1_19V01.5C935C93A3B4V.mxf

    example for an result after transcode :

    cinS1_19A06.5C935C93A088A.mxf

    do while normal mv commands work and inotify does work as expected when stopped for transcoding a file the next path given by inotify is getting messed up

    link to the entire script : https://pastebin.com/aRNG4rqz