Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (82)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (8528)

  • libavfilter/scale2ref : Add constants for the primary input

    30 mai 2017, par Kevin Mark
    libavfilter/scale2ref : Add constants for the primary input
    

    Variables pertaining to the main video are now available when
    using the scale2ref filter. This allows, as an example, scaling a
    video with another as a reference point while maintaining the
    original aspect ratio of the primary/non-reference video.

    Consider the following graph : scale2ref=iw/6 :-1 [main][ref]
    This will scale [main] to 1/6 the width of [ref] while maintaining
    the aspect ratio. This works well when the AR of [ref] is equal to
    the AR of [main] only. What the above filter really does is
    maintain the AR of [ref] when scaling [main]. So in all non-same-AR
    situations [main] will appear stretched or compressed to conform to
    the same AR of the reference video. Without doing this calculation
    externally there is no way to scale in reference to another input
    while maintaining AR in libavfilter.

    To make this possible, we introduce eight new constants to be used
    in the w and h expressions only in the scale2ref filter :

    * main_w/main_h : width/height of the main input video
    * main_a : aspect ratio of the main input video
    * main_sar : sample aspect ratio of the main input video
    * main_dar : display aspect ratio of the main input video
    * main_hsub/main_vsub : horiz/vert chroma subsample vals of main
    * mdar : a shorthand alias of main_dar

    Of course, not all of these constants are needed for maintaining the
    AR, but adding additional constants in line of what is available for
    in/out allows for other scaling possibilities I have not imagined.

    So to now scale a video to 1/6 the size of another video using the
    width and maintaining its own aspect ratio you can do this :

    scale2ref=iw/6:ow/mdar [main][ref]

    This is ideal for picture-in-picture configurations where you could
    have a square or 4:3 video overlaid on a corner of a larger 16:9
    feed all while keeping the scaled video in the corner at its correct
    aspect ratio and always the same size relative to the larger video.

    I've tried to re-use as much code as possible. I could not find a way
    to avoid duplication of the var_names array. It must now be kept in
    sync with the other (the normal one and the scale2ref one) for
    everything to work which does not seem ideal. For every new variable
    introduced/removed into/from the normal scale filter one must be
    added/removed to/from the scale2ref version. Suggestions on how to
    avoid var_names duplication are welcome.

    var_values has been increased to always be large enough for the
    additional scale2ref variables. I do not forsee this being a problem
    as the names variable will always be the correct size. From my
    understanding of av_expr_parse_and_eval it will stop processing
    variables when it runs out of names even though there may be
    additional (potentially uninitialized) entries in the values array.
    The ideal solution here would be using a variable-length array but
    that is unsupported in C90.

    This patch does not remove any functionality and is strictly a
    feature patch. There are no API changes. Behavior does not change for
    any previously valid inputs.

    The applicable documentation has also been updated.

    Signed-off-by : Kevin Mark <kmark937@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] doc/filters.texi
    • [DH] libavfilter/scale.c
  • ffmpeg padding doesn't scale when changing resolution

    5 mars 2023, par Martin

    I have a ffmpeg command which takes a bunch of audio files, 3 image files, and renders a video with them.

    &#xA;

    Image Input Dimmensions :

    &#xA;

      &#xA;
    • 1_front.jpg 600w x 593h
    • &#xA;

    • 2_back.jpg 600w x 466h
    • &#xA;

    • 3_cd.jpg 600w x 598h
    • &#xA;

    &#xA;

    The video has a resolution of w=600 h=593, which is the resolution of the first img.

    &#xA;

    Here's the full command

    &#xA;

    ffmpeg&#xA; -r 2 -i "E:\filepath\10. Deejay Punk-Roc - Knock &#x27;em All The Way Out.aiff"&#xA; -r 2 -i "E:\filepath\11. Deejay Punk-Roc - Spring Break.aiff" -r 2 -i "E:\filepath\12. Deejay Punk-Roc - Fat Gold Chain.aiff" &#xA; -r 2 -i "E:\filepath\1_front.jpg" -r 2 -i "E:\filepath\2_back.jpg" -r 2 -i "E:\filepath\3_cd.jpg" &#xA; &#xA; -filter_complex &#xA; "&#xA; [0:a][1:a][2:a]concat=n=3:v=0:a=1[a]; &#xA; &#xA; [3:v]scale=w=600:h=593,setsar=1,loop=580.03:580.03[v3]; &#xA;&#xA; [4:v]pad=600:593:0:63:color=pink,setsar=1,loop=580.03:580.03[v4];&#xA; &#xA; [5:v]scale=w=600:h=593,setsar=1,loop=580.03:580.03[v5];&#xA; &#xA; [v3][v4][v5]concat=n=3:v=1:a=0,pad=ceil(iw/2)*2:ceil(ih/2)*2[v]"&#xA; &#xA;  -map "[v]" -map "[a]" -c:a pcm_s32le -c:v libx264 -bufsize 3M -crf 18 -pix_fmt yuv420p -tune stillimage -t 870.04 &#xA;  "E:\filepath\vidOutPutCorrect.mkv"&#xA;&#xA;

    &#xA;

    For filter_complex this second part will add padding to the second image so that it does not get stretched or cropped.

    &#xA;

    [4:v]pad=600:593:0:63:color=pink,setsar=1,loop=580.03:580.03[v4];&#xA;

    &#xA;

    Specifically this part

    &#xA;

    pad=600:593:0:63:color=pink&#xA;

    &#xA;

    Which I understand means w=600 and h=593, but i dont know that the last part 0:63 means.

    &#xA;

    You can see the output has the pink padding correctly&#xA;enter image description here

    &#xA;

    but i want to render the video with a resolution of w=1920 h=1898 instead of w=600 h=593.

    &#xA;

    So i update the command to have this new resolution :

    &#xA;

    ffmpeg -r 2 -i "E:\filepath\10. Deejay Punk-Roc - Knock &#x27;em All The Way Out.aiff" -r 2 -i "E:\filepath\11. Deejay Punk-Roc - Spring Break.aiff" -r 2 -i "E:\filepath\12. Deejay Punk-Roc - Fat Gold Chain.aiff" -r 2 -i "E:\filepath\1_front.jpg" -r 2 -i "E:\filepath\2_back.jpg" -r 2 -i "E:\filepath\3_cd.jpg" &#xA;&#xA;-filter_complex "&#xA;[0:a][1:a][2:a]concat=n=3:v=0:a=1[a];&#xA;&#xA;[3:v]scale=w=1920:h=1898,setsar=1,loop=580.03:580.03[v3];&#xA;&#xA;[4:v]pad=1920:1898:0:63:color=pink,setsar=1,loop=580.03:580.03[v4];&#xA;&#xA;[5:v]scale=w=1920:h=1898,setsar=1,loop=580.03:580.03[v5];&#xA;&#xA;[v3][v4][v5]concat=n=3:v=1:a=0,pad=ceil(iw/2)*2:ceil(ih/2)*2[v]"&#xA;&#xA; -map "[v]" -map "[a]" -c:a pcm_s32le -c:v libx264 -bufsize 3M -crf 18 -pix_fmt yuv420p -tune stillimage -t 870.04 "E:\filepath\slidet.mkv"&#xA;

    &#xA;

    my video does in fact now have a resolution of 1920x1798 which is great, but the 2nd image padding portion has the image super small and in a corner

    &#xA;

    enter image description here

    &#xA;

    So this line works :

    &#xA;

    pad=600:593:0:63:color=pink&#xA;

    &#xA;

    but with a different resolution is looks bad with the image in the top left corner

    &#xA;

    pad=1920:1898:0:63:color=pink&#xA;

    &#xA;

    What do I need to change 0:63 to in order to have the image be centered ?

    &#xA;

    Download files : http://www.mediafire.com/folder/e8ja1n8elszk1lu,dxw4vglrz7polyh,ojjx6kcqruksv5r,lah9rano4svj46o,q5jg0083vbj9y1p,d3pt8ydf3ulqm5m/shared

    &#xA;

  • Revision 37406 : Le cron toute les minutes Amélioration de pleins de petites choses ...

    18 avril 2010, par kent1@… — Log

    Le cron toute les minutes
    Amélioration de pleins de petites choses
    Incrément mineur de la version