Recherche avancée

Médias (91)

Autres articles (85)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (7559)

  • How to record/trim/combine audio seamlessly in a React/Node web app

    16 mai 2021, par Rayhan Memon

    I've developed a digital audio workstation for the browser that you can check out here. Essentially it helps authors narrate their own audiobooks themselves at home.

    


    I'm looking to dramatically improve the speed at which audio files are combined or trimmed.

    


    Right now, the user records some variable amount of audio (a line, paragraph, or entire passage). When the user stops recording, this clip is added to the main audio file for the section using ffmpeg.wasm like so :

    


            if (duration === 0) {
            //concatenate the two files (they should already be written to memory)
            await ffmpeg.run('-i', 'concat:fullAudio.mp3|clip.mp3', '-c', 'copy', 'fullAudio.mp3');

        } else {
            //Set the insert time to wherever the user's cursor is positioned
            let insertTime = duration;
            if (selectedObj) {
                insertTime = selectedObj.endTime;
            }

            //split the audio file into two parts at the point we want to insert the audio
            await ffmpeg.run('-i', 'fullAudio.mp3', '-t', `${insertTime}`, '-c', 'copy', 'part1.mp3', '-ss',  `${insertTime}`, '-codec', 'copy', 'part2.mp3');

            //concatenate the three files
            await ffmpeg.run('-i', 'concat:part1.mp3|clip.mp3', '-acodec', 'copy', 'intermediate.mp3');
            await ffmpeg.run('-i', 'concat:intermediate.mp3|part2.mp3', '-acodec', 'copy', 'fullAudio.mp3');
        }

        //Read the result from memory
        const data = ffmpeg.FS('readFile', 'fullAudio.mp3');

        //Create URL so it can be used in the browser
        const url = URL.createObjectURL(new Blob([data.buffer], { type: 'audio/mp3' }));
        globalDispatch({ type: "setFullAudioURL", payload: url });


    


    After every recorded clip, the user is forced to wait a few seconds for this concatenation process to finish up - and the longer the main file or recorded clip gets, the longer the user has to wait. Looking at other browser-based audio editors such as AudioMass, it clearly seems possible to make a seamless recording and editing experience with zero wait time, but I can't seem to figure out how to do the same within my react app.

    


    Is it possible to seamlessly combine or trim audio data within a React app ? Is FFMPEG the best way to go about it, or are there simpler ways using pure javascript ?

    


  • Unable to write textclip with moviepy due to errors with Imagemagick

    5 février, par Sato

    I am trying to write TextClip into a video with moviepy. It has always been working, yet after I reinstalled ffmpeg, it doesn't work anymore (I am not sure whether it has caused it, but I mentioned it in case it does). Some of the TextClip objects are pure spaces.

    


    I got the following error message :

    


    Traceback (most recent call last):&#xA;  File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\moviepy\video\VideoClip.py", line 1137, in __init__&#xA;    subprocess_call(cmd, logger=None)&#xA;  File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\moviepy\tools.py", line 54, in subprocess_call&#xA;    raise IOError(err.decode(&#x27;utf8&#x27;))&#xA;OSError: magick.exe: no images for write &#x27;-write&#x27; &#x27;PNG32:C:\Users\USER\AppData\Local\Temp\tmpmnf0fkb5.png&#x27; at CLI arg 14 @ error/operation.c/CLINoImageOperator/4893.&#xA;&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "media_main_user.py", line 79, in <module>&#xA;    insert_audio_and_subtitles(input_clip,&#x27;output.mp4&#x27;,&#x27;text.mp3&#x27;,subtitles,fontsize=subtitles_font_size,&#xA;  File "D:\UserData\Desktop\Project\影片剪輯\關鍵字版本\make_media.py", line 318, in insert_audio_and_subtitles&#xA;    annotated_clips = [annotate(video.subclip(from_t, to_t), txt) for (from_t, to_t), txt in subtitles]&#xA;  File "D:\UserData\Desktop\Project\影片剪輯\關鍵字版本\make_media.py", line 318, in <listcomp>&#xA;    annotated_clips = [annotate(video.subclip(from_t, to_t), txt) for (from_t, to_t), txt in subtitles]&#xA;  File "D:\UserData\Desktop\Project\影片剪輯\關鍵字版本\make_media.py", line 311, in annotate&#xA;    txtclip = TextClip(txt, fontsize=fontsize, font=font, color=txt_color)&#xA;  File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\moviepy\video\VideoClip.py", line 1146, in __init__&#xA;    raise IOError(error)&#xA;OSError: MoviePy Error: creation of None failed because of the following error:&#xA;&#xA;magick.exe: no images for write &#x27;-write&#x27; &#x27;PNG32:C:\Users\USER\AppData\Local\Temp\tmpmnf0fkb5.png&#x27; at CLI arg 14 @ error/operation.c/CLINoImageOperator/4893.&#xA;.&#xA;&#xA;.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn&#x27;t specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect&#xA;</listcomp></module>

    &#xA;

    I have tried to solve the problems multiple ways, like checking the config-default.py file in moviepy installation directory, and the path for ImageMagick it's pointing to is not wrong. I tried to reinstall ImageMagick, it is also of no use. And I tried to edit the policy.xml file in ImageMagick directory from none to read|write, but it also doesn't work. Can anyone suggest other possible solutions ?

    &#xA;

  • external-downloader option not working as expected in youtube-dl

    31 mars 2021, par Coder_H

    I was trying to download specific timestamps from youtube using youtube-dl as mentioned as mentioned here in the comments

    &#xA;

    youtube-dl -v "https://www.youtube.com/watch?v=1I-3vJSC-Vo" -x -k --external-downloader ffmpeg --external-downloader-args "-ss 0:30 -to 0:35"&#xA;

    &#xA;

    I got the following error :

    &#xA;

    [youtube] 1I-3vJSC-Vo: Downloading webpage&#xA;[download] Destination: ONE MINUTE OF PURE SATISFACTION _ Compilation 1-1I-3vJSC-Vo.f398.mp4&#xA;ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/incl&#xA;ude/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable&#xA;-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libf&#xA;reetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-lib&#xA;openmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-lib&#xA;soxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack&#xA; --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal -&#xA;-enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-l&#xA;ibopencv --enable-libx264 --enable-shared&#xA;  WARNING: library configuration mismatch&#xA;  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incd&#xA;ir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-lad&#xA;spa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig -&#xA;-enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg&#xA;--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy&#xA;--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enabl&#xA;e-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --ena&#xA;ble-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0&#xA;r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb&#xA;--enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Option to (record or transcode stop time) cannot be applied to input url https://r7---sn-gwpa-civk.googlevideo.com/videoplayback?exp&#xA;ire=1617150322&amp;ei=Em1jYPnzG7qr3LUP6eGr2A0&amp;ip=2409%3A4043%3A609%3A4b92%3Ad9f7%3Ad14%3A44f9%3A8525&amp;id=o-AALoNXBA9D9WAuCZn-2a9-JjLoqCOC&#xA;_11Lo7_9LdU7g0&amp;itag=398&amp;aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397%2C398&amp;source=youtub&#xA;e&amp;requiressl=yes&amp;mh=05&amp;mm=31%2C29&amp;mn=sn-gwpa-civk%2Csn-gwpa-cvhd&amp;ms=au%2Crdu&amp;mv=m&amp;mvi=7&amp;pcm2cms=yes&amp;pl=38&amp;initcwndbps=148750&amp;vprv=1&amp;&#xA;mime=video%2Fmp4&amp;ns=_3yx5zxNR1CYgHJamv8F-s4F&amp;gir=yes&amp;clen=4733883&amp;dur=59.920&amp;lmt=1578997687942906&amp;mt=1617128452&amp;fvip=7&amp;keepalive=yes&#xA;&amp;fexp=24001373%2C24007246&amp;beids=9466588&amp;c=WEB&amp;txp=5431432&amp;n=HoSSxcQKm_nNAUWgVTbz2&amp;sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2C&#xA;requiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&amp;sig=AOq0QJ8wRQIhAN-MjT3t_kpgwkOrBiw8f-0q5iDINPxu4bjfgZS66nNGAiBOLta-kt_AuaqGH&#xA;D-hJiElj9oNALl35IsBseYOR5AU4A%3D%3D&amp;lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&amp;lsig=AG3C_xAwRAIgIf334bMxslsq&#xA;Lxpnn2BATGGV6GWoWoJQQuMMgQL-NaMCICojD-uZ1VkyxIOQrfOwlLAEJ-gCe1skejtRBk-oHejU -- you are trying to apply an input option to an output&#xA; file or vice versa. Move this option before the file it belongs to.&#xA;Error parsing options for input file https://r7---sn-gwpa-civk.googlevideo.com/videoplayback?expire=1617150322&amp;ei=Em1jYPnzG7qr3LUP6e&#xA;Gr2A0&amp;ip=2409%3A4043%3A609%3A4b92%3Ad9f7%3Ad14%3A44f9%3A8525&amp;id=o-AALoNXBA9D9WAuCZn-2a9-JjLoqCOC_11Lo7_9LdU7g0&amp;itag=398&amp;aitags=133%2&#xA;C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397%2C398&amp;source=youtube&amp;requiressl=yes&amp;mh=05&amp;mm=31%2C29&amp;mn&#xA;=sn-gwpa-civk%2Csn-gwpa-cvhd&amp;ms=au%2Crdu&amp;mv=m&amp;mvi=7&amp;pcm2cms=yes&amp;pl=38&amp;initcwndbps=148750&amp;vprv=1&amp;mime=video%2Fmp4&amp;ns=_3yx5zxNR1CYgHJa&#xA;mv8F-s4F&amp;gir=yes&amp;clen=4733883&amp;dur=59.920&amp;lmt=1578997687942906&amp;mt=1617128452&amp;fvip=7&amp;keepalive=yes&amp;fexp=24001373%2C24007246&amp;beids=9466&#xA;588&amp;c=WEB&amp;txp=5431432&amp;n=HoSSxcQKm_nNAUWgVTbz2&amp;sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%&#xA;2Cclen%2Cdur%2Clmt&amp;sig=AOq0QJ8wRQIhAN-MjT3t_kpgwkOrBiw8f-0q5iDINPxu4bjfgZS66nNGAiBOLta-kt_AuaqGHD-hJiElj9oNALl35IsBseYOR5AU4A%3D%3D&amp;&#xA;lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&amp;lsig=AG3C_xAwRAIgIf334bMxslsqLxpnn2BATGGV6GWoWoJQQuMMgQL-NaMCICoj&#xA;D-uZ1VkyxIOQrfOwlLAEJ-gCe1skejtRBk-oHejU.&#xA;Error opening input files: Invalid argument&#xA;&#xA;&#xA;ERROR: ffmpeg exited with code 1&#xA;&#xA;

    &#xA;

    Why am I facing this error despite using the same format as mentioned in the link ?

    &#xA;