Recherche avancée

Médias (0)

Mot : - Tags -/gis

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

Autres articles (2)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)

    31 mai 2013, par

    Lorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
    Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
    Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
    Description des scripts
    Trois scripts Munin ont été développés :
    1. mediaspip_medias
    Un script de (...)

Sur d’autres sites (1560)

  • FFMPEG - Converting TS frame to PNG creating invalid images

    20 juillet 2015, par spelley

    I am attempting to snag a single frame from a TS live stream and generate a PNG image. The command I’ve been using is :

    ffmpeg -y -i "filenamehere" -f image2 -vframes 1 -s 250x250 ./snapshot-250x250.png

    When doing this on my local Windows machine using the FFMPEG executable, it generates the image as expected. When using Ubuntu, after doing an apt-get install ffmpeg and using the same command, I am generating grey squares with sporadic noise even while targeting the same file with the exact same command.

    Here is the (anonymized) output :

    [h264 @ 0xa256a0] no frame!
    [h264 @ 0xa256a0] non-existing SPS 0 referenced in buffering period
    [h264 @ 0xa256a0] non-existing PPS referenced
    [h264 @ 0xa256a0] non-existing SPS 0 referenced in buffering period
    [h264 @ 0xa256a0] non-existing PPS 0 referenced
    [h264 @ 0xa256a0] decode_slice_header error
    [h264 @ 0xa256a0] non-existing PPS 0 referenced
    [h264 @ 0xa256a0] decode_slice_header error
    [h264 @ 0xa256a0] non-existing PPS 0 referenced
    [h264 @ 0xa256a0] decode_slice_header error
    [h264 @ 0xa256a0] non-existing PPS 0 referenced
    [h264 @ 0xa256a0] decode_slice_header error
    [h264 @ 0xa256a0] no frame!
    [mpegts @ 0xa1d1e0] max_analyze_duration reached
    [NULL @ 0xa28080] start time is not set in estimate_timings_from_pts

    Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 1000.00 (1000/1)
    Input #0, mpegts, from '<file here="here">':
     Duration: 00:00:09.07, start: 35968.174711, bitrate: 697 kb/s
     Program 1
       Stream #0.0[0x100]: Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 44.52 fps, 1k tbr, 90k tbn, 59.94 tbc
       Stream #0.1[0x101]: Audio: aac, 48000 Hz, stereo, s16, 96 kb/s
       Stream #0.2[0x102]: Data: [21][0][0][0] / 0x0015
    Incompatible pixel format 'yuv420p' for codec 'png', auto-selecting format 'rgb24'
    [buffer @ 0xa43480] w:1280 h:720 pixfmt:yuv420p
    [avsink @ 0xa28780] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0xa26520] w:1280 h:720 fmt:yuv420p -> w:1280 h:720 fmt:rgb24 flags:0x4
    Output #0, image2, to './snapshot-250x250.png':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: png, rgb24, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 1k tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    frame=    1 fps=  0 q=0.0 Lsize=      -0kB time=0.01 bitrate= -17.6kbits/s dup=31 drop=0
    video:8kB audio:0kB global headers:0kB muxing overhead -100.261749%
    </file>

    The initial "no frame !" I believe is just it seeking to the first valid keyframe (And thus no cause for concern) however the only difference from my Windows output is the inclusion of this line :

    Incompatible pixel format 'yuv420p' for codec 'png', auto-selecting format 'rgb24'

    Windows has an encoder of Lavc56.46.100 instead of Lavf53.21.1 and the stream mapping line on Windows has more information :

    Stream #0:0 -> #0:0 **(h264 (native) -> png (native))**

    I’ve attempted to manually seek to frames, change the output format from PNG -> GIF, JPEG and just cant seem to find the issue which has no problems on my local Windows machine. Any advice on where to look would be greatly appreciated ! Below is an example of the garbled output.

    Garbled output

  • Fragment shader does not show any colour when compiled with vs2013

    11 juin 2015, par 5mayfive

    When compiled with vs2010, the fragment shader works, but when I compiled and run in vs 2013, it’s grey.

    My fragment shader converts the yuv texture into rgb

    Below is my fragment code

       const char *FProgram =
       "uniform sampler2D Ytex;\n"
       "uniform sampler2D Utex;\n"
       "uniform sampler2D Vtex;\n"
       "void main(void) {\n"
       "  vec4 c = vec4((texture2D(Ytex, gl_TexCoord[0]).r - 16./255.) * 1.164);\n"
       "  vec4 U = vec4(texture2D(Utex, gl_TexCoord[0]).r - 128./255.);\n"
       "  vec4 V = vec4(texture2D(Vtex, gl_TexCoord[0]).r - 128./255.);\n"
       "  c += V * vec4(1.596, -0.813, 0, 0);\n"
       "  c += U * vec4(0, -0.392, 2.017, 0);\n"
       "  c.a = 1.0;\n"
       "  gl_FragColor = c;\n"
       "}\n";





    glClearColor(0, 0, 0, 0);

    PHandle = glCreateProgram();
    FSHandle = glCreateShader(GL_FRAGMENT_SHADER);



    glShaderSource(FSHandle, 1, &amp;FProgram, NULL);
    glCompileShader(FSHandle);

    glAttachShader(PHandle, FSHandle);
    glLinkProgram(PHandle);


    glUseProgram(PHandle);
    glDeleteProgram(PHandle);
    glDeleteProgram(FSHandle);

    This is my texture code, I receive linesize and yuv frame data from ffmpeg and make into texture. Everything works fine in VS 2010 computer, but when compiled and run in vs2013 computer, it is grey (black n white), no colour

       /* Select texture unit 1 as the active unit and bind the U texture. */
    glPixelStorei(GL_UNPACK_ROW_LENGTH, linesize1);
    glActiveTexture(GL_TEXTURE1);
    i = glGetUniformLocation(PHandle, "Utex");
    glUniform1i(i, 1);  /* Bind Utex to texture unit 1 */
    glBindTexture(GL_TEXTURE_2D, 1);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width / 2, height / 2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, frame1);
    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);


    /* Select texture unit 2 as the active unit and bind the V texture. */
    glPixelStorei(GL_UNPACK_ROW_LENGTH, linesize2);
    glActiveTexture(GL_TEXTURE2);
    i = glGetUniformLocation(PHandle, "Vtex");
    glUniform1i(i, 2);  /* Bind Vtext to texture unit 2 */
    glBindTexture(GL_TEXTURE_2D, 2);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width / 2, height / 2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, frame2);
    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);


    /* Select texture unit 0 as the active unit and bind the Y texture. */



    glPixelStorei(GL_UNPACK_ROW_LENGTH, linesize0);
    glActiveTexture(GL_TEXTURE0);
    i = glGetUniformLocation(PHandle, "Ytex");
    glUniform1i(i, 0);
    glBindTexture(GL_TEXTURE_2D, 0);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width, height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, frame0);
    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);



    glClear(GL_COLOR_BUFFER_BIT);

    /* Draw image (again and again). */

    glBegin(GL_QUADS);
    glTexCoord2i(0, 0);
    glVertex2i(-w / 2, h / 2);
    glTexCoord2i(1, 0);
    glVertex2i(w / 2, h / 2);
    glTexCoord2i(1, 1);
    glVertex2i(w / 2, -h / 2);
    glTexCoord2i(0, 1);
    glVertex2i(-w / 2, -h / 2);
    glEnd();

    Need guidance here, thanks in advance !

  • ffmpeg options that work with Chrome

    21 avril 2015, par James

    I am trying to find the magic options that make mp4 work in Chrome. I think my videos were working, but don’t seem to any more after Chrome updated.

    Chrome, Version 41.0.2272.101 (Windows)

    I tried some other machines and found some of the videos worked on older versions, and my Mac seems to still work on the latest Chrome.

    I am using the ffmpeg options to convert from png series,

    ffmpeg -framerate 10 -i dance%02d.png  -r 10 -pix_fmt yuv420p dance.mp4

    Some videos work, some don’t, some work some of the time, or stop half way through.

    I tried various other options like,

    ffmpeg -start_number 16 -framerate 10 -i dance%02d.png -r 10 -an -s hd720 \
    -vcodec libx264 -pix_fmt yuv420p -preset slow -profile:v baseline \
    -movflags faststart -y dance.mp4

    but this just seemed to make things worse.

    here is one of the videos,
    http://www.botlibre.com/media/a786625.mp4

    and another one,
    http://www.botlibre.com/media/a812450.mp4

    Firefox seems to work no problem, on any version, grey background though.
    IE works fine, white background.
    Safari works, grey background.

    Another thing, they videos used to have white background on older Chrome version, but now are grey, except on Mac still white.

    and one more thing. Webm format works, but anyone know the option to remove transparency ? I’m using,

    ffmpeg -i dance%02d.png  -r 10 -c:v libvpx -crf 10 -b:v 512k -c:a libvorbis dance.webm

    just want a solid white background.