Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (59)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (8411)

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

    


    I think the following code is problematic :

    


    bool MyVideoExporter::writeFrame(OutputStream* oStream, AVFrame* frame, int& framePTS)
{
    auto* packet = oStream->pkt->pkt;
    auto* codecContext = oStream->enc->codecContext;

    frame->pts = framePTS;
    frame->pkt_dts = frame->pts;

    auto ret = avcodec_send_frame(codecContext, frame);
    if (ret >= 0) {
        auto retVal = 0;
        while (retVal >= 0) {
            retVal = avcodec_receive_packet(codecContext, packet);
            if (retVal == AVERROR(EAGAIN) || retVal == AVERROR_EOF) break;
            else if (retVal < 0) {
                return false;
            }

            // rescale to audio, usually 1/44100
            av_packet_rescale_ts(packet, m_audiotimestamp, oStream->st->time_base);
            // rescale to FPS, usually 1/30 or 1/60
            av_packet_rescale_ts(packet, codecContext->time_base, oStream->st->time_base);

            packet->stream_index = oStream->st->index;

            retVal = av_interleaved_write_frame(m_avFormatContext.avFormatContext, packet);
            if (retVal < 0) {
                return false;
            }

            framePTS++;
        }

        return retVal == AVERROR_EOF;
    }

    return false;
}



    


    Any idea what is wrong ?

    


    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.

    


  • how to check the number of duplicated frame for video 1sec ( about 30frames ) from video start and want to apply this for mpdecimate

    20 octobre 2018, par cool jobs

    How to check the number of duplicated frame for video 1sec ( about 30frames ) from video beginning point ? I want to apply this for mpdecimate with audio. Some videos have three duplicated frames, some videos - 15 duplicated frame, some videos have 19 duplicated frames.. so it looks I need a variable or math operator in ffmpeg as expression.

    1. some video have duplicated frames at beginning point , but it is
      not same always the number of duplicated frames.
    2. if get back variable which is for the number of duplicated frames
      from step-1 then split and trim apply mpdecimate with audio as
      much as step-1 variable returned, finally do concatenate each other.

    Is this possible with -filter_complex for one line ffmpeg command ?

  • FFMPEG merging audio and video to get resulting video

    26 septembre 2016, par King

    I need to merge audio and video using ffmpeg so that, it should result in a video with the same duration as of audio.

    I have tried 2 commands for that requirement in my linux terminal. Both the commands work for a few of the input videos ; but for some other input_videos, they produce output same as the input video, the audio doesn’t get merged.

    The commands, I have tried are -

    ffmpeg -i wonders.mp4 -i Carefull.mp3 -c copy testvid.mp4

    and

    ffmpeg -i wonders.mp4 -i Carefull.mp3 -strict -2 testvid.mp4

    and

    ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict
    experimental output.mp4

    and these are my input videos -

    1. samplevid.mp4

    https://vid.me/z44E

    duration - 28 seconds

    size - 1.1 MB

    status - working

    And

    1. wonders.mp4

    https://vid.me/gyyB

    duration - 97 seconds

    size - 96 MB

    status - not working

    I have observed that the large size (more than 2MB) of the input video is probably the issue.

    But, still I want the fix.