Recherche avancée

Médias (91)

Autres articles (97)

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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (14544)

  • fate/id3v2 : Add a test for remuxing id3v2 private tags

    10 avril 2021, par Andreas Rheinhardt
    fate/id3v2 : Add a test for remuxing id3v2 private tags
    

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] tests/fate/id3v2.mak
    • [DH] tests/ref/fate/id3v2-priv-remux
  • How to convert AVFrame to cv::cuda::GpuMat

    29 mai 2021, par Bump

    After I decode a frame use FFmpeg(Hardware decoding like this : https://github.com/FFmpeg/FFmpeg/blob/release/4.1/doc/examples/hw_decode.c)the decoded frames still remain on GPU memory. How can I convert AVFrame to GpuMat ?

    &#xA;

    I tried to do it using this code :

    &#xA;

    __global__ void NV12ToBGRkernel(uchar* ydata, uchar* uvdata, int ywidth, int uvwidth, cv::cuda::PtrStepSz<uchar3> rgbFrame) {&#xA;    int i = threadIdx.x &#x2B; blockIdx.x * blockDim.x;      &#xA;    int j = threadIdx.y &#x2B; blockIdx.y * blockDim.y;    &#xA;&#xA;    int indexY = j * ywidth &#x2B; i;&#xA;    int id2 = i % 2;&#xA;    int indexU = j / 2 * uvwidth &#x2B; i - id2;&#xA;    int indexV = indexU &#x2B; 1;&#xA;&#xA;    if (j &lt; rgbFrame.rows &amp;&amp; i &lt; rgbFrame.cols) {&#xA;        uchar Y = ydata[indexY];&#xA;        uchar U = uvdata[indexU];&#xA;        uchar V = uvdata[indexV];&#xA;        int R = Y &#x2B; 1.402*(V - 128);&#xA;        int G = Y - 0.34414*(U - 128) - 0.71414*(V - 128);&#xA;        int B = Y &#x2B; 1.772*(U - 128);&#xA;&#xA;        if (R &lt; 0)&#xA;            R = 0;&#xA;        if (G &lt; 0)&#xA;            G = 0;&#xA;        if (B &lt; 0)&#xA;            B = 0;&#xA;&#xA;        rgbFrame(j, i).x = (B>255) ? 255 : (uchar)B;&#xA;        rgbFrame(j, i).y = (G>255) ? 255 : (uchar)G;&#xA;        rgbFrame(j, i).z = (R>255) ? 255 : (uchar)R;&#xA;    }&#xA;    return;&#xA;}&#xA;&#xA;extern "C" int cuda_NV12ToBGR(AVFrame *frame, cv::cuda::GpuMat* out) {&#xA;    int width = out->cols;&#xA;    int height = out->rows;&#xA;    int byteCount = out->elemSize();&#xA;    int bx = ceil((double)width / BLOCKDIM_X);  &#xA;    int by = ceil((double)height / BLOCKDIM_Y);&#xA;&#xA;    if (bx > GRIDDIM_X) bx = GRIDDIM_X;&#xA;    if (by > GRIDDIM_Y) by = GRIDDIM_Y;&#xA;&#xA;    dim3 grid(bx, by);&#xA;    dim3 block(BLOCKDIM_X, BLOCKDIM_Y);&#xA;&#xA;    uchar* ydata = frame->data[0];&#xA;    uchar* uvdata = frame->data[1];&#xA;    int ywidth = frame->linesize[0];&#xA;    int uvwidth = frame->linesize[1];&#xA;&#xA;    NV12ToBGRkernel &lt;&lt; > >(ydata, uvdata, ywidth, uvwidth, *out);&#xA;&#xA;    cudaDeviceSynchronize();&#xA;    gpuErrchk(cudaPeekAtLastError());&#xA;    return 1;&#xA;}&#xA;</uchar3>

    &#xA;

    Using the above code I can get a GpuMat, but after I download the GpuMat to Mat and imshow it, I found the decode frames to be the same sometimes (two adjacent frames),and if I use av_hwframe_transfer_data bofore, then convert AVFrame to GpuMat ,it won't happen again. When I checked in the source code in av_hwframe_transfer_data, I found this :

    &#xA;

    static int cuda_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,&#xA;                                   const AVFrame *src) {&#xA;    CUDAFramesContext       *priv = ctx->internal->priv;&#xA;    AVHWDeviceContext *device_ctx = ctx->device_ctx;&#xA;    AVCUDADeviceContext    *hwctx = device_ctx->hwctx;&#xA;    CudaFunctions             *cu = hwctx->internal->cuda_dl;&#xA;&#xA;    CUcontext dummy;&#xA;    int i, ret;&#xA;&#xA;    ret = CHECK_CU(cu->cuCtxPushCurrent(hwctx->cuda_ctx));&#xA;    if (ret &lt; 0)&#xA;        return ret;&#xA;&#xA;    for (i = 0; i &lt; FF_ARRAY_ELEMS(src->data) &amp;&amp; src->data[i]; i&#x2B;&#x2B;) {&#xA;        CUDA_MEMCPY2D cpy = {&#xA;            .srcMemoryType = CU_MEMORYTYPE_DEVICE,&#xA;            .dstMemoryType = CU_MEMORYTYPE_HOST,&#xA;            .srcDevice     = (CUdeviceptr)src->data[i],&#xA;            .dstHost       = dst->data[i],&#xA;            .srcPitch      = src->linesize[i],&#xA;            .dstPitch      = dst->linesize[i],&#xA;            .WidthInBytes  = FFMIN(src->linesize[i], dst->linesize[i]),&#xA;            .Height        = src->height >> (i ? priv->shift_height : 0),&#xA;        };&#xA;&#xA;        ret = CHECK_CU(cu->cuMemcpy2DAsync(&amp;cpy, hwctx->stream));&#xA;        if (ret &lt; 0)&#xA;            goto exit;&#xA;    }&#xA;&#xA;    ret = CHECK_CU(cu->cuStreamSynchronize(hwctx->stream));&#xA;    if (ret &lt; 0)&#xA;        goto exit;&#xA;&#xA;exit:&#xA;    CHECK_CU(cu->cuCtxPopCurrent(&amp;dummy));&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    My questions are :

    &#xA;

      &#xA;
    1. Maybe cuCtxPushCurrent and cuCtxPopCurrent lead to the repeated frames ?
    2. &#xA;

    3. I don't want to use av_hwframe_transfer_data to transfer data to the CPU. How can I do it ?
    4. &#xA;

    &#xA;

  • lavf/framecrcenc : do not hash side data

    24 avril 2021, par Anton Khirnov
    lavf/framecrcenc : do not hash side data
    

    There are no guarantees that all side data types have the same
    representation on all platforms.

    Tests that change output due to this :

    id3v2-priv-remux, cover-art-mp3-id3v2-remux, gapless-mp3 : SKIP_SAMPLES,
    which is tested by fate-gapless-mp3-side-data

    matroska-vp8-alpha-remux : MATROSKA_BLOCKADDITIONAL, which is tested by
    remux itself (side data is written into output)

    matroska-mastering-display-metadata : MASTERING_DISPLAY_METADATA and
    CONTENT_LIGHT_LEVEL, which are tested by ffprobe invocation in the same
    test

    matroska-spherical-mono-remux : STEREO3D and SPHERICAL, which are tested
    by ffprobe invocation in the same test

    segment-mp4-to-ts : MPEGTS_STREAM_ID, which is tested by ts remuxing
    tests

    webm-webvtt-remux : WEBVTT_IDENTIFIER/SETTINGS, which is tested by the
    ffprobe invocation in the same test

    mxf-d10-user-comments : CPB_PROPERTIES, which is tested by mxf-probe-d10

    mov-cover-image : SKIP_SAMPLES, which is tested for mov by
    mov-aac-2048-priming

    copy-trac3074 : AUDIO_SERVICE_TYPE, which is tested by fate-hls-fmp4_ac3

    • [DH] libavformat/framecrcenc.c
    • [DH] tests/ref/fate/copy-trac3074
    • [DH] tests/ref/fate/cover-art-mp3-id3v2-remux
    • [DH] tests/ref/fate/gapless-mp3
    • [DH] tests/ref/fate/id3v2-priv-remux
    • [DH] tests/ref/fate/matroska-mastering-display-metadata
    • [DH] tests/ref/fate/matroska-spherical-mono-remux
    • [DH] tests/ref/fate/matroska-vp8-alpha-remux
    • [DH] tests/ref/fate/mov-cover-image
    • [DH] tests/ref/fate/mxf-d10-user-comments
    • [DH] tests/ref/fate/segment-mp4-to-ts
    • [DH] tests/ref/fate/webm-webvtt-remux