Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (10)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (3062)

  • Copying a FFMPEG AVFrame to a buffer for use with SDL

    13 août 2021, par ryan

    for the past couple of days I've been trying to get a decoded AVFrame* converted to an SDL_Surface. In order to do that, I need to get the pure RGBA data from the frame. Here is the code involved with copying.

    


     std::uint32_t numBytes = av_image_get_buffer_size(AV_PIX_FMT_BGR32,
                                                   codecCtx->width,
                                                   codecCtx->height,
                                                   32);
/// ...
std::vector nBuf(numBytes);
auto e = av_image_copy_to_buffer(nBuf.data(), nBuf.size(),
                                 rgbFrame->data, rgbFrame->linesize,
                                 AV_PIX_FMT_BGR32, codecCtx->width,
                                 codecCtx->height, 32);
auto surf = SDL_CreateRGBSurfaceFrom(reinterpret_cast(nBuf.data()),
                                     codecCtx->width, codecCtx->height,
                                     32, 4 * codecCtx->width, 0x000000FF, 0x0000FF00,
                                     0x00FF0000,0xFF000000);
                


    


    However, this creates a corrupted and messed up image. I've also tried using 24bit RGB as well with the same results, and I've also tried using std::copy and std::memcpy instead of using av_image_copy_to_buffer, like this :

    


    for(auto i = 0; i < codecCtx->height; i++)
    std::memcpy(nBuf.data() + i * codecCtx->width, rgbFrame->data[0] + i * rgbFrame->linesize[0], codecCtx->width * 4);


    


    with similarly corrupted results. I've also tried feeding SDL_CreateRGBSurfaceFrom rgbFrame->data[0] directly, and I got the same corrupted image.

    


    I know that rgbFrame is correct, I output it to a raw RGB format and the image was right.

    


    I need to copy this data manually since I cannot have SDL_Renderer and SDL_Textures do this for me since I am using SDL_GPU as my renderer ; the SDL_Surface is just so I can convert the image to a GPU_Image.

    


    If anyone could show me what I am doing wrong or show me an alternate way to get this as a GPU_Image that would be great !

    


  • ffmpeg stream_loop CPU 100%

    20 avril 2020, par beamercola

    I have a pretty simple stream_loop running out to an rtmp server. I even tried to optimize the files so it didn't have to encode but I must be doing something wrong

    



    Here's my code :

    



    play.sh

    



    ffmpeg \
  -stream_loop -1 \
  -i playlist1.txt \
  -c:v copy \
  -c:a copy \
  -f flv "rtmp://..."


    



    playlist1.txt

    



    ffconcat version 1.0
file 'tracks/001.mp4'
file 'playlist2.txt'


    



    playlist2.txt

    



    ffconcat version 1.0
file 'tracks/002.mp4'
file 'playlist1.txt'


    



    I have it in 2 playlists to make it infinite, read that somewhere.

    



    I get a constant log of this
Auto-inserting h264_mp4toannexb bitstream

    



    Here's my output :

    



    ffmpeg version 4.2.2-1ubuntu1~18.04.york0 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version='1ubuntu1~18.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005b43700] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'playlist1.txt':
  Duration: N/A, start: 0.000000, bitrate: 406 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360, 278 kb/s, 10 fps, 10 tbr, 10240 tbn, 20 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s
    Metadata:
      handler_name    : SoundHandler
Output #0, flv, to 'rtmp://......':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0(und): Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p, 640x360, q=2-31, 278 kb/s, 10 fps, 10 tbr, 1k tbn, 10240 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 127 kb/s
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005bca200] Auto-inserting h264_mp4toannexb bitstream filter34x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005c94480] Auto-inserting h264_mp4toannexb bitstream filter03x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005bcd7c0] Auto-inserting h264_mp4toannexb bitstream filter91x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005bcb780] Auto-inserting h264_mp4toannexb bitstream filter80x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005b4ca00] Auto-inserting h264_mp4toannexb bitstream filter78x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005b4c900] Auto-inserting h264_mp4toannexb bitstream filter83x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c005bcba40] Auto-inserting h264_mp4toannexb bitstream filter84x    


    



    my guess is these video files are 1:1. I tried re-encoding to force them to 10fps, but i notice 278 kb/s and 77 kb/s

    



    Any help appreciated thanks !

    


  • Merge/Blend/Composite transparent webm files with a jpg/png using ffmpeg

    13 avril 2021, par Lokanath

    I previously had generated color.webm and alpha.webm files withffmpeg using png images.
However, when I play the generated videos in my application it consumes quite some resources so I have decided to create a standard video(No alpha needed), I cannot re-record the videos as there are a lot of them at this point.

    


    I am generating the alpha and color video using the following command ffmpeg -framerate 30 -i img%d.png -filter_complex "alphaextract[a]" -map 0:v -c:v libvpx-vp9 -pix_fmt yuv420p -auto-alt-ref 0 -crf 15 -b:v 0 color.webm -map "[a]" -c:v libvpx-vp9 -pix_fmt yuv420p -auto-alt-ref 0 -crf 15 -b:v 0 alpha.webm

    


    I am looking to get a final video output where in alpha values are replaced with the png/jpg image, it's more like replacing the green screen with a background however in my case greenscreen is the alpha channel.

    


    Could any one let me know how to combine alpha.webm, color.webm with a jpg/png image without minimal or no quality loss ?
.