Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (98)

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

Sur d’autres sites (8933)

  • Crop video scale square to round shape -Android

    13 septembre 2019, par Adil

    Currently I’m developing video editing app, in which i want to overlay video to image i used FFMPEG library and use overlay command and export video to video.mp4 format

    Here is done with overlay command :

    private void extractImagesVideo() {
       File moviesDir = Environment.getExternalStoragePublicDirectory(
       Environment.DIRECTORY_PICTURES
    );

    String filePrefix = "extract_picture";
    String fileExtn = ".mp4";

    File dir = new File(moviesDir, "VideoEditor");
    int fileNo = 0;
    while (dir.exists()) {
    fileNo++;
    dir = new File(moviesDir, "VideoEditor" + fileNo);

    }
    dir.mkdir();
    File dest = new File(dir, filePrefix + "%03d" + fileExtn);

    Log.d(TAG, "startTrim: dest: " + dest.getAbsolutePath());

    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[0]scale=720:1280:force_original_aspect_ratio=decrease,drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=max: (ow-iw)/2:(oh-ih)/2,setsar=1[backd],[backd][1] overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h)","-acodec","copy",dest.getAbsolutePath()};

    String complexCommand[]={"-y","-i",mStrVideoPath,"-f","lavfi","-i","color=c=black:s=1920x1080","-filter_complex","[0:v]scale=w=0.80*iw:h=0.80*ih[scaled],[1:v][scaled]overlay=x=0.10*main_w:y=0.10*main_h:eof_action=endall[out]","-acodec","copy",dest.getAbsolutePath()};


    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[1:v] scale=200:200 [ovr1], [1:v] scale=200:200 [ovrl2], [0:v][ovr1] overlay=25:25:enable='between(t,0,20)' [temp1], [temp1][ovrl2] overlay=50:50:enable='between(t,20,40)'","-acodec","copy",dest.getAbsolutePath()};
    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[0]scale=1024:1280:force_original_aspect_ratio=decrease,pad=1024:1280:(ow-iw)/2:(oh-ih)/2,setsar=1[backd],[backd][1] overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h):shortest=1","-acodec","copy",dest.getAbsolutePath()};

    /* Remove -r 1 if you want to extract all video frames as images from the specified time duration.*/
    execFFmpegBinary(complexCommand);
    }

    Issue is video showing square shape i want to crop video into rounded shape, i check almost solutions and check also FFMPEG commands , i found mask overlay on video but isn’t a proper solution

  • How can I avoid an ffmpeg out of memory error

    21 mars 2021, par Silentfury

    I use ffmpeg with complex filtering. Input are different sets of FULLHD surveilance camera videos each 10 to 15 seconds long. Set size (number of videos per set) varies. To remove unchanged frames I apply mpdecimate. To avoid being triggered by moving bushes but still keep objects I want to remain, I apply a complex filter :

    


      

    • split the video (the original and a dummy to detect motion/stills)
    • 


    • scale the dummy down (so the 8x8-block-metric of mpdecimate matches the size of moving objects I want to keep)
    • 


    • add white boxes to dummy to mask unintendedly moving objects
    • 


    • apply mpdecimate to dummy to remove non-changing frames
    • 


    • scale dummy back to original size
    • 


    • overlay the remaining frames of dummy with matching frames of original
    • 


    


    All this works fine if the number of input videos is small (less than 100). The memory consupmtion of the ffmpeg process varies somewhere between 2GiB and 5GiB.

    


    If the number of input files gets larger (say 200), the memory consumption suddenly jumps to insane numbers until memory (32GiB plus 33GiB swap) runs out and ffmpeg gets killed. I can not predict if and why this happens. I have one example, where a set of 340 videos worked using 6GiB. Any other set above 100 videos I tried eats all RAM in under two minutes and dies.

    


    There is no particular error message from ffmpeg.

    


    dmesg says :

    


    Out of memory: Kill process 29173 (ffmpeg)
Killed process 29173 (ffmpeg) total-vm:66707800kB


    


    My ffmpeg command :

    


    ffmpeg -f concat -safe 0 -i vidlist -vf 'split=2[full][masked];[masked]scale=w=iw/4:h=ih/4,drawbox=w=51:h=153:x=101:y=0:t=fill:c=white,drawbox=w=74:h=67:x=86:y=49:t=fill:c=white,drawbox=w=51:h=149:x=258:y=0:t=fill:c=white,drawbox=w=13:h=20:x=214:y=103:t=fill:c=white,drawbox=w=29:h=54:x=429:y=40:t=fill:c=white,drawbox=w=35:h=49:x=360:y=111:t=fill:c=white,drawbox=w=26:h=54:x=304:y=92:t=fill:c=white,drawbox=w=48:h=27:x=356:y=105:t=fill:c=white,drawbox=w=30:h=27:x=188:y=124:t=fill:c=white,drawbox=w=50:h=54:x=371:y=7:t=fill:c=white,drawbox=w=18:h=38:x=248:y=107:t=fill:c=white,drawbox=w=21:h=51:x=242:y=33:t=fill:c=white,mpdecimate=hi=64*80:lo=64*40:frac=0.001,scale=w=iw*4:h=ih*4[deduped];[deduped][full]overlay=shortest=1,setpts=N/(15*TB),mpdecimate=hi=64*80:lo=64*50:frac=0.001,setpts=N/(15*TB)' -r 15 -c:v libx265 -preset slower -crf 37 -pix_fmt yuv420p -an result.mkv


    


    ffmpeg version 4.1.6

    


    Debian 4.19.171-2

    


    I hope that my filter can be tuned in some way that achieves the same result but doesn't eat RAM that much - but I have no clue how. Within reasonable limits, I wouldn't mind if processing time suffers. Any hints appreciated.

    


  • x86 : Remove X264_CPU_SSE_MISALIGN functions

    5 juillet 2013, par Henrik Gramner
    x86 : Remove X264_CPU_SSE_MISALIGN functions
    

    Prevents a crash if the misaligned exception mask bit is cleared for some reason.

    Misaligned SSE functions are only used on AMD Phenom CPUs and the benefit is miniscule.
    They also require modifying the MXCSR control register and by removing those functions
    we can get rid of that complexity altogether.

    VEX-encoded instructions also supports unaligned memory operands. I tried adding AVX
    implementations of all removed functions but there were no performance improvements on
    Ivy Bridge. pixel_sad_x3 and pixel_sad_x4 had significant code size reductions though
    so I kept them and added some minor cosmetics fixes and tweaks.

    • [DH] common/cpu.c
    • [DH] common/cpu.h
    • [DH] common/pixel.c
    • [DH] common/x86/cpu-a.asm
    • [DH] common/x86/mc-a.asm
    • [DH] common/x86/mc-a2.asm
    • [DH] common/x86/mc-c.c
    • [DH] common/x86/pixel.h
    • [DH] common/x86/sad-a.asm
    • [DH] common/x86/x86inc.asm
    • [DH] encoder/encoder.c
    • [DH] encoder/lookahead.c
    • [DH] tools/checkasm.c
    • [DH] x264.h