Recherche avancée

Médias (91)

Autres articles (89)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (9433)

  • AWS lambda SAM deploy error - Template format error : Unresolved resource dependencies

    1er juin 2022, par mozenge

    I have am trying to deploy an aws lambda function using the SAM cli. I have some layers defined in the sam template. Testing locally using sam local start-api works quite well. The but deploying using the sam deploy --guided command throws the following error
Error: Failed to create changeset for the stack: sam-app, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Template format error: Unresolved resource dependencies [arn:aws:lambda:us-west-1:338231645678:layer:ffmpeg:1] in the Resources block of the template

    


    The SAM template is as follows

    


    AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
  video-processor-functions

  Functions to generate gif and thumbnail from uploaded videos
  
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
  Function:
    Timeout: 3
    Tracing: Active

Resources:
  VideoProcessorFunctions:
    Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
    Properties:
      CodeUri: src/
      Handler: app.lambdaHandler
      Runtime: nodejs14.x
      # timeout in seconds - 2 minutes
      Timeout: 120
      Layers:
        - !Ref VideoProcessorDepLayer
        - !Ref arn:aws:lambda:us-west-1:338231645678:layer:ffmpeg:1
      Architectures:
        - x86_64
      Events:
        HelloWorld:
          Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
          Properties:
            Path: /hello
            Method: get

  VideoProcessorDepLayer:
    Type: AWS::Serverless::LayerVersion
    Properties:
      LayerName: mh-video-processor-dependencies
      Description: Dependencies for sam app [video-processor-functions]
      ContentUri: dependencies/
      CompatibleRuntimes:
        - nodejs14.17
      LicenseInfo: 'MIT'
      RetentionPolicy: Retain

Outputs:
  # ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
  # Find out more about other implicit resources you can reference within SAM
  # https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api
  HelloWorldApi:
    Description: "API Gateway endpoint URL for Prod stage for Hello World function"
    Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
  VideoProcessorFunctions:
    Description: "Generate GIF and Thumnail from Video"
    Value: !GetAtt VideoProcessorFunctions.Arn
  VideoProcessorFunctionsIamRole:
    Description: "Implicit IAM Role created for MH Video Processor function"
    Value: !GetAtt VideoProcessorFunctionsRole.Arn



    


    Any ideas what i'm doing wrong ?

    


  • Why is chrominance lost when i OpenSharedResource from a ffmpeg AVFrame resource ?

    19 avril 2022, par Logoro
    D3D11_TEXTURE2D_DESC texture_desc = {0};&#xA;texture_desc.Width = 640;&#xA;texture_desc.Height = 480;&#xA;texture_desc.MipLevels = 1;&#xA;texture_desc.Format = DXGI_FORMAT_NV12;&#xA;texture_desc.SampleDesc.Count = 1;&#xA;texture_desc.ArraySize = 1;&#xA;texture_desc.Usage = D3D11_USAGE_DEFAULT;&#xA;texture_desc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;&#xA;&#xA;Microsoft::WRL::ComPtr<id3d11texture2d> temp_texture_for_my_device{nullptr};&#xA;my_device->CreateTexture2D(&amp;texture_desc, NULL, &amp;temp_texture_for_my_device);&#xA;&#xA;Microsoft::WRL::ComPtr<idxgiresource> dxgi_resource{nullptr};&#xA;temp_texture_for_my_device.As(&amp;dxgi_resource);&#xA;HANDLE shared_handle = NULL;&#xA;dxgi_resource->GetSharedHandle(&amp;shared_handle);&#xA;dxgi_resource->Release();&#xA;&#xA;Microsoft::WRL::ComPtr<id3d11texture2d> temp_texture_for_ffmpeg_device {nullptr};&#xA;ffmpeg_device->OpenSharedResource(shared_handle, __uuidof(ID3D11Texture2D), (void**)temp_texture_for_ffmpeg_device.GetAddressOf());&#xA;ffmpeg_device_context->CopySubresourceRegion(temp_texture_for_ffmpeg_device.Get(), 0, 0, 0, 0, (ID3D11Texture2D*)ffmpeg_avframe->data[0], (int)ffmpeg_avframe->data[1], NULL);&#xA;ffmpeg_device_context->Flush();&#xA;</id3d11texture2d></idxgiresource></id3d11texture2d>

    &#xA;

    I copy temp_texture_for_ffmpeg_device to a D3D11_USAGE_STAGING, it's normal, but when i copy temp_texture_for_my_device to a D3D11_USAGE_STAGING, i lost the chrominance data.

    &#xA;

    When i map the texture to cpu via D3D11_USAGE_STAGING :

    &#xA;

    temp_texture_for_ffmpeg_device : RowPitch is 768, DepthPitch is 768 * 720.&#xA;temp_texture_for_my_device : RowPitch is 1024, DepthPitch is 1024 * 480.

    &#xA;

    I think there are some different parameters between the two devices(or device context ?), but I don't know what parameters would cause such a difference in behavior.

    &#xA;

    my_device and my_device_context are created by D3D11On12CreateDevice

    &#xA;

  • FFMPEG BlockingIOError : [Errno 11] Resource temporarily unavailable

    18 septembre 2021, par mugetsu

    I have a multiprocess pool calling different instances of ffmpeg and outputing a video file. Some of these videos are hundreds of megabytes and take a while to create. I'm seemingly getting IO bottlenecked :

    &#xA;

      File "", line 2, in write_videofile&#xA;  File "/home/xxx/.local/lib/python3.7/site-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default&#xA;    return f(clip, *new_a, **new_kw)&#xA;  File "", line 2, in write_videofile&#xA;  File "/home/xxx/.local/lib/python3.7/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB&#xA;    return f(clip, *a, **k)&#xA;  File "/home/xxx/.local/lib/python3.7/site-packages/moviepy/video/VideoClip.py", line 307, in write_videofile&#xA;    logger=logger)&#xA;  File "/home/xxx/.local/lib/python3.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 216, in ffmpeg_write_video&#xA;    ffmpeg_params=ffmpeg_params) as writer:&#xA;  File "/home/xxx/.local/lib/python3.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 129, in __init__&#xA;    self.proc = sp.Popen(cmd, **popen_params)&#xA;  File "/usr/lib64/python3.7/subprocess.py", line 800, in __init__&#xA;    restore_signals, start_new_session)&#xA;  File "/usr/lib64/python3.7/subprocess.py", line 1482, in _execute_child&#xA;    restore_signals, start_new_session, preexec_fn)&#xA;BlockingIOError: [Errno 11] Resource temporarily unavailable&#xA;"""&#xA;

    &#xA;

    This is weird but iotop never shows me with more than 10% io. My CPU is doing fine too, I have plenty of idle cores when this is running.

    &#xA;

    The error here shows that its happening on ffmpeg_write, so clearly an IO constraint.

    &#xA;

    Is there a way to make the write call threaded(I assume that's the fix) ? Is that ok even though this is happening in a multiprocess pool ?

    &#xA;