Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (92)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (12659)

  • ffmpeg video unable to play properly in most video players

    7 septembre 2022, par Lars

    I'm trying to set up a node.js app that allows me to download files from a web interface.
I'm using yt-dl to get the video and audio stream and ffmpeg to pipe those streams into an mp4. This works and returns a mp4 file.

    


    Now the only issue I have is that when I play the file through most video players, the video player is unable to seek, or skip through the song. I found somewhere deep down on a forum that means that that means the mp4 headers are not working but that is all I could find.
Here is my code, almost unchanged from this response on another thread.

    


    Can anyone provide a solution for this issue.

    


    ytdl.getInfo(link, options).then(info => {
        audioStream = ytdl.downloadFromInfo(info, { ...options, quality: 'highestaudio' });
        videoStream = ytdl.downloadFromInfo(info, { ...options, quality: 'highestvideo' });
        // create the ffmpeg process for muxing
        ffmpegProcess = cp.spawn(ffmpegPath, [
            // supress non-crucial messages
            '-loglevel', '8', '-hide_banner',
            // input audio and video by pipe
            '-i', 'pipe:3', '-i', 'pipe:4',
            // map audio and video correspondingly
            '-map', '0:a', '-map', '1:v',
            // no need to change the codec
            '-c', 'copy',
            // output mp4 and pipe
            '-f', 'matroska', 'pipe:5'
        ], {
            // no popup window for Windows users
            windowsHide: true,
            stdio: [
                // silence stdin/out, forward stderr,
                'inherit', 'inherit', 'inherit',
                // and pipe audio, video, output
                'pipe', 'pipe', 'pipe'
            ]
        });
        audioStream.pipe(ffmpegProcess.stdio[3]);
        videoStream.pipe(ffmpegProcess.stdio[4]);
        ffmpegProcess.stdio[5].pipe(result);
    });


    


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

    


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