Recherche avancée

Médias (91)

Autres articles (83)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (12715)

  • FFMPEG on Heroku worker dynos takes too long - runs into timeout error

    26 janvier 2021, par John

    I am encoding a large video file that on my 5-year-old laptop runs at 7X and finishes in about 5 minutes. But with 2X worker dynos on heroku it cant even finish before the 4 hour background job time limit. I didn't have any issues until 2 days ago and now its causing lots of probelms. If I run heroku run rails console and run the job manually, I see it start at 7X but then quickly go down to 2X and then 0.5X speed. Anyone know what is causing this issue ?

    


    I'm encoding a VP8 webm file to MP4. If anyone knows a faster way to do this that might also fix this issue that would be great too !

    


    ffmpeg -y -i #{temp_webm_file.path} -movflags faststart -preset ultrafast #{temp_mp4_file.path}

    


  • How to map frame extracted with ffmpeg and subtitle of a video ? (frame accuracy problem)

    14 novembre 2019, par Abitbol

    would like to generate text files for frames extracted with ffmpeg, containing subtitle of the frame if any, on a video for which I have burn the subtitles using ffmpeg also.

    I use a python script with pysrt to open the subrip file and generate the text files.
    What I am doing is that each frames is named with the frame number by ffmpeg, then and since they are extracted at a constant rate, I can easily retrieve the time position of the frame using the formula t1 = fnum/fps, where fnum is the number of the frame retrieved with the filename, and fps is the frequency passed to ffmpeg for the frame extraction.

    Even though I am using the same subtitle file to retrieve the text positions in the timeline, that the one that has been used in the video, I still get accuracy errors. Most I have some text files missing or some that shouldn’t be present.

    Because time is not really continuous when talking about frames, I have tried recalibrating t using the fps of the video wih the hardcoded subtitles, let’s call that fps vfps for video fps (I have ensured that the video fps is the same before and after subtitle burning). I get the formula : t2 = int(t1*vfps)/vfps.
    It still is not 100% accurate.

    For example, my video is at 30fps (vfps=30) and I extracted frames at 4fps (fps=4).
    The extracted frame 166 (fnum=166) shows no subtitle. In the subrip file, the previous subtitle ends at t_prev=41.330 and the next subtitle begins at t_next=41.400, which means that t_sub should satisfy : t_prev < t_sub and t_sub < t_next, but I can’t make this happen.

    Formulas I have tried :

    t1 = fnum/fps  # 41.5 > t_next
    t2 = int(fnum*vfps/fps)/vfps  # 41.5 > t_next
    # is it because of a indexing problem? No:
    t3 = (fnum-1)/fps  # 41.25 < t_prev
    t4 = int((fnum-1)*vfps/fps)/vfps  # 41.23333333 < t_prev
    t5 = int(fnum*vfps/fps - 1)/vfps  # 41.466666 > t_next
    t6 = int((fnum-1)*vfps/fps + 1)/vfps  # 41.26666 < t_prev

    Command used :

    # burning subtitles
    # (previously)
    # ffmpeg -r 25 -i nosub.mp4 -vf subtitles=sub.srt withsub.mp4
    # now:
    ffmpeg -i nosub.mp4 -vf subtitles=sub.srt withsub.mp4
    # frames extraction
    ffmpeg -i withsub.mp4 -vf fps=4 extracted/%05.bmp -hide_banner

    Why does this happen and how can I solve this ?

    One thing I have noticed is that if I extract frames of the original video and the subtitle ones, do a difference of the frames, the result is not only the subtitles, there are variations in the background (that shouldn’t happen). If I do the same experience using the same video two times, the difference is null, which means that the frame extraction is consistant.

    Code for the difference :

    ffmpeg -i withsub.mp4 -vf fps=4 extracted/%05.bmp -hide_banner
    ffmpeg -i no_sub.mp4 -vf fps=4 extracted_no_sub/%05.bmp -hide_banner
    for img in no_sub/*.bmp; do
       convert extracted/${img##*/} $img -compose minus -composite diff/${img##*/}
    done

    Thanks.

  • avcodec/nvdec : Use RefStruct-pool API for decoder pool

    6 août 2022, par Andreas Rheinhardt
    avcodec/nvdec : Use RefStruct-pool API for decoder pool
    

    It involves less allocations, in particular no allocations
    after the entry has been created. Therefore creating a new
    reference from an existing one can't fail and therefore
    need not be checked. It also avoids indirections and casts.

    Also note that nvdec_decoder_frame_init() (the callback
    to initialize new entries from the pool) does not use
    atomics to read and replace the number of entries
    currently used by the pool. This relies on nvdec (like
    most other hwaccels) not being run in a truely frame-threaded
    way.

    Tested-by : Timo Rothenpieler <timo@rothenpieler.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/nvdec.c
    • [DH] libavcodec/nvdec.h