Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (80)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (10707)

  • avformat/electronicarts : add option to return alpha channel in the main video stream...

    13 novembre 2022, par Marton Balint
    avformat/electronicarts : add option to return alpha channel in the main video stream in VP6A codec
    

    VP6 alpha in EA format is a second VP6 encoded video stream where only the Y
    component is used and is interpreted as the alpha channel of the first VP6
    stream. The alpha VP6 stream is muxed separately from the main VP6 stream, has
    its own stream headers and packet headers. In theory the two streams might not
    even have the same resolution (although most likely that is not something that
    is seen or supported in the wild), but the format is capable of doing it.

    Merged VP6 alpha (also known as the VP6A codec) means that a packet of the
    video stream contains the corresponding packet of both VP6 substreams like
    this :

    OffsetOfAlpha, DataPacket, AlphaDataPacket

    So data and alpha data of a frame is merged to a single packet, this is how VP6
    video with alpha is muxed in FLV and SWF.

    The first approach is more like how the demuxer sees data in the EA format,
    unfortunately it is different to what the FLV or SWF format expects, so -
    having no better place for it in the framework - I decided to do an optional
    format conversion in the EA demuxer.

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] doc/demuxers.texi
    • [DH] libavformat/electronicarts.c
    • [DH] libavformat/version.h
  • Turn off sw_scale conversion to planar YUV 32 byte alignment requirements

    8 novembre 2022, par flansel

    I am experiencing artifacts on the right edge of scaled and converted images when converting into planar YUV pixel formats with sw_scale. I am reasonably sure (although I can not find it anywhere in the documentation) that this is because sw_scale is using an optimization for 32 byte aligned lines, in the destination. However I would like to turn this off because I am using sw_scale for image composition, so even though the destination lines may be 32 byte aligned, the output image may not be.

    &#xA;

    Example.

    &#xA;

    Full output frame is 1280x720 yuv422p10le. (this is 32 byte aligned)&#xA;However into the top left corner I am scaling an image with an outwidth of 1280 / 3 = 426.&#xA;426 in this format is not 32 byte aligned, but I believe sw_scale sees that the output linesize is 32 byte aligned and overwrites the width of 426 putting garbage in the next 22 bytes of data thinking this is simply padding when in my case this is displayable area.

    &#xA;

    This is why I need to actually disable this optimization or somehow trick sw_scale into believing it does not apply while keeping intact the way the program works, which is otherwise fine.

    &#xA;

    I have tried adding extra padding to the destination lines so they are no longer 32 byte aligned,&#xA;this did not help as far as I can tell.

    &#xA;

    Edit with code Example. Rendering omitted for ease of use.&#xA;Also here is a similar issue, unfortunately as I stated there fix will not work for my use case. https://github.com/obsproject/obs-studio/pull/2836

    &#xA;

    Use the commented line of code to swap between a output width which is and isnt 32 byte aligned.

    &#xA;

    #include "libswscale/swscale.h"&#xA;#include "libavutil/imgutils.h"&#xA;#include "libavutil/pixelutils.h"&#xA;#include "libavutil/pixfmt.h"&#xA;#include "libavutil/pixdesc.h"&#xA;#include &#xA;#include &#xA;#include &#xA;&#xA;int main(int argc, char **argv) {&#xA;&#xA;/// Set up a 1280x720 window, and an item with 1/3 width and height of the window.&#xA;int window_width, window_height, item_width, item_height;&#xA;window_width = 1280;&#xA;window_height = 720;&#xA;item_width = (window_width / 3);&#xA;item_height = (window_height / 3);&#xA;&#xA;int item_out_width = item_width;&#xA;/// This line sets the item width to be 32 byte aligned uncomment to see uncorrupted results&#xA;/// Note %16 because outformat is 2 bytes per component&#xA;//item_out_width -= (item_width % 16);&#xA;&#xA;enum AVPixelFormat outformat = AV_PIX_FMT_YUV422P10LE;&#xA;enum AVPixelFormat informat = AV_PIX_FMT_UYVY422;&#xA;int window_lines[4] = {0};&#xA;av_image_fill_linesizes(window_lines, outformat, window_width);&#xA;&#xA;uint8_t *window_planes[4] = {0};&#xA;window_planes[0] = calloc(1, window_lines[0] * window_height);&#xA;window_planes[1] = calloc(1, window_lines[1] * window_height);&#xA;window_planes[2] = calloc(1, window_lines[2] * window_height); /// Fill the window with all 0s, this is green in yuv.&#xA;&#xA;&#xA;int item_lines[4] = {0};&#xA;av_image_fill_linesizes(item_lines, informat, item_width);&#xA;&#xA;uint8_t *item_planes[4] = {0};&#xA;item_planes[0] = malloc(item_lines[0] * item_height);&#xA;memset(item_planes[0], 100, item_lines[0] * item_height);&#xA;&#xA;struct SwsContext *ctx;&#xA;ctx = sws_getContext(item_width, item_height, informat,&#xA;               item_out_width, item_height, outformat, SWS_FAST_BILINEAR, NULL, NULL, NULL);&#xA;&#xA;/// Check a block in the normal region&#xA;printf("Pre scale normal region %d %d %d\n", (int)((uint16_t*)window_planes[0])[0], (int)((uint16_t*)window_planes[1])[0],&#xA;       (int)((uint16_t*)window_planes[2])[0]);&#xA;&#xA;/// Check a block in the corrupted region (should be all zeros) These values should be out of the converted region&#xA;int corrupt_offset_y = (item_out_width &#x2B; 3) * 2; ///(item_width &#x2B; 3) * 2 bytes per component Y PLANE&#xA;int corrupt_offset_uv = (item_out_width &#x2B; 3); ///(item_width &#x2B; 3) * (2 bytes per component rshift 1 for horiz scaling) U and V PLANES&#xA;&#xA;printf("Pre scale corrupted region %d %d %d\n", (int)(*((uint16_t*)(window_planes[0] &#x2B; corrupt_offset_y))),&#xA;       (int)(*((uint16_t*)(window_planes[1] &#x2B; corrupt_offset_uv))), (int)(*((uint16_t*)(window_planes[2] &#x2B; corrupt_offset_uv))));&#xA;sws_scale(ctx, (const uint8_t**)item_planes, item_lines, 0, item_height,window_planes, window_lines);&#xA;&#xA;/// Preform same tests after scaling&#xA;printf("Post scale normal region %d %d %d\n", (int)((uint16_t*)window_planes[0])[0], (int)((uint16_t*)window_planes[1])[0],&#xA;       (int)((uint16_t*)window_planes[2])[0]);&#xA;printf("Post scale corrupted region %d %d %d\n", (int)(*((uint16_t*)(window_planes[0] &#x2B; corrupt_offset_y))),&#xA;       (int)(*((uint16_t*)(window_planes[1] &#x2B; corrupt_offset_uv))), (int)(*((uint16_t*)(window_planes[2] &#x2B; corrupt_offset_uv))));&#xA;&#xA;return 0;&#xA;

    &#xA;

    }

    &#xA;

    Example Output:&#xA;&#xA;//No alignment&#xA;Pre scale normal region 0 0 0&#xA;Pre scale corrupted region 0 0 0&#xA;Post scale normal region 400 400 400&#xA;Post scale corrupted region 512 36865 36865&#xA;&#xA;//With alignment&#xA;Pre scale normal region 0 0 0&#xA;Pre scale corrupted region 0 0 0&#xA;Post scale normal region 400 400 400&#xA;Post scale corrupted region 0 0 0&#xA;

    &#xA;

  • Able to get HLS to play on VLC viewer but not on browser

    6 mai 2022, par Tamothee

    so i have been trying to get ipcamera to connect to a react app and show live video. i found and followed this tutorial https://www.youtube.com/watch?v=-a5MAaEaizU&t=185s .

    &#xA;

    i am able to get vlc viewer to run the hls server link and display what the camera sees. however when i plug the link into my code or a browser hls viewer like https://hls-js.netlify.app/demo/ , the m3u8 link does not play. there is no error and when i inspect the network, i do receive the m3u8 and .ts links.&#xA;this is what i see on the network portion

    &#xA;

    ffmpeg -i rtsp://admin:Password1234@192.168.1.64:554/Streaming/Channels/101 -fflags flush_packets -max_delay 2 -flags -global_header -hls_time 2 -hls_list_size 3 -vcodec copy -y ./index.m3u8&#xA;

    &#xA;

    this is the ffmpeg command that i ran to convert my rtsp output to hls.

    &#xA;

    var http = require(&#x27;http&#x27;);&#xA;var fs = require(&#x27;fs&#x27;);&#xA;&#xA;const port = 1234&#xA;&#xA;http.createServer(function (request, response) {&#xA;console.log(&#x27;request starting...&#x27;);&#xA;&#xA;var filePath = &#x27;.&#x27; &#x2B; request.url;&#xA;&#xA;fs.readFile(filePath, function(error, content) {&#xA;    response.writeHead(200, { &#x27;Access-Control-Allow-Origin&#x27;: &#x27;*&#x27; });&#xA;    if (error) {&#xA;        if(error.code == &#x27;ENOENT&#x27;){&#xA;            fs.readFile(&#x27;./404.html&#x27;, function(error, content) {&#xA;                response.end(content, &#x27;utf-8&#x27;);&#xA;            });&#xA;        }&#xA;        else {&#xA;            response.writeHead(500);&#xA;            response.end(&#x27;Sorry, check with the site admin for error: &#x27;&#x2B;error.code&#x2B;&#x27; ..\n&#x27;);&#xA;            response.end(); &#xA;        }&#xA;    }&#xA;    else {&#xA;        response.end(content, &#x27;utf-8&#x27;);&#xA;    }&#xA;});&#xA;&#xA;}).listen(port);&#xA;console.log(`Server running at http://127.0.0.1:${port}/`);&#xA;

    &#xA;

    this is the code for the hls server that receives the request and sends the user the m3u8 and ts files.

    &#xA;

     &#xA;

    &#xA;

    and i'm trying to play the link like this using react-hls-player

    &#xA;

    hope this is not a stupid question as i'm a beginner and hope that someone could help me with this problem.

    &#xA;