Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (74)

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

  • MediaSPIP : Modification des droits de création d’objets et de publication définitive

    11 novembre 2010, par

    Par défaut, MediaSPIP permet de créer 5 types d’objets.
    Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
    Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...)

  • 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

Sur d’autres sites (7053)

  • dnn_backend_openvino.c : refine code for error handle

    18 novembre 2020, par Guo, Yejun
    dnn_backend_openvino.c : refine code for error handle
    

    Signed-off-by : Xie, Lin <lin.xie@intel.com>
    Signed-off-by : Wu Zhiwen <zhiwen.wu@intel.com>
    Signed-off-by : Guo, Yejun <yejun.guo@intel.com>

    • [DH] libavfilter/dnn/dnn_backend_openvino.c
  • When I run code in Docker I get a Django error [Errno 2]. When running locally everything works. Why ?

    8 février 2021, par Bartłomiej Kokoszka

    I don't know what's going on. A script run by Django works fine, but not through Docker and Django. An error is returned :

    &#xA;

    Pic Errno 2 No such file or directory

    &#xA;

    Below is the code of the function with the error and the code of the Dockerfile.

    &#xA;

    '''

    &#xA;

    def mediainfo(filepath):&#xA;    &#xA;

    &#xA;

    Original code :

    &#xA;

    &#xA;
        prober = get_prober_name()&#xA;    command_args = [&#xA;        "-v", "quiet",&#xA;        "-show_format",&#xA;        "-show_streams",&#xA;        filepath&#xA;    ]&#xA;&#xA;    command = [prober, &#x27;-of&#x27;, &#x27;old&#x27;] &#x2B; command_args&#xA;

    &#xA;

    &#xA;

    Modified code :

    &#xA;

    &#xA;
        command = f"ffprobe -v error -show_format -show_streams -select_streams v:0 {filepath}"&#xA;

    &#xA;

    &#xA;

    The rest of the functions :

    &#xA;

        res = Popen(command, stdout=PIPE)&#xA;    output = res.communicate()[0].decode("utf-8")&#xA;&#xA;    if res.returncode != 0:&#xA;        output = Popen(command, stdout=PIPE).communicate()[0].decode("utf-8")&#xA;&#xA;    rgx = re.compile(r"(?:(?P.*?):)?(?P<key>.*?)\=(?P<value>.*?)$")&#xA;    info = {}&#xA;&#xA;    if sys.platform == &#x27;win32&#x27;:&#xA;        output = output.replace("\r", "")&#xA;&#xA;    for line in output.split("\n"):&#xA;        # print(line)&#xA;        mobj = rgx.match(line)&#xA;&#xA;        if mobj:&#xA;            # print(mobj.groups())&#xA;            inner_dict, key, value = mobj.groups()&#xA;&#xA;            if inner_dict:&#xA;                try:&#xA;                    info[inner_dict]&#xA;                except KeyError:&#xA;                    info[inner_dict] = {}&#xA;                info[inner_dict][key] = value&#xA;            else:&#xA;                info[key] = value&#xA;&#xA;    return info&#xA;</value></key>

    &#xA;

    '''

    &#xA;

    Code of the Dockerfile

    &#xA;

    '''

    &#xA;

    FROM python:3.7 as base&#xA;&#xA;EXPOSE 80&#xA;&#xA;WORKDIR /app&#xA;COPY . /app&#xA;&#xA;&#xA;ENV PYTHONDONTWRITEBYTECODE=1&#xA;&#xA;ENV PYTHONUNBUFFERED=1&#xA;&#xA;RUN pip install --upgrade pip&#xA;RUN echo &#x27;deb http://deb.debian.org/debian buster-backports main contrib non-free&#x27; >> /etc/apt/sources.list&#xA;RUN apt-get update&#xA;&#xA;RUN apt-get -y install ffmpeg&#xA;RUN apt-get update&#xA;&#xA;COPY requirements.txt .&#xA;RUN python -m pip install -r requirements.txt&#xA;&#xA;FROM base as prod&#xA;&#xA;ENTRYPOINT ["python","manage.py","runserver","0.0.0.0:80"]&#xA;

    &#xA;

    '''

    &#xA;

  • Pydub AudioSegment.from_file() fails for mp3 audio file : Decoding failed. ffmpeg returned error code : 1,

    27 mars 2021, par Nisuga Jayawardana

    Couldn't find any fix. Looks like a bug. How to fix this ?

    &#xA;

        # Grab the file from the request&#xA;    file_uploaded = request.FILES.get(&#x27;sourceFile&#x27;)&#xA;    file_path = uploads_base_path &#x2B; file_uploaded.name&#xA;    &#xA;    # saving the uploaded file&#xA;    open(file_path, &#x27;wb&#x27;)&#xA;&#xA;    extension = file_uploaded.name.split(&#x27;.&#x27;)[-1]&#xA;    with open(file_path, "rb") as wav_file:&#xA;        audio_segment = AudioSegment.from_file(wav_file, format=extension)    &lt;-------------Error&#xA;&#xA;    # create .wav filename for the file&#xA;    wavFileName = uploads_base_path &#x2B; &#x27;out.wav&#x27;&#xA;    print(wavFileName)&#xA;&#xA;    # convert audio file to .wav type&#xA;    audio_segment.export(wavFileName,"wav")&#xA;

    &#xA;

    // Pydub Error
    &#xA;Decoding failed. ffmpeg returned error code : 1
    &#xA;Output from ffmpeg/avlib :
    &#xA;ffmpeg version N-101739-gcad3a5d715 Copyright (c) 2000-2021 the FFmpeg developers
    &#xA;built with gcc 9.3-win32 (GCC) 20200320

    &#xA;

    // FFMPEG Error
    &#xA;[cache @ 000001c52157fdc0] Inner protocol failed to seekback end : -40
    &#xA;Last message repeated 1 times
    &#xA;[mp3 @ 000001c52157f400] Failed to read frame size : Could not seek to 1026.
    &#xA;[cache @ 000001c52157fdc0] Statistics, cache hits:0 cache misses:0
    &#xA;cache:pipe:0 : Invalid argument

    &#xA;