Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (78)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (4355)

  • Python script creates too short video using ffmpeg

    25 mai 2014, par Majzlik

    I use python script to create multiple pictures and call ffmpeg to create video. But there is a problem, because ffmpeg use just few pictures (about 7 - 10 from 160), but throws no error. I’ve tried the same command from commandline and video was correct. I’m calling ffmpeg this way :

    ffmpeg_call = ["ffmpeg", "-r", str(FPS), "-b", "16777216", "-y", "-i", "./sample_%05d.png", FILEOUTNAME + ".mp4"]
    subprocess.call(ffmpeg_call)

    and this was command in commandline :

    ffmpeg -r 25 -b 16777216 -y -i ./sample_%05d.png animation.mp4

    I’ve printed these commands to compare and they were the same, so there has to be problem in ffmpeg + python cooperation. Don’t you know, how to fix it ?

    UPDATE :

    this is log from ffmpeg :

    ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav     developers
     built on Feb  6 2014 20:56:59 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    Input #0, image2, from '/tmp/tmpRKxT6s/ampgraph/tmp/sample_%05d.png':
    Duration: 00:00:00.44, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, pal8, 640x480, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Incompatible pixel format 'pal8' for codec 'mpeg4', auto-selecting format 'yuv420p'
    [buffer @ 0x19e18a0] w:640 h:480 pixfmt:pal8
    [avsink @ 0x19ee1c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x19e2fc0] w:640 h:480 fmt:pal8 -> w:640 h:480 fmt:yuv420p flags:0x4
    Output #0, mp4, to './ampgraph/animation.mp4':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    frame=   11 fps=  0 q=2.5 Lsize=      46kB time=0.44 bitrate= 859.1kbits/s    
    video:45kB audio:0kB global headers:0kB muxing overhead 1.906569%
  • ffmpeg libav swap output file [on hold]

    16 février 2018, par themadmax

    I writing streaming video into disk, and I want to swap output file

    while(!stop) {
       int error = av_read_frame(formatCtxPtr_.get(), packetPtr.get());
       if (error<0)
           break;
       if (packetPtr->stream_index == videoStreamIndex_) {
           AVPacket *ppkt = av_packet_clone(packetPtr.get());
           AVPacket& pkt = *ppkt;
           auto in_stream = formatCtxPtr_->streams[pkt.stream_index];
           pkt.stream_index = 0 ; //Only on output stream video index = 0
           auto out_stream = fmtCtxOutputPtr_->streams[pkt.stream_index];
           pkt.pos = -1;
           int ret = av_interleaved_write_frame( fmtCtxOutputPtr_.get(), &pkt );
           if ( swap_ /*&& (AV_PKT_FLAG_KEY & pkt.flags)*/ ) { //Never have keyframe
               swap_ = false ;
               av_write_trailer(fmtCtxOutputPtr_.get());
               avio_flush(fmtCtxOutputPtr_->pb);
               avio_close(fmtCtxOutputPtr_->pb);
               //Reset stream time
               out_stream->start_time = out_stream->duration = out_stream->first_dts = out_stream->cur_dts = out_stream->info->last_dts = AV_NOPTS_VALUE ;
               int error = avio_open(&fmtCtxOutputPtr_->pb, "stream2.mp4", AVIO_FLAG_WRITE);
               error = avformat_write_header( fmtCtxOutputPtr_.get(), NULL );              
           }
       }
    }

    I have not error, write_frame return 0, "stream2.mp4" is create but still at 0 byte

  • Read Per-Frame Timecode with FFMPEG ?

    3 novembre 2019, par DiB

    I want to read a per-frame timecode out of a video file using libav (FFMPEG). I’ve started by digging into FFProbe. Using this as a starting point for my code, I can get to the AVStream that has the timecode in it. From there, I can use the dictionary to look at the stream’s metadata.

    int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int in_program)
    {
     AVStream *stream = ist->st;
    ...
     auto tcr = av_dict_get(stream->metadata, "timecode", NULL, 0);
     std::cerr << "Timecode: " << tcr->value << ", Total Frames: << stream->nb_frames << "\n";

    The time code is the correct one that was embedded into the video. The nb_frames is correctly the total number of video frames that I have. What I can’t get is the per-frame timecode. I don’t want to compute it if I don’t have to, I want to know exactly what was stamped on each frame. Is this possible ?

    // Pseudocode for what I want
    for(const auto& f : allOfMyFrames)
    {
     std::cerr << "Frame number " << f.number << ", Timecode: " << f.timecode << "\n";
    }