Recherche avancée

Médias (91)

Autres articles (81)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (11072)

  • How to covert video and extract frame from video using FFMPEG in single command

    13 juillet 2013, par kheya

    I am trying to convert and extract image frame from a video file in single command
    I can do this in 2 steps but I want to use pipe like technique to do this

    This is what I have :
    for %%a in ("*.avi") do ffmpeg -i "%%a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "%%~na.mp4" <— converts correctly

    I need to incorporate this extract command :

    ffmpeg -i inputfile.avi  -r  1  -t  4  image-%d.jpeg

    Merging two commands giving error.

    How do I do it ?

    EDIT :
    This is what I have. But it just converts the video, no jpg image created as second output

    for %%a in ("*.avi") do ffmpeg -i "%%a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "%%~na.mp4" | ffmpeg -r 1 -s 4cif "%%~na.jpeg"
  • Re-encode a video keeping the GOP structure of the original video [closed]

    5 avril, par Baltar27

    Is there a way to re-encode a video with ffmpeg keeping the GOP structure of the original file ? That is, if a frame is IDR, I, B or P in the input file, keep the same type in the output file, even if the GOP is variable and/or adaptive (it changes dynamically GOP type Open/Closed, the I period N or the P period M). Encoding in this way allows to maintain the maximum quality as the Open/Closed, I/B/P and GOP length decisions has been taken already by the original encoder.

    &#xA;

  • FFMPEG C++ API audio/video sync, video is longer [closed]

    11 mai 2023, par Gábor Gombor

    I create a video from frames in C++ with a given FPS and supply it to FFMPEG API. I record from an Unreal engine viewport and feed FFMPEG with the images. In this interval I have also an audio track in FLAC which I want sync with the video. When the music ends, I close the video and merge them, but the final video has sync problems, the video is a little bit longer than the audio, so I will have an increasing delay. For example I record 0:55 secs, the audio is ok=same length, but the video from frames will be 0:56 secs.

    &#xA;

    I think the following code is problematic :

    &#xA;

    bool MyVideoExporter::writeFrame(OutputStream* oStream, AVFrame* frame, int&amp; framePTS)&#xA;{&#xA;    auto* packet = oStream->pkt->pkt;&#xA;    auto* codecContext = oStream->enc->codecContext;&#xA;&#xA;    frame->pts = framePTS;&#xA;    frame->pkt_dts = frame->pts;&#xA;&#xA;    auto ret = avcodec_send_frame(codecContext, frame);&#xA;    if (ret >= 0) {&#xA;        auto retVal = 0;&#xA;        while (retVal >= 0) {&#xA;            retVal = avcodec_receive_packet(codecContext, packet);&#xA;            if (retVal == AVERROR(EAGAIN) || retVal == AVERROR_EOF) break;&#xA;            else if (retVal &lt; 0) {&#xA;                return false;&#xA;            }&#xA;&#xA;            // rescale to audio, usually 1/44100&#xA;            av_packet_rescale_ts(packet, m_audiotimestamp, oStream->st->time_base);&#xA;            // rescale to FPS, usually 1/30 or 1/60&#xA;            av_packet_rescale_ts(packet, codecContext->time_base, oStream->st->time_base);&#xA;&#xA;            packet->stream_index = oStream->st->index;&#xA;&#xA;            retVal = av_interleaved_write_frame(m_avFormatContext.avFormatContext, packet);&#xA;            if (retVal &lt; 0) {&#xA;                return false;&#xA;            }&#xA;&#xA;            framePTS&#x2B;&#x2B;;&#xA;        }&#xA;&#xA;        return retVal == AVERROR_EOF;&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&#xA;

    &#xA;

    Any idea what is wrong ?

    &#xA;

    I tried change the order of av_packet_rescale_ts lines or move the frame increase code to another places, but getting far worse results.

    &#xA;