Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (85)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

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

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (10614)

  • FFMPEG Can't Display The Duration Of a Video

    27 juillet 2015, par Malkavian

    I’m trying to use ffmpeg to capture frames from a video file, but I can’t even get the duration of a video. everytime when I try to access it with pFormatCtx->duration I’m getting 0. I know the pointer initialized and contains the correct duration because if I use av_dump_format(pFormatCtx, 0, videoName, 0); then I actually get the duration data along with other information about the video.
    This is what I get when I use av_dump_format(pFormatCtx, 0, videoName, 0); :

    Input #0, avi, from ’futurama.avi’ :

    Duration : 00:21:36.28, start : 0.000000, bitrate : 1135 kb/s

    Stream #0.0 : Video : mpeg4 (Advanced Simple Profile), yuv420p, 512x384

    [PAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc

    Stream #0.1 : Audio : ac3, 48000 Hz, stereo, s16, 192 kb/s

    I don’t understand why av_dum_format can display duration and I can’t. I checked the function definition, to display the duration, the function also uses pFormatCtx->duration. It’s not just the duration other member variables also don’t display the proper data when I call them in main.cpp

    Here’s my main.cpp :

    extern "C" {
       #include<libavcodec></libavcodec>avcodec.h>
       #include<libavformat></libavformat>avformat.h>
       #include<libswscale></libswscale>swscale.h>
    }


    int main(int argc, char *argv[]) {
       AVFormatContext *pFormatCtx = NULL;

       const char videoName[] = "futurama.avi";

       // Register all formats and codecs.
       av_register_all();
       cout &lt;&lt; "Opening the video file";
       // Open video file
       int ret = avformat_open_input(&amp;pFormatCtx, videoName, NULL, NULL) != 0;
       if (ret != 0) {
           cout &lt;&lt; "Couldn't open the video file." &lt;&lt; ret ;
           return -1;
       }
       if(avformat_find_stream_info(pFormatCtx, 0) &lt; 0) {
           cout &lt;&lt; "problem with stream info";
           return -1;
       }

       av_dump_format(pFormatCtx, 0, videoName, 0);
       cout &lt;&lt; pFormatCtx->bit_rate &lt;&lt; endl; // different value each time, not initialized properly.
       cout &lt;&lt; pFormatCtx->duration &lt;&lt; endl; // 0
       return 0;
    }

    I don’t know if it helps but, I use QtCreator on Ubuntu and linked the libraries statically.

    Thank you for your help.

  • FFMPEG Can't Display The Duration Of a Video

    30 août 2021, par Malkavian

    I'm trying to use ffmpeg to capture frames from a video file, but I can't even get the duration of a video. everytime when I try to access it with pFormatCtx->duration I'm getting 0. I know the pointer initialized and contains the correct duration because if I use av_dump_format(pFormatCtx, 0, videoName, 0); then I actually get the duration data along with other information about the video.&#xA;This is what I get when I use av_dump_format(pFormatCtx, 0, videoName, 0); :

    &#xA;

    Input #0, avi, from &#x27;futurama.avi&#x27;:&#xA;Duration: 00:21:36.28, start: 0.000000, bitrate: 1135 kb/s&#xA;Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 512x384&#xA;[PAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc&#xA;Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s &#xA;

    &#xA;

    I don't understand why av_dump_format can display duration and I can't. I checked the function definition, to display the duration, the function also uses pFormatCtx->duration. It's not just the duration other member variables also don't display the proper data when I call them in main.cpp

    &#xA;

    Here's my code :

    &#xA;

    extern "C" {&#xA;    #include<libavcodec></libavcodec>avcodec.h>&#xA;    #include<libavformat></libavformat>avformat.h>&#xA;    #include<libswscale></libswscale>swscale.h>&#xA;}&#xA;&#xA;int main(int argc, char *argv[]) {&#xA;    AVFormatContext *pFormatCtx = NULL;&#xA;&#xA;    const char videoName[] = "futurama.avi";&#xA;&#xA;    // Register all formats and codecs.&#xA;    av_register_all();&#xA;    cout &lt;&lt; "Opening the video file";&#xA;    // Open video file&#xA;    int ret = avformat_open_input(&amp;pFormatCtx, videoName, NULL, NULL) != 0;&#xA;    if (ret != 0) {&#xA;        cout &lt;&lt; "Couldn&#x27;t open the video file." &lt;&lt; ret ;&#xA;        return -1;&#xA;    }&#xA;    if(avformat_find_stream_info(pFormatCtx, 0) &lt; 0) {&#xA;        cout &lt;&lt; "problem with stream info";&#xA;        return -1;&#xA;    }&#xA;&#xA;    av_dump_format(pFormatCtx, 0, videoName, 0);&#xA;    cout &lt;&lt; pFormatCtx->bit_rate &lt;&lt; endl; // different value each time, not initialized properly.&#xA;    cout &lt;&lt; pFormatCtx->duration &lt;&lt; endl; // 0&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    I don't know if it helps but, I use QtCreator on Ubuntu and linked the libraries statically.

    &#xA;

  • lavf : Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink

    17 novembre 2014, par Martin Storsjö
    lavf : Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink
    

    This makes sure that the internal utf8 path names are handled
    properly - the normal file handling functions assume path names
    are in the native codepage, which isn’t utf8.

    This assumes that the tools outside of lavf don’t use the mkdir
    definition. (The tools don’t do the same reading of command line
    parameters as wchar either - they probably won’t handle all possible
    unicode file parameters properly, but at least work more predictably
    if no utf8/wchar conversion is involved.)

    This is moved further down in os_support.h, since windows.h shouldn’t
    be included before winsock2.h, while io.h needs to be included before
    the manual defines for lseek functions.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavformat/internal.h
    • [DH] libavformat/os_support.h