Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (72)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (12557)

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

  • Timeline Display Issue When Merging Multi-Track MP4 Files with FFmpeg

    9 juillet 2024, par EasonWaii

    I need to merge two videos into one using ffmpeg. The resulting video should have two video tracks and one audio track, with the audio track taken from the longer video.

    &#xA;

    When playing the merged video in a player like PotPlayer or VLC, it should default to playing the shorter video track. However, users should be able to switch to the other video track if they want.

    &#xA;

    The problem I am facing :&#xA;Everything is working fine, except when the player defaults to the shorter video track, it shows the timeline of the longer video track.

    &#xA;

     built with Apple clang version 15.0.0 (clang-1500.3.9.4)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;{&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;output21.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf59.16.100&#xA;  Duration: 00:00:12.84, start: 0.000000, bitrate: 2207 kb/s&#xA;  Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 720x1280 [SAR 1:1 DAR 9:16], 1052 kb/s, 30 fps, 30 tbr, 15360 tbn&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 720x1280, 1293 kb/s, 29.83 fps, 29.83 tbr, 11456 tbn (default)&#xA;      Metadata:&#xA;        handler_name    : ?Mainconcept Video Media Handler&#xA;        vendor_id       : [0][0][0][0]&#xA;  Stream #0:2[0x3](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 130 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;    "streams": [&#xA;        {&#xA;            "index": 0,&#xA;            "codec_name": "hevc",&#xA;            "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)",&#xA;            "profile": "Main",&#xA;            "codec_type": "video",&#xA;            "codec_tag_string": "hev1",&#xA;            "codec_tag": "0x31766568",&#xA;            "width": 720,&#xA;            "height": 1280,&#xA;            "coded_width": 720,&#xA;            "coded_height": 1280,&#xA;            "closed_captions": 0,&#xA;            "film_grain": 0,&#xA;            "has_b_frames": 2,&#xA;            "sample_aspect_ratio": "1:1",&#xA;            "display_aspect_ratio": "9:16",&#xA;            "pix_fmt": "yuv420p",&#xA;            "level": 93,&#xA;            "color_range": "tv",&#xA;            "chroma_location": "left",&#xA;            "field_order": "progressive",&#xA;            "refs": 1,&#xA;            "id": "0x1",&#xA;            "r_frame_rate": "30/1",&#xA;            "avg_frame_rate": "30/1",&#xA;            "time_base": "1/15360",&#xA;            "start_pts": 0,&#xA;            "start_time": "0.000000",&#xA;            "duration_ts": 196096,&#xA;            "duration": "12.766667",&#xA;            "bit_rate": "1052926",&#xA;            "nb_frames": "383",&#xA;            "extradata_size": 2480,&#xA;            "disposition": {&#xA;                "default": 0,&#xA;                "dub": 0,&#xA;                "original": 0,&#xA;                "comment": 0,&#xA;                "lyrics": 0,&#xA;                "karaoke": 0,&#xA;                "forced": 0,&#xA;                "hearing_impaired": 0,&#xA;                "visual_impaired": 0,&#xA;                "clean_effects": 0,&#xA;                "attached_pic": 0,&#xA;                "timed_thumbnails": 0,&#xA;                "non_diegetic": 0,&#xA;                "captions": 0,&#xA;                "descriptions": 0,&#xA;                "metadata": 0,&#xA;                "dependent": 0,&#xA;                "still_image": 0&#xA;            },&#xA;            "tags": {&#xA;                "language": "und",&#xA;                "handler_name": "VideoHandler",&#xA;                "vendor_id": "[0][0][0][0]"&#xA;            }&#xA;        },&#xA;        {&#xA;            "index": 1,&#xA;            "codec_name": "h264",&#xA;            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",&#xA;            "profile": "High",&#xA;            "codec_type": "video",&#xA;            "codec_tag_string": "avc1",&#xA;            "codec_tag": "0x31637661",&#xA;            "width": 720,&#xA;            "height": 1280,&#xA;            "coded_width": 720,&#xA;            "coded_height": 1280,&#xA;            "closed_captions": 0,&#xA;            "film_grain": 0,&#xA;            "has_b_frames": 2,&#xA;            "pix_fmt": "yuv420p",&#xA;            "level": 31,&#xA;            "color_range": "tv",&#xA;            "color_space": "bt709",&#xA;            "color_transfer": "bt709",&#xA;            "color_primaries": "bt709",&#xA;            "chroma_location": "left",&#xA;            "field_order": "progressive",&#xA;            "refs": 1,&#xA;            "is_avc": "true",&#xA;            "nal_length_size": "4",&#xA;            "id": "0x2",&#xA;            "r_frame_rate": "179/6",&#xA;            "avg_frame_rate": "3448256/115597",&#xA;            "time_base": "1/11456",&#xA;            "start_pts": 0,&#xA;            "start_time": "0.000000",&#xA;            "duration_ts": 115597,&#xA;            "duration": "10.090520",&#xA;            "bit_rate": "1293284",&#xA;            "bits_per_raw_sample": "8",&#xA;            "nb_frames": "301",&#xA;            "extradata_size": 46,&#xA;            "disposition": {&#xA;                "default": 1,&#xA;                "dub": 0,&#xA;                "original": 0,&#xA;                "comment": 0,&#xA;                "lyrics": 0,&#xA;                "karaoke": 0,&#xA;                "forced": 0,&#xA;                "hearing_impaired": 0,&#xA;                "visual_impaired": 0,&#xA;                "clean_effects": 0,&#xA;                "attached_pic": 0,&#xA;                "timed_thumbnails": 0,&#xA;                "non_diegetic": 0,&#xA;                "captions": 0,&#xA;                "descriptions": 0,&#xA;                "metadata": 0,&#xA;                "dependent": 0,&#xA;                "still_image": 0&#xA;            },&#xA;            "tags": {&#xA;                "language": "eng",&#xA;                "handler_name": "\u001fMainconcept Video Media Handler",&#xA;                "vendor_id": "[0][0][0][0]"&#xA;            }&#xA;        },&#xA;        {&#xA;            "index": 2,&#xA;            "codec_name": "aac",&#xA;            "codec_long_name": "AAC (Advanced Audio Coding)",&#xA;            "profile": "LC",&#xA;            "codec_type": "audio",&#xA;            "codec_tag_string": "mp4a",&#xA;            "codec_tag": "0x6134706d",&#xA;            "sample_fmt": "fltp",&#xA;            "sample_rate": "44100",&#xA;            "channels": 2,&#xA;            "channel_layout": "stereo",&#xA;            "bits_per_sample": 0,&#xA;            "initial_padding": 0,&#xA;            "id": "0x3",&#xA;            "r_frame_rate": "0/0",&#xA;            "avg_frame_rate": "0/0",&#xA;            "time_base": "1/44100",&#xA;            "start_pts": 0,&#xA;            "start_time": "0.000000",&#xA;            "duration_ts": 566244,&#xA;            "duration": "12.840000",&#xA;            "bit_rate": "130447",&#xA;            "nb_frames": "554",&#xA;            "extradata_size": 5,&#xA;            "disposition": {&#xA;                "default": 1,&#xA;                "dub": 0,&#xA;                "original": 0,&#xA;                "comment": 0,&#xA;                "lyrics": 0,&#xA;                "karaoke": 0,&#xA;                "forced": 0,&#xA;                "hearing_impaired": 0,&#xA;                "visual_impaired": 0,&#xA;                "clean_effects": 0,&#xA;                "attached_pic": 0,&#xA;                "timed_thumbnails": 0,&#xA;                "non_diegetic": 0,&#xA;                "captions": 0,&#xA;                "descriptions": 0,&#xA;                "metadata": 0,&#xA;                "dependent": 0,&#xA;                "still_image": 0&#xA;            },&#xA;            "tags": {&#xA;                "language": "und",&#xA;                "handler_name": "SoundHandler",&#xA;                "vendor_id": "[0][0][0][0]"&#xA;            }&#xA;        }&#xA;    ],&#xA;    "format": {&#xA;        "filename": "output21.mp4",&#xA;        "nb_streams": 3,&#xA;        "nb_programs": 0,&#xA;        "nb_stream_groups": 0,&#xA;        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",&#xA;        "format_long_name": "QuickTime / MOV",&#xA;        "start_time": "0.000000",&#xA;        "duration": "12.840000",&#xA;        "size": "3543155",&#xA;        "bit_rate": "2207573",&#xA;        "probe_score": 100,&#xA;        "tags": {&#xA;            "major_brand": "isom",&#xA;            "minor_version": "512",&#xA;            "compatible_brands": "isomiso2avc1mp41",&#xA;            "encoder": "Lavf59.16.100"&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;

    &#xA;

    I want the timeline to display correctly according to the shorter video track when it is being played, without truncating the timeline of the longer video track and affecting its playback.

    &#xA;

  • 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;