Recherche avancée

Médias (91)

Autres articles (46)

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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

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

Sur d’autres sites (3500)

  • ffmpeg started with initial_pause won't play

    25 janvier 2015, par ComputerSaysNo

    I need to :

    • connect to RTSP server
    • send all RTSP commands except PLAY(hence the ’initial_pause’ option)
    • send custom packet to server via GET_PARAMETER command
    • send PLAY command <- this does not work

    I am successfully sending and receiving data using ffurl_write/read, after which I’m sending av_read_play(context) <- this is being sent correctly and receives response(network sniffer says so), however, ffmpeg is not able to find the video codec for some reason, error :

    [rtsp @ 0x7fff0a858800] Could not find codec parameters for stream 0 (Video : h264) : unspecified size
    Consider increasing the value for the ’analyzeduration’ and ’probesize’ options

    I did increase the probsize and analyzeduration to obscene values without luck.

    My question is : how can I resume/play the stream, what am I missing ?

    Feel free to ask any additional questions that may help in finding the issue.

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

    &#xA;

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

    &#xA;

    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 ?

    &#xA;

    settings.py

    &#xA;

    MEDIA_ROOT = os.path.join(BASE_DIR,&#x27;EmotionTalk/AI_emotion_recognizer/recordings&#x27;)&#xA;MEDIA_URL = &#x27;/&#x27;&#xA;

    &#xA;

    urls.py

    &#xA;

    urlpatterns = [&#xA;path(&#x27;admin/&#x27;, admin.site.urls),&#xA;path(&#x27;&#x27;, include(&#x27;EmotionTalk.emotion_talk_app.urls&#x27;)),&#xA;path(&#x27;auth/&#x27;, include(&#x27;EmotionTalk.auth_app.urls&#x27;)),&#xA;path(&#x27;api-token-auth/&#x27;, views.obtain_auth_token),&#xA;] &#x2B; static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \&#xA;&#x2B; static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)&#xA;

    &#xA;

    views.py

    &#xA;

        def post(self, request):&#xA;    file_serializer = RecordingSerializer(data=request.data)&#xA;&#xA;    if file_serializer.is_valid():&#xA;        file_serializer.save()&#xA;&#xA;        file_name = file_serializer.data.get(&#x27;recording&#x27;)&#xA;        owner_id = file_serializer.data.get(&#x27;owner_id&#x27;)&#xA;&#xA;        current_emotions_count = len(Profile.objects.get(user_id=owner_id).last_emotions)&#xA;&#xA;        print(file_name)&#xA;        recognize_emotion.delay(file_name, owner_id)&#xA;&#xA;        return Response({&#xA;            &#x27;data&#x27;: file_serializer.data,&#xA;            &#x27;current_emotions_count&#x27;: current_emotions_count&#xA;        }, status=status.HTTP_201_CREATED)&#xA;&#xA;    return Response(file_serializer.errors, status=status.HTTP_400_BAD_REQUEST)&#xA;

    &#xA;

    tasks.py

    &#xA;

    def parse_arguments(filename):&#xA;import argparse&#xA;parser = argparse.ArgumentParser()&#xA;&#xA;new_filename = filename.lstrip(&#x27;v&#x27;)&#xA;&#xA;parser.add_argument("audio_path")&#xA;parser.add_argument("target_path")&#xA;&#xA;args = parser.parse_args([f&#x27;EmotionTalk/AI_emotion_recognizer/recordings/{filename}&#x27;,&#xA;                          f&#x27;EmotionTalk/AI_emotion_recognizer/recordings/{new_filename}&#x27;])&#xA;audio_path = args.audio_path&#xA;target_path = args.target_path&#xA;&#xA;if os.path.isfile(audio_path) and audio_path.endswith(".wav"):&#xA;    if not target_path.endswith(".wav"):&#xA;        target_path &#x2B;= ".wav"&#xA;    convert_audio(audio_path, target_path)&#xA;    return target_path&#xA;else:&#xA;    raise TypeError("The audio_path file you specified isn&#x27;t appropriate for this operation")&#xA;

    &#xA;

    parse_arguments is called from recognize_emotion

    &#xA;

  • shell scripting no such file or directory

    15 mars 2018, par Toto Tata

    I wrote a shell script that calls the ffmpeg tool but when I run it, it says No such file or directory yet it does !

    Here is my script :

    #!/bin/bash

    MAIN_DIR="/media/sf_data/pipeline"

    FFMPEG_DIR="/media/sf_data/livraison_transcripts/ffmpeg-git-20180208-64bit-static"

    for file in MAIN_DIR/audio_mp3/*.mp3;
    do
       cp -p file FFMPEG_DIR;
    done

    for file in FFMPEG_DIR/*.mp3;
    do
       ./ffmpeg -i ${file%.mp3}.ogg
       sox $file -t raw --channels=1 --bits=16 --rate=16000 --encoding=signed-
    integer --endian=little ${file%.ogg}.raw;
    done

    for file in FFMPEG_DIR/*.raw;
    do
       cp -p file MAIN_DIR/pipeline/audio_raw/;
    done

    and here is the debug response :

    cp: cannot stat ‘file’: No such file or directory
    ./essai.sh: line 14: ./ffmpeg: No such file or directory
    sox FAIL formats: can't open input file `FFMPEG_DIR/*.mp3': No such file or
    directory
    cp: cannot stat ‘file’: No such file or directory

    FYI I’m running CentOS7 on VirtualBox

    Thank you