Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (51)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (7178)

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

    


  • In Python, why do 'writer' is considered to be as an unexpected keyword argument for save

    23 mars 2014, par Strömungsmechanik

    I would like to save an animation using the function save in Python. During compilation, I get the following message :

    anim.save('mymovie.mp4',writer="ffmpeg")
    TypeError: save() got an unexpected keyword argument 'writer'

    Please note that I have installed successfully FFmpeg. Here is a minimal working environment :

    import numpy as np
    from matplotlib import pyplot as plt
    from matplotlib import animation
    from numpy import pi

    X,Y = np.meshgrid(np.arange(0,2*np.pi,.2),np.arange(0,2*np.pi,.2) )  
    U = np.cos(X)
    V = np.sin(Y)

    fig,ax = plt.subplots(1,1)
    Q = ax.quiver( X, Y, U, V, pivot='mid', color='r', units='inches')

    ax.set_xlim(0, 2*pi)
    ax.set_ylim(0, 2*pi)

    def update_quiver(num, Q, X, Y):
       U = np.cos(X + num*0.1)
       V = np.sin(Y + num*0.1)
       Q.set_UVC(U,V)
       return Q,

    anim = animation.FuncAnimation(fig, update_quiver, fargs=(Q, X, Y),
       interval=10, blit=False)

    anim.save('mymovie.mp4',writer="ffmpeg")