Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (55)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (6009)

  • How I Can Run Some Part of the Code on another EC2 instance

    4 mai 2021, par Not A Bot —

    I have a NodeJS application running on an EC2 instance, which has some feature where users can record multiple videos.

    


    When the user logs out I am using (version 4.2.4) to combine all those videos into single a video.

    


    I am recording the video in WEBM format, and the final single video should be in MP4 format.

    


    Suppose the user has recorded 3 videos of 10 minutes each, then in last when the user logs out, all these 3 videos should be combined into the single video on length of 30 minutes.

    


    Now everything is working fine, but the CPU usage is high when all the conversation and concatenation are going around.

    


    CPU usage is sometimes as high as 60-70%

    


    The process I am following is

    


      

    1. Convert the webm file to the mp4 file.

      


      ffmpeg -i input_file.webm -c:v copy -c:a copy output_file.mp4


      


    2. 


    3. Convert MP4 to ts(Transport Stream) file.

      


       ffmpeg -i output_file.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts OUTPUT_MP4.ts


      


      I am following this process to concatenate all the mp4 files into one.

      


    4. 


    5. Concatenate files

      


      ffmpeg -i "concat:OUTPUT_MP4_1.ts|OUTPUT_MP4_2.ts|OUTPUT_MP4_3.ts" -c copy -bsf:a aac_adtstoasc FINAL_MP4_SINGLE_FILE.mp4


      


    6. 


    


    All this process is time-consuming(but not a priority), however, this process is taking CPU usage a lot.

    


    The server can crash or become slow if there are many users on my application and may video conversion is going on.

    


    Now, my question is how I can run this conversion process on the dedicated EC2 instance where only conversions can happen and not any other work, from the same code that is running on the first EC2 instance.

    


  • Chroma Key replace green color part with another image using FFMPEG

    15 septembre 2021, par Welborn Machado

    Chroma Key Image

    



    I want to replace green color of the above chromekey image with another image. The image should only replace with the green color not overlay entire image.

    



    I am using following sample command below but it overlay the entire image not only the green color.

    



    -y -i /storage/emulated/0/dummyResized.jpg -i /storage/emulated/0/circularImage.png -filter_complex [1:v]colorkey=green:0.3:0.2[ckout] ;[0:v][ckout]overlay[out] -map [out] /storage/emulated/0/outputBlackCircular.jpg

    


  • OpenCV : FFMPEG : tag 0x00000021/' !???' is not found (format 'mp4 / MP4 (MPEG-4 Part 14)')'

    10 juin 2020, par Hepo8421

    I got error when trying to run a python script. Iam trying to make a project based on pyimagesearch tutorial.

    



    Code :
In first script :

    



    filename = tempVideo.path[tempVideo.path.rfind("/") + 1:]
    s3.upload_file(tempVideo.path, self.conf["s3_bucket"],
        filename, ExtraArgs={"ACL": "public-read",
        "ContentType": "video/mp4"})


    



    In main script :

    



    tempVideo = TempFile(ext=".mp4")
    writer = cv2.VideoWriter(tempVideo.path, 0x21, 30, (W, H),
        True)


    



    Error I recieved :

    



    OpenCV: FFMPEG: tag 0x00000021/'!???' is not found (format 'mp4 / MP4 (MPEG-4 Part 14)')'
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/Desktop/pi-security-camera/pyimagesearch/notifications/twilionotifier.py", line 27, in _send
    "ContentType": "video/mp4"})
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/boto3/s3/inject.py", line 131, in upload_file
    extra_args=ExtraArgs, callback=Callback)
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/boto3/s3/transfer.py", line 279, in upload_file
    future.result()
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/s3transfer/futures.py", line 106, in result
    return self._coordinator.result()
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/s3transfer/futures.py", line 265, in result
    raise self._exception
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/s3transfer/tasks.py", line 255, in _main
    self._submit(transfer_future=transfer_future, **kwargs)
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/s3transfer/upload.py", line 549, in _submit
    upload_input_manager.provide_transfer_size(transfer_future)
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/s3transfer/upload.py", line 237, in provide_transfer_size
    transfer_future.meta.call_args.fileobj))
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/s3transfer/utils.py", line 245, in get_file_size
    return os.path.getsize(filename)
  File "/usr/lib/python3.7/genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: './/13675f07-ecec-48ae-97bf-32109eb3ed7d.mp4'


    



    Thanks for advices :)