Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (96)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

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

  • Why AudioSegment doesn't read 'mp3' ?

    22 octobre 2020, par freshITmeat

    I tried to read file that I give with absolute path.
When I run my code first that I see is this message :

    


    D:\prog\datascience\anaconda\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)


    


    I tried this :

    


    PATH_TO_FFMPEG = 'D:\\prog\\ffmpeg-win-2.2.2\\ffmpeg.exe'
pydub.AudioSegment.converter = r'D:\\prog\\ffmpeg-win-2.2.2\\ffmpeg.exe'


    


    And I separately installed ffmpeg with pip. But it didn't help.
When I try this :

    


    raw_sound = pydub.AudioSegment.from_mp3(file=track_path)


    


    where track_path is correct absolute path generated automatically.
So I got this this error :

    


    Traceback (most recent call last):&#xA;  File "D:\prog\PyCharm Community Edition 2020.2.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1448, in _exec&#xA;    pydev_imports.execfile(file, globals, locals)  # execute the script&#xA;  File "D:\prog\PyCharm Community Edition 2020.2.2\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile&#xA;    exec(compile(contents&#x2B;"\n", file, &#x27;exec&#x27;), glob, loc)&#xA;  File "D:/testtask2/test_task/testtask/get_mffc.py", line 165, in <module>&#xA;    slice_all_in_a_dir(&#x27;May 27 2020 LNC/Hydrophone 1/raw_records&#x27;)&#xA;  File "D:/testtask2/test_task/testtask/get_mffc.py", line 70, in slice_all_in_a_dir&#xA;    slice_samples(track_path= [file],&#xA;  File "D:/testtask2/test_task/testtask/get_mffc.py", line 48, in slice_samples&#xA;    raw_sound = pydub.AudioSegment.from_mp3(file=track_path)&#xA;  File "D:\prog\datascience\anaconda\lib\site-packages\pydub\audio_segment.py", line 738, in from_mp3&#xA;    return cls.from_file(file, &#x27;mp3&#x27;, parameters=parameters)&#xA;  File "D:\prog\datascience\anaconda\lib\site-packages\pydub\audio_segment.py", line 680, in from_file&#xA;    stdin_data = file.read()&#xA;AttributeError: &#x27;list&#x27; object has no attribute &#x27;read&#x27;&#xA;python-BaseException&#xA;</module>

    &#xA;

    Full code when I use it :

    &#xA;

    def slice_samples(track_path: list, save_path: str,&#xA;                  sample_folder_name: str, interval: float, given_format, name: str = "part", export_format = &#x27;wav&#x27;):&#xA;    """&#xA;    This metod slice given track to parts.&#xA;    :param track_path: str, a path to the track you want to slice&#xA;    :param save_path: str, a path to folder, where you want save sliced tracks&#xA;    :param sample_folder_name: str, you don&#x27;t need to create a folder for sliced tracks,&#xA;    you can just write the name of the folder in this argument where you want to save tracks&#xA;    :param interval: float, measure in seconds, the length of sliced tracks&#xA;    :param name: str, name of sliced tacks&#xA;    :param given_format: str, I strongly recommend use .wav format initially, when you record sounds&#xA;    :return: folder with sliced tracks&#xA;    """&#xA;&#xA;    # it cuts a file in mp3 or wav formats (wav recommended)&#xA;&#xA;    interval_secs = interval * 10 ** 3&#xA;    raw_sound = None&#xA;    if given_format == "WAV":&#xA;        raw_sound = pydub.AudioSegment.from_wav(file=track_path)&#xA;    elif given_format == "MP3":&#xA;        raw_sound = pydub.AudioSegment.from_mp3(file=track_path)&#xA;    else:&#xA;        raise Exception("It&#x27;s temporarily unsupported given_format: " &#x2B; given_format)&#xA;    start = 0&#xA;    end = interval_secs&#xA;    i = 0&#xA;    while end &lt; len(raw_sound):&#xA;        save_to = save_path &#x2B; sample_folder_name &#x2B; "/" &#x2B; name &#x2B; str(i)&#xA;        part = raw_sound[start:end]&#xA;        part.export(save_to, format=export_format)&#xA;        i &#x2B;= 1&#xA;        start &#x2B;= interval_secs&#xA;        end &#x2B;= interval_secs&#xA;    return save_path &#x2B; sample_folder_name&#xA;&#xA;def slice_all_in_a_dir(tracks_folder: str):&#xA;    files = os.listdir(tracks_folder)&#xA;    for file in files:&#xA;        folder_name = file.split(&#x27;.&#x27;)&#xA;        f_name = folder_name[0]&#xA;        file = tracks_folder&#x2B;&#x27;/&#x27;&#x2B;file&#xA;        file = os.path.abspath(file)&#xA;        slice_samples(track_path= [file],&#xA;                      save_path= PATH_FOR_SLICED,&#xA;                      sample_folder_name= f_name,&#xA;                      interval=5,&#xA;                      given_format=folder_name[1])&#xA;&#xA;if __name__ == "__main__":&#xA;    slice_all_in_a_dir(&#x27;May 27 2020 LNC/Hydrophone 1/raw_records&#x27;)&#xA;

    &#xA;

  • Anomalie #4546 : image_recadre perd l’EXIF de rotation

    19 septembre 2020, par jluc -

    Le 19/07/2020, cerdic dit « 
    On pourrait envisager que conserver les exifs à travers chaque filtre image, mais c’est aussi dangereux du point de vue des données personnelles. Je verrais plutôt un filtre qui permettrait de recopier certains exifs d’une image source sur l’image finale, sur le mode :

    <span class="CodeRay">[(#FICHIER|image_reduire{…}|image_recadre{…}|image_copie_exif{#FICHIER,’author’})]
    </span>


    (syntaxe exacte à définir)
     »

  • Laravel FFMpeg - FFMpeg cannot edit existing files in-place

    28 septembre 2020, par wlaskovic

    After I wanted to upload a video in the queue was returned a failed job.

    &#xA;

     [2020-09-25 13:24:25][125] Processing: App\Jobs\ConvertVideoForStreaming <br /> [2020-09-25 13:24:26][125] Failed:     App\Jobs\ConvertVideoForStreaming&#xA;

    &#xA;

    So I've took from the DB failed_jobs table the response and run the following :

    &#xA;

      C:\ffmpeg\bin\ffmpeg.exe -y -i "C:\wamp64\www\laravel-stream\storage\app/public\WF3UL8fJTSE7BMxa.mp4" -threads 12 -vcodec libx264 -acodec libmp3lame -b:v 500k -refs 6 -coder 1 -sc_threshold 40 -flags &#x2B;loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]scale=720:360 [out]" -pass 1 -passlogfile "C:\Users\wlask\AppData\Local\Temp\ffmpeg-passes5f6dd36a4519fd1fev/pass-5f6dd36a452c9" "C:\wamp64\www\laravel-stream\storage\app/public\WF3UL8fJTSE7BMxa.mp4"&#xA;

    &#xA;

    Which returned the following :

    &#xA;

    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 10.2.1 (GCC) 20200726&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;C:\wamp64\www\laravel-stream\storage\app/public\WF3UL8fJTSE7BMxa.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41isomavc1&#xA;    creation_time   : 2015-08-07T09:13:02.000000Z&#xA;  Duration: 00:00:30.53, start: 0.000000, bitrate: 411 kb/s&#xA;    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 301 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2015-08-07T09:13:02.000000Z&#xA;      handler_name    : L-SMASH Video Handler&#xA;      encoder         : AVC Coding&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 112 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2015-08-07T09:13:02.000000Z&#xA;      handler_name    : L-SMASH Audio Handler&#xA;

    &#xA;

    &#xA;

    Output C :\wamp64\www\laravel-stream\storage\app/public\WF3UL8fJTSE7BMxa.mp4 same as Input #0 - exiting

    &#xA;

    FFmpeg cannot edit existing files in-place.

    &#xA;

    &#xA;

    This was returned after i've run the command from DB failed jobs table return.

    &#xA;

    How should I solve this ?

    &#xA;