Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (38)

  • 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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4703)

  • How to create a video in .net6 [closed]

    22 mai 2023, par mans

    I am trying to create a video from a series of images i .net core (6.0)

    


    I am looking for a solution like this :

    


    VideoCreator video=new VideoCreator("MyVideo.mp4");

for (int i=0;i<1000;i++)
{
     var image=getImage();
     video.addFrame(image);
}
video.close();


    


    I already tried these solutions, and I could not make them work or compile :

    


    OpenCVSharp

    


    This is compiling properly in .net 6 but is sot reliable when writing videos. I could get a blank video, especially if the getImage function took a long time to return an image (for example, 20 sec) and the above code is run in a thread. All in one : the system did not produce video reliably.

    


    AForge.net

    


    This library and its related library (Accord.NET) don't work on.net core. My attempt to use them did not produce any compilable software (for example AForge.video.ffmpeg or AForge.Video.VFW) are not available in .net core).

    


    So my questions :

    


      

    1. What is the best way to create a video in .net core reliably ?
    2. 


    3. I am using .net core as I am using Microsoft ML engine, is the ML engine available for framework ?
    4. 


    5. My target platform is Windows, is there any way that I can combine .net and framework applications/libraries ?
    6. 


    


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

    


  • RMPT Stream Startup Dalay on FFMPEG and Gstreamer compared to OBS

    24 mars 2023, par Arruda

    I'm trying to use ffmpeg to stream a video into my RTMP server.
The problem I'm having right now is that FFMPEG seems to take a long time to start streaming the output (from what I see in my Oven Media Engine server).

    


    At the same time, when I use OBS Studio my stream starts almost immediately.
I also tried using Gstreamer, and got the same amount of delay when using FFMPEG.

    


    After a long process, I finally saw that if I added an empty audio track, then FFMPEG would start as quickly as OBS.

    


    This is my final FFMPEG command (using the empty audio track) :

    


    ffmpeg -f v4l2 -i /dev/video0 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -profile:v main -pix_fmt yuv420p -preset ultrafast -tune zerolatency -vcodec libx264 -r 10 -g 10 -keyint_min 10 -sc_threshold 0 -b:v 2000k -maxrate 2000k -bufsize 2000k -s 768x432 -acodec aac  -f flv rtmp://localhost:1935/app/mystream


    


    I'm streaming my webcam at 768x432, at 10FPS.

    


    Now, is this a bad solution in the case where there is no need for an audio in the output video ?

    


    There is no problem, nor noticible delay in the videstream if I remove the audio, the only downside is the startup time that is about 30-40 seconds.

    


    Is this delay when not using a audio track a FFMPEG issue ? or is this related to how the Oven Media Engine ingest the RTMP stream ?