Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (43)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (5345)

  • How to compress base64 decoded video data using ffmpeg in django

    23 mai 2021, par Sudipto Sarker

    I want to upload the video/audio file in my django-channels project. So I uploaded video(base64 encoded url) from websocket connection. It is working fine. But now after decoding base64 video data I want to compress that video using ffmpeg.But it showing error like this.
''Raw : No such file or directory''
I used 'AsyncJsonWebsocketConsumer' in consumers.py file.Here is my code :
consumers.py :

    


    async def send_file_to_room(self, room_id, dataUrl, filename):
        # decoding base64 data
        format, datastr = dataUrl.split(';base64,')
        ext = format.split('/')[-1]
        file = ContentFile(base64.b64decode(datastr), name=filename)
        print(f'file: {file}')
        # It prints 'Raw content'
        output_file_name = filename + '_temp.' + ext
        ff = f'ffmpeg -i {file} -vf "scale=iw/5:ih/5" {output_file_name}'
        subprocess.run(ff,shell=True) 


    


    May be here ffmpeg can not recognize the file to be compressed. I also tried to solve this using post_save signal.

    


    signals.py :

    


    @receiver(post_save, sender=ChatRoomMessage)
def compress_video_or_audio(sender, instance, created, **kwargs):
    print("Inside signal")
    if created:
        if instance.id is None:
            print("Instance is not present")
        else:
            video_full_path = f'{instance.document.path}'
            print(video_full_path)
   // E:\..\..\..\Personal Chat Room\media\PersonalChatRoom\file\VID_20181219_134306_w5ow8F7.mp4
            output_file_name = filename + '_temp.' + extension
            ff = f'ffmpeg -i {filename} -vf "scale=iw/5:ih/5" {output_file_name}'
            subprocess.run(ff,shell=True)
            instance.document = output_file_name
            instance.save()


    


    It is also causing "E :..\Django\New_Projects\Personal : No such file or directory".
How can I solve this issue ? Any suggetions.It will be more helpful if it can be compressed before saving the object in database. Thanks in advance.

    


  • Is ffmpeg able to read ArrayBuffer input from stream

    7 juillet 2017, par jAndy

    I want to accomplish the following tasks :

    • Record Video+Audio from any HTML5 (MediaStream) capable browser
    • Send that data via WebSocket as Blob / ArrayBuffer chunks to a server
    • Broadcast that input stream-data to multiple clients

    As it turns out, this brought me into a world of pain. The first task is fairly simple using the HTML5 MediaStream objects alongside WebSockets.

    // ... for simplicity...
    navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then(stream => {
       let mediaRecorder = new MediaRecorder( stream );
       // ...
       mediaRecorder.ondataavailable = e => {
           webSocket.send( 'newVideoData', e.data ); // configured for binary data
       };
    });

    Now, I want to receive those data fragments and stream those via nginx vod module, because I guess I want the output stream in HLS or DASH.
    I could write a little nodejs script as backend, which just receives the binary chunks and write them to a file or stream, and just reference it so nginx vod module could possibly read it and create the m3u8 manifest on the fly ?

    I am wondering now,

    • if ffmpeg is able to read that binary data directly (should be webm format), without a man-in-the-middle script, "somehow" ?
    • If not, do I have to write the data down into a file and pass that as input to ffmpeg or can I (should I) pipe the data to a self spawned ffmpeg instance ? (if so, how ?)
    • Do I actually need the nginx server (probably alongside rtmp module) to deliver the output stream as HLS or could I just use ffmpeg to also create a dynamic manifest ?
    • Is the nginx vod module capable of creating a dynamic hls/dash manifest or must the input data be complete beforehand ?
    • Ultimately, am I on the totally wrong track here ? :P

    Actually I just want to create a little video-live-chat demo, without any plugins or 3rd party encoding software, pure browser.

  • Cannot Compile FFMPEG with libfreetype on Windows/Msys2

    10 octobre 2024, par Devin Dixon

    I am having issues compiling ffmpeg with libfreetype with this commmand on windows MSYS2 :

    


    ./configure     --pkg-config-flags="--static" --enable-libvpl  --enable-libopenh264     --enable-version3  --enable-libfreetype    --enable-libopus     --enable-libvpx     --enable-libvorbis     --enable-libaom     --enable-libdav1d     --disable-gpl     --disable-w32threads     --enable-pthreads     --disable-shared     --enable-static     --extra-cflags='--static'   --extra-cflags="-I/mingw64/include -static"   --extra-ldflags="-L/mingw64/lib -static" --prefix="/home/compiled"


    


    I keep getting this error :

    


    ERROR: freetype2 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.


    


    I've installed freetype with this command :

    


     pacman -Ss mingw-w64-x86_64-freetype


    


    I've also tried compiling freetype2 from the source :

    


    git clone https://git.savannah.gnu.org/git/freetype/freetype2.git

cd freetype2

mkdir build && cd build

/mingw64/bin/cmake .. -G "MSYS Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/mingw64

make

make install


    


    And pkg-config gives this :

    


    pkg-config freetype2 --cflags --libs
-IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include/libpng16 -lfreetype


    


    I can confirm the package is there :

    


    ls /mingw64/lib/pkgconfig/freetype2.pc
/mingw64/lib/pkgconfig/freetype2.pc


    


    Is there anything else I should be doing to compile a static version of ffmpeg with this package ?