Recherche avancée

Médias (91)

Autres articles (105)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (5361)

  • Recalculate the position of a larger object to re-align two different sized objects after rotation

    26 août 2022, par CRAIG

    I have 2 images I am placing on top of a 1080X1920 canvas.

    


    One is a rectangle that is 800x400 and it is sitting on the 1080X1920 canvas with top left coordinates of x=140 and y=1200

    


    enter image description here

    


    Then I have another image that is the same size of the canvas 1080X1920, but also has a rectangle on it at the exact same coordinates as the first rectangle. I am overlaying this 1080X1920 image at x=0 and y=0 on the canvas so that the rectangle already in this image lines up perfectly with the rectangle that is already placed on the canvas.

    


    enter image description here

    


    My problem is, I need to apply a rotation to both of these and the black and red rectangles need to match up in positioning AFTER the rotation is applied. Could be any rotation, but let's say it is a 15 degree rotation.

    


    When each element is placed on the canvas and then the 15 degree rotation is applied, the rectangles no longer align because of the difference in image size and the offset in rotation as they both rotate around the center point which looks to be my only option in this case.

    


    enter image description here

    


    So I am hoping to sort out a formula I can use that would rectify the positioning of the 1080X1920 image so that the object already embedded in that image lines up with separately overlaid image.

    


    There are of course other ways to deal with this problem, but right now, they would make things quite a bit more difficult, so I wanted to see if this was possible to calculate first.

    


    I have tried several ways to calculate this, but am not super mathematically proficient, so I am grasping at straws at best.

    


    Oh and because I am not extremely mathematically proficient, any dumbing-down of mathematical terms is appreciated. ;)

    


    Oh and possibly this post answers this question, but I can't wrap my head around whether or not it does, so if someone can let me know if it does, I will try harder to understand and apply it to my particular case.

    


    How to recalculate the coordinates of a point after scaling and rotation ?

    


  • FileNotFoundError on aws Lambda when concatenating videos with ffmpeg

    2 juillet 2021, par Shibu Menon

    Goal :

    



      

    • Concat 2 videos (both are in an s3 bucket) via aws Lambda using ffmpeg
    • 


    • Upload the resultant output.mp4 to another S3 bucket
    • 


    • Python 3+
    • 


    



    I've already created a layer containing a static ffmpeg

    



    The Error :

    



    {
  "errorMessage": "[Errno 2] No such file or directory: '/tmp/output.mp4'",
  "errorType": "FileNotFoundError",
  "stackTrace": [
    [
      "/var/task/lambda_function.py",
      19,
      "lambda_handler",
      "s3.Object(bucketLowRes, mp4OutputFileName).put(Body=open(new_file_key, 'rb'))"
    ]
  ]
}


    



    My Lambda function :

    



    import json
import os
import subprocess
import boto3

s3 = boto3.resource('s3')
bucketLowRes = s3.Bucket("bucket-conc-lowres")

def lambda_handler(event, context):
    # TODO implement

    mp4OutputFileName = 'output.mp4'

    new_file_key = os.path.abspath(os.path.join(os.sep, 'tmp', mp4OutputFileName))
    subprocess.call( ['/opt/ffmpeg', '-i', 'concat:s3://bucket-word-clips/00th76kqwfs915hbixycb77y9v3riwsj30.mp4|s3://bucket-word-clips/00uoakp6jyafbu13ycvl6w2i9tj42eux30.mp4', new_file_key ] )

    s3.Object(bucketLowRes, mp4OutputFileName).put(Body=open(new_file_key, 'rb'))

    return {
        'statusCode': 200,
        'body': json.dumps('Hello from Lambda!')
    }


    



    Question :

    



      

    • FileNotFoundError : Where is the output mp4 file of my ffmpeg concat being saved ??
    • 


    • And if it is being saved to /tmp/output.mp4 , then why the FileNotFoundError ??
    • 


    



    thanks

    


  • Ffmpeg examples run in debug mode [on hold]

    25 août 2017, par Saeid Zangeneh

    I’m not so professional in c and cpp. I want to run FFmpeg official examples but there are many errors on include files. I can’t solve them.

    below output :when i try to run or debug the sample code

    debug output :

    cd '/home/saeid/NetBeansProjects/CppApplication_2'
    /usr/bin/make -f Makefile CONF=Debug
    "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-  conf
    make[1]: Entering directory '/home/saeid/NetBeansProjects
    /CppApplication_2'

    "/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-
    Linux/cppapplication_2

    make[2]: Entering directory '/home/saeid/NetBeansProjects
    /CppApplication_2'

    mkdir -p dist/Debug/GNU-Linux

    gcc     -o dist/Debug/GNU-Linux/cppapplication_2 build/Debug/GNU-
    Linux/sample.o

    build/Debug/GNU-Linux/sample.o: In function `select_channel_layout':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:87: undefined
    reference to `av_get_channel_layout_nb_channels'

    build/Debug/GNU-Linux/sample.o: In function `audio_encode_example':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:112: undefined
    reference to `avcodec_find_encoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:117: undefined
    reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:127: undefined
    reference to `av_get_sample_fmt_name'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:134: undefined
    reference to `av_get_channel_layout_nb_channels'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:136: undefined
    reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:146: undefined
    reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:156: undefined
    reference to `av_samples_get_buffer_size'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:162: undefined
    reference to `av_malloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:169: undefined
    reference to `avcodec_fill_audio_frame'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:179: undefined
    reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:183: undefined
    reference to `sin'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:189: undefined
    reference to `avcodec_encode_audio2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:196: undefined
    reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:201: undefined
    reference to `avcodec_encode_audio2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:208: undefined
    reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:212: undefined
    reference to `av_freep'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:213: undefined
    reference to `av_frame_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:214: undefined
    reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:215: undefined
    reference to `av_free'

    build/Debug/GNU-Linux/sample.o: In function `audio_decode_example':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:229: undefined
    reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:232: undefined
    reference to `avcodec_find_decoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:237: undefined
    reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:243: undefined
    reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:254: undefined
    reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:264: undefined
    reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:269: undefined
    reference to `avcodec_decode_audio4'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:276: undefined
    reference to `av_get_bytes_per_sample'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:305: undefined reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:306: undefined reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:307: undefined reference to `av_frame_free'

    build/Debug/GNU-Linux/sample.o : In function `video_encode_example’ :

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:323: undefined reference to `avcodec_find_encoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:328: undefined reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:350: undefined reference to `av_opt_set'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:352: undefined reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:361: undefined reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:371: undefined reference to `av_image_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:379: undefined reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:399: undefined reference to `avcodec_encode_video2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:407: undefined reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:413: undefined reference to `avcodec_encode_video2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:421: undefined reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:427: undefined reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:428: undefined reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:429: undefined reference to `av_freep'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:430: undefined reference to `av_frame_free'

    build/Debug/GNU-Linux/sample.o: In function `decode_write_frame':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:452: undefined reference to `avcodec_decode_video2'

    build/Debug/GNU-Linux/sample.o : In function `video_decode_example’ :

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:481: undefined reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:486: undefined reference to `avcodec_find_decoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:491: undefined reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:502: undefined reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:511: undefined reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:545: undefined reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:546: undefined reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:547: undefined reference to `av_frame_free'

    build/Debug/GNU-Linux/sample.o: In function `main':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:556: undefined
    reference to `avcodec_register_all'

    collect2: error: ld returned 1 exit status

    nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/GNU-
    Linux/cppapplication_2' failed

    make[2]: *** [dist/Debug/GNU-Linux/cppapplication_2] Error 1

    make[2]: Leaving directory '/home/saeid/NetBeansProjects/CppApplication_2'

    nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed

    make[1]: *** [.build-conf] Error 2

    make[1]: Leaving directory '/home/saeid/NetBeansProjects/CppApplication_2'

    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

    make: *** [.build-impl] Error 2