Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (104)

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

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (11824)

  • NodeJS HLS stall initial m3u8 for playback

    7 mars 2016, par shreddish

    I have a nodejs server running, when user enters the follow address

    http://localhost:7070/udp/239.1.1.1:1234/out.m3u8

    My server starts an ffmpeg child process that connects to that UDP stream and converts it to HLS segmented files.

    In order to give FFMPEG a chance to begin and start creating the first out.m3u8 file I call the FFMPEG process and then immediately set a timeout of about 8 seconds before the server responds to the request for the .m3u8 file.

    Eventually the video will start to play but only get through 2-3 .ts files before playback stops and the browser stops requesting additional .ts files.

    When it’s stalled, if I hit refresh (since FFMPEG is still running) it doesn’t try to start ffmpeg and delay the response. Instead it just immediately serves up the files being requested and playback works fine.

    So I am thinking that clearly something to do with delaying my response for that long is mucking up the playback of the stream. Is there a better way to wait for FFMPEG to start generating the HLS files and respond ?

    Here is the part of the server that is delaying the response.

    // Check if ffmpeg is running yet, also check to see if user has switched to a different udp address
           if (filename == "out.m3u8" && (!ffmpegRunning || udpAddress != runningUDPAddress))
               {
                   runFFMPEG(filename, udpAddress);
                   setTimeout(function() { streamFile(req, res, uri, filename); return; }, 8000);
               }
               else
               {
                   streamFile(req, res, uri, filename);
               }
  • How to use FFmpeg from a location where access is denied? [closed]

    27 mars 2024, par quite a beginner

    I tried to convert m3u8 file to ts file with FFmpeg, but my ip address was being rejected and I couldn't. Is there any way to do this ?

    


    I tried converting with glitch using glitch console and then downloading the entire repository, but I could only download up to 180MB.It was certainly a reliable method, but it failed because it could only use up to 180MB.

    


  • Converting Unity texture2d to YUV420P for ffmpeg

    1er février 2021, par DDovzhenko

    I'm trying to create video recorder inside Unity player using FFmpeg.

    



    I have next code snippets :

    



    Unity, C# :

    



    Texture2D frameTexture = new Texture2D(frameWidth, frameHeight, TextureFormat.RGB24, false);
//...
frameTexture.ReadPixels(new Rect(0, 0, frameWidth, frameHeight), 0, 0, false);
frameTexture.Apply();
//.....
byte[] pixels = frameTexture.GetRawTextureData();
AddFrame(pixels, pixels.Length, libApi);


//DLL Function Declaration
[DllImport("VideoCapture", CallingConvention = CallingConvention.Cdecl)]
static extern void AddFrame(byte[] data, int size, System.IntPtr api);


    



    C++ code :

    



    __declspec(dllexport) void AddFrame(uint8_t *data, int size, VideoCapture *vc) {
    vc->AddFrame(data, size);
}

void VideoCapture::AddFrame(uint8_t *data, int size) {
    Log("\nAdding frame\n");

    int err;
    if (!videoFrame) {
        Log("Allocating Video Frame\n");

        videoFrame = av_frame_alloc();
        videoFrame->format = AV_PIX_FMT_YUV420P;
        videoFrame->width = cctx->width;
        videoFrame->height = cctx->height;

        if ((err = av_frame_get_buffer(videoFrame, 32)) < 0) {
            Debug("Failed to allocate picture", err);
            return;
        }
    }

    if (!swsCtx) {
        Log("Creating SWS context\n");
        swsCtx = sws_getContext(cctx->width, cctx->height, AV_PIX_FMT_RGB24, cctx->width, cctx->height, AV_PIX_FMT_YUV420P, 0, 0, 0, 0);
    }

    uint8_t * inData[1] = { data };
    int inLinesize[1] = { 3 * cctx->width };

    Log("Scaling data\n");
    // From RGB to YUV
    if ((err = sws_scale(swsCtx, inData, inLinesize, 0, cctx->height, videoFrame->data, videoFrame->linesize)) < 0) {
        Debug("Failed to scale img", err);
        return;
    }
    ...........


    



    Unity player crashes when it's doing "sws_scale".

    



    Logs from Unity :

    



      ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF8437B49A6)
0x00007FF8437B49A6 (swscale-4) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF8437B2982)
0x00007FF8437B2982 (swscale-4) 
0x00007FF8437E78A6 (swscale-4) sws_get_class
0x00007FF8437E8E47 (swscale-4) sws_scale


    



    I thought its because of 'sws_get_class', but it works if I call this function directly. It also works if I pass empty data into 'sws_scale', only complaining that it's NULL. So, the reason is in data itself, but I don't what's wrong with it.

    



    I also tried to encode texture to JPG and PNG, pinned array into memory, but the result didn't change.

    



    Thanks in advance

    



    UPD:: :

    



    Changed DLL function calling to

    



    unsafe void AddFrame(byte[] data)
{
    fixed (byte* p = data)
    {
        AddFrame((IntPtr)p, data.Length, customLib);
    }
}
//Function declaration
static extern void AddFrame(IntPtr data, int size, System.IntPtr api);


    



    But error is still there.