Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (84)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5210)

  • How does ffprobe determine duration ?

    26 octobre 2015, par jasongullickson

    I’m using ffprobe to analyze media files stored on a remote server. This seems to work well, but for some files the duration is missing or incorrect (usually longer than it should be). Other times it returns this information accurately, and it doesn’t seem to be related to the media type (codec, etc.).

    Here’s an example of a command that works :

    ffprobe -v quiet -print_format json -show_streams -show_format http://host.com/file.aiff

    {
    "streams": [
       {
           "index": 0,
           "codec_name": "pcm_s16be",
           "codec_long_name": "PCM signed 16-bit big-endian",
           "codec_type": "audio",
           "codec_time_base": "1/44100",
           "codec_tag_string": "[0][0][0][0]",
           "codec_tag": "0x0000",
           "sample_fmt": "s16",
           "sample_rate": "44100",
           "channels": 2,
           "bits_per_sample": 16,
           "r_frame_rate": "0/0",
           "avg_frame_rate": "0/0",
           "time_base": "1/44100",
           "start_pts": 0,
           "start_time": "0.000000",
           "duration_ts": 8494248,
           "duration": "192.613333",
           "bit_rate": "1411200",
           "nb_frames": "8494248",
           "disposition": {
               "default": 0,
               "dub": 0,
               "original": 0,
               "comment": 0,
               "lyrics": 0,
               "karaoke": 0,
               "forced": 0,
               "hearing_impaired": 0,
               "visual_impaired": 0,
               "clean_effects": 0,
               "attached_pic": 0
           }
       }
    ],
    "format": {
       "filename": "http://host.com/file.aiff",
       "nb_streams": 1,
       "nb_programs": 0,
       "format_name": "aiff",
       "format_long_name": "Audio IFF",
       "start_time": "0.000000",
       "duration": "192.613333",
       "probe_score": 100
    }
    }

    Here’s an example of one that doesn’t :

    ffprobe -v quiet -print_format json -show_streams -show_format "http://host.com/file.wav"

    Which generates this result :

    {
    "streams": [
       {
           "index": 0,
           "codec_name": "pcm_s16le",
           "codec_long_name": "PCM signed 16-bit little-endian",
           "codec_type": "audio",
           "codec_time_base": "1/44100",
           "codec_tag_string": "[1][0][0][0]",
           "codec_tag": "0x0001",
           "sample_fmt": "s16",
           "sample_rate": "44100",
           "channels": 2,
           "bits_per_sample": 16,
           "r_frame_rate": "0/0",
           "avg_frame_rate": "0/0",
           "time_base": "1/44100",
           "bit_rate": "1411200",
           "disposition": {
               "default": 0,
               "dub": 0,
               "original": 0,
               "comment": 0,
               "lyrics": 0,
               "karaoke": 0,
               "forced": 0,
               "hearing_impaired": 0,
               "visual_impaired": 0,
               "clean_effects": 0,
               "attached_pic": 0
           }
       }
    ],
    "format": {
       "filename": "http://host.com/file.wav",
       "nb_streams": 1,
       "nb_programs": 0,
       "format_name": "wav",
       "format_long_name": "WAV / WAVE (Waveform Audio)",
       "bit_rate": "1411200",
       "probe_score": 99
    }
    }

    These two examples are different formats, but I’ve seen it work and not work when the format is the same, I just don’t have an example handy.

    What I’d like to know is if there is something I can change about the parameters I’m using with ffprobe to allow the duration to be determined consistently and accurate, or any information I can find as to how ffprobe works so I figure out how I might change the input files, etc. so they work correctly.

    Alternatively, if there is a different tool that works more reliably (it would need to be an open-source Linux tool) any suggestions or recommendations are welcome.

  • How to determine webm duration using ffprobe

    19 février 2017, par Lopakhin

    My goal is simple , I have several webm files need to be concated, but first I need to determine their durations.

    It seems webm file are played as streams, so there is no way to tell the length of each file.

    I have been using ffprobe to do the job ,but the duration returned is N/A.The command I use was :

    ffprobe -i input.file -show_format | grep duration

    thanks.

    The complete output of ffprobe list below :

    ffprobe version 2.6.2 Copyright (c) 2007-2015 the FFmpeg developers
     built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-vda
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from '231':
     Metadata:
       encoder         : GStreamer matroskamux version 1.5.91
       creation_time   : 2015-12-05 07:59:29
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 14.99 fps, 14.99 tbr, 1k tbn, 1k tbc (default)
       Metadata:
         title           : Video
       Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
       Metadata:
         title           : Audio
    duration=N/A
  • How to determine the correct format when remuxing streams ?

    1er février 2016, par Nyaruko

    I used ffmpeg(libavcodec) to remuxing a incoming h264 stream. The following is the part where I initialize the output format context :

    int ret;
    ffmpeg::AVDictionary *opts2 = NULL;
    av_dict_set(&opts2, "preset", "medium", 0);
    av_dict_set(&opts2, "crf", "29", 0);
    av_dict_set(&opts2, "profile", "baseline", 0);
    av_dict_set(&opts2, "level", "30", 0);
    av_dict_set(&opts2, "maxrate", "200000", 0);
    av_dict_set(&opts2, "minrate", "0", 0);
    av_dict_set(&opts2, "bufsize", "2000000", 0);

    ffmpeg::AVOutputFormat* fmt = ffmpeg::av_guess_format("mpeg", NULL, NULL);
    // Open the context
    //---------------------------------------------------------------------
    outFormatCtx = ffmpeg::avformat_alloc_context();
    if (!outFormatCtx)
    {
       return false;
    }

    //Set the output format
    //----------------------------------------------------------------------
    outFormatCtx->oformat = fmt;

    // Open the output file
    //-------------------------------------
    if (!(outFormatCtx->flags & AVFMT_NOFILE))
    {
       ret = ffmpeg::avio_open2(&outFormatCtx->pb, "Record.avi", AVIO_FLAG_WRITE, NULL, NULL);
       if (ret < 0)
       {
           return false;
       }
    }
    // Create the output stream
    // -------------------------------------
    ffmpeg::AVStream* out_stream = ffmpeg::avformat_new_stream(outFormatCtx, inputStream->codec->codec);
    if (!out_stream)
    {
       return false;
    }

    //Set the stream parameters
    //-------------------------------------
    ret = ffmpeg::avcodec_copy_context(out_stream->codec, inputStream->codec);
    if (ret < 0)
    {
       return false;
    }

    // Check then setup for global headers
    //-------------------------------------
    if (outFormatCtx->oformat->flags & AVFMT_GLOBALHEADER)
       out_stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;

    av_dump_format(outFormatCtx, 0, "Record.avi", 1);



    //Write the header
    //--------------------------------------
    ret = ffmpeg::avformat_write_header(outFormatCtx, &opts2);
    if (ret < 0)
    {
       return false;
    }

    Then it says I am not setting the VBV buffer size, and remuxing might fail. And the results actually give black screen.

    How could I choose the correct format instead of guessing it ?
    Or How could I set the VBV buffer size ?