Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (42)

  • 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

Sur d’autres sites (6736)

  • FFMPEG hangs (sometimes) when trying to take a photo from USB camera ?

    13 mai 2022, par dezman

    I am attempting to write a script that takes a photo every 3 seconds from camera source "1", the -pix_fmt I think is unique to my USB camera.

    


    Here is the script :

    


    #!/bin/bash

set -e

while :
do
  nice_num=$(date +%s)
  
  ffmpeg -ss 00:00:00 -f avfoundation -pix_fmt yuyv422 -r 30.000030 -i "1" -t 1 -frames:v 1 -q:v 2 "image_$nice_num_%03d.jpg"
  
  wait

  sleep 3
done


    


    The issue is half the time it successfully takes the photo, and half the time it just hangs forever echoing this (not useful) :

    


    ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100


    


    Then I CTRL-C 3 times and get :

    


    ^C^C^CReceived > 3 system signals, hard exiting


    


    Other methods of "taking a photo every n seconds from bash" are also appreciated.

    


  • FFmpeg Decklink playout audio PCM

    28 décembre 2019, par Rick Jansen

    I’m working on a ffmpeg playout application for Decklink but I’m facing some audio issues. I’ve seen other questions about this topic but none of them are currently helping.

    I’ve tried Reubens code (https://stackoverflow.com/a/15372417/12610231) with the swr_convert for playing out ffmpeg/libav frames to a Decklink board (this needs to be 16 bits PCM interleaved) but the audio sounds wrong. It sounds like it’s missing samples/ only getting half of the required samples).

    When I record the samples in a raw audio file and play it out with Audacity the timeline is half the length of the actual recording and playing the samples on double speed.

    I also tried the ’manual’ conversion (https://stackoverflow.com/a/15372417/12610231) but unfortunately, not the result I was hoping for.

    Here are some snippets of my code

    swr_ctx = swr_alloc();
    av_opt_set_int(swr_ctx, "in_channel_count", pAudioCodecCtx->channels, 0);
    av_opt_set_int(swr_ctx, "in_sample_rate", pAudioCodecCtx->sample_rate, 0);
    av_opt_set_int(swr_ctx, "in_channel_layout", pAudioCodecCtx->channel_layout, 0);
    av_opt_set_sample_fmt(swr_ctx, "in_sample_fmt", pAudioCodecCtx->sample_fmt, 0);
    av_opt_set_int(swr_ctx, "out_channel_count", 2, 0);
    av_opt_set_int(swr_ctx, "out_sample_rate", 48000, 0);
    av_opt_set_int(swr_ctx, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
    av_opt_set_sample_fmt(swr_ctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);

    if (swr_init(swr_ctx))
    {
       printf("Error SWR");
    }

    ///

    ret = avcodec_decode_audio4(pAudioCodecCtx, pFrame, &frameFinished, &packet);

    if (ret < 0) {
       printf("Error in decoding audio frame.\n");
    }

    swr_convert(swr_ctx, (uint8_t**)&m_audioBuffer, pFrame->nb_samples, (const uint8_t *)pFrame->extended_data, pFrame->nb_samples);

    It also looks like that the FFmpeg packet contains out of 1 video packet en 2 audio packets, not sure what to do with the second audio packet, I already tried to combine the first and second audio package without any good result on the audio side.

    Any help is appreciated.

  • Speed Up Creation of M3U8 - FFMPEG

    6 septembre 2017, par Kenny Johnson

    we are using ffmpeg to take rtsp video and create an m3u8 so we can stream the video to phones and computers via HLS using Clappr player.

    It works but it takes about 15 seconds for the m3u8 to be created.

    We have tried everything we can think of to speed it up. Just trying to get the video to start quicker.

    Right now it takes about 15 seconds for the video to start. We need to cut it in half.

    Our keyframe and chunk size are both set to 3 right now.

    Anyone have any suggestions ?
    Thanks for your time !