Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (96)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • 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 (...)

Sur d’autres sites (9937)

  • How to save media files to Heroku local storage with Django ?

    25 juillet 2022, par Diyan Kalaydzhiev

    Im having a Django REST app with React for client. Im recording a file with React and sending in to Django. When i save it i modify it with ffmpeg and save it again in the same folder with a new name, the ffmpeg command looks like this :

    


    os.system(f"ffmpeg -i {audio_path} -ac 1 -ar 16000 {target_path}")

    


    Because i need a path for my audio both for opening and saving, i can't use cloud stores like "Bucket S3, Cloudinary etc.". And the fact that im using it only for a few seconds and then deleting it makes Heroku (the app is deployed there) the perfect place to save it non-persistent. The problem is that the file isn't getting saved in my library with media files. It saves in the postgre db but doesn't in my filesystem and when i try to access it my program returns that there isn't a file with that name. My question is How can i save media files in Heroku file system and how to access them ?

    


    settings.py

    


    MEDIA_ROOT = os.path.join(BASE_DIR,'EmotionTalk/AI_emotion_recognizer/recordings')
MEDIA_URL = '/'


    


    urls.py

    


    urlpatterns = [
path('admin/', admin.site.urls),
path('', include('EmotionTalk.emotion_talk_app.urls')),
path('auth/', include('EmotionTalk.auth_app.urls')),
path('api-token-auth/', views.obtain_auth_token),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


    


    views.py

    


        def post(self, request):
    file_serializer = RecordingSerializer(data=request.data)

    if file_serializer.is_valid():
        file_serializer.save()

        file_name = file_serializer.data.get('recording')
        owner_id = file_serializer.data.get('owner_id')

        current_emotions_count = len(Profile.objects.get(user_id=owner_id).last_emotions)

        print(file_name)
        recognize_emotion.delay(file_name, owner_id)

        return Response({
            'data': file_serializer.data,
            'current_emotions_count': current_emotions_count
        }, status=status.HTTP_201_CREATED)

    return Response(file_serializer.errors, status=status.HTTP_400_BAD_REQUEST)


    


    tasks.py

    


    def parse_arguments(filename):
import argparse
parser = argparse.ArgumentParser()

new_filename = filename.lstrip('v')

parser.add_argument("audio_path")
parser.add_argument("target_path")

args = parser.parse_args([f'EmotionTalk/AI_emotion_recognizer/recordings/{filename}',
                          f'EmotionTalk/AI_emotion_recognizer/recordings/{new_filename}'])
audio_path = args.audio_path
target_path = args.target_path

if os.path.isfile(audio_path) and audio_path.endswith(".wav"):
    if not target_path.endswith(".wav"):
        target_path += ".wav"
    convert_audio(audio_path, target_path)
    return target_path
else:
    raise TypeError("The audio_path file you specified isn't appropriate for this operation")


    


    parse_arguments is called from recognize_emotion

    


  • Save screenshots taken with FFmpeg into Amazon S3 bucket

    30 mars 2021, par HomeAlone

    In my python app I take screenshots of videos. I save them locally and it works just fine but now I want to save them in an Amazon S3 bucket.

    


    subprocess.run(["ffmpeg", "-ss", "00:00:30", "-i", src, "-map", "0:v", "-vframes", "1", "pipe:pic.jpeg | aws s3 cp - s3://mypublicbucket"])


    


    I get an Unable to find a suitable output format when running this command. What I try to do is to upload the picture straight into my public amazon bucket.

    


  • How can I save the RAW rtp output file by ffmpeg

    13 septembre 2016, par Jeromy

    I have a problem that to save Output RTP as a file.
    (Is that a possible ? Am I Right ?)

    Trans-coding goal as below :
    1. Save the RTP stream to file in local storage using FFMPEG.
    2. Input is file.
    3. Output is RTP stream file.

    I`m using that.

    ./ffmpeg -re -i ../Video_Sample/03.Fashion_DivX720p_ASP_87s_1000k_720p.mp4 -c:v libx264 -b:v 1000k -preset superfast -an -f rtp -y test.rtp

    But I got a message like that :

    Could not write header for output file #0 (incorrect codec parameters ?) : Invalid argument

    How can I fix it ?