Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (92)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (3935)

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

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

    


  • Encountered an exception of ffmpeg.wasm can only run one command at a time

    2 mars 2023, par Itay113

    I want to make a video chat using ffmepg wasm (I know the standard is WebRTC but my assignment is to do this with ffmpeg wasm and a server connecting the 2 clients) and when doing the follow code I am getting ffmpeg.wasm can only run one command at a time exception on the ffmpegWorker.run line

    


    function App() {&#xA;  const ffmpegWorker = createFFmpeg({&#xA;    log: true&#xA;  })&#xA;&#xA;  async function initFFmpeg() {&#xA;    await ffmpegWorker.load();&#xA;  }&#xA;&#xA;  async function transcode(webcamData) {&#xA;    const name = &#x27;record.webm&#x27;;&#xA;    await ffmpegWorker.FS(&#x27;writeFile&#x27;, name, await fetchFile(webcamData));&#xA;    ffmpegWorker.run(&#x27;-i&#x27;, name, &#x27;-preset&#x27;, &#x27;ultrafast&#x27;, &#x27;-c:v&#x27;, &#x27;h264&#x27;, &#x27;-crf&#x27;, &#x27;28&#x27;, &#x27;-b:v&#x27;, &#x27;0&#x27;, &#x27;-row-mt&#x27;, &#x27;1&#x27;, &#x27;-f&#x27;, &#x27;mp4&#x27;, &#x27;output.mp4&#x27;)&#xA;    .then(()=> {&#xA;&#xA;      const data = ffmpegWorker.FS(&#x27;readFile&#x27;, &#x27;output.mp4&#x27;);&#xA;  &#xA;      const video = document.getElementById(&#x27;output-video&#x27;);&#xA;      video.src = URL.createObjectURL(new Blob([data.buffer], { type: &#x27;video/mp4&#x27; }));&#xA;      ffmpegWorker.FS(&#x27;unlink&#x27;, &#x27;output.mp4&#x27;);&#xA;    })&#xA;  }&#xA;&#xA;  function requestMedia() {&#xA;    const webcam = document.getElementById(&#x27;webcam&#x27;);&#xA;    const chunks = []&#xA;    navigator.mediaDevices.getUserMedia({ video: true, audio: true })&#xA;    .then(async (stream) => {&#xA;      webcam.srcObject = stream;&#xA;      await webcam.play();&#xA;      const mediaRecorder = new MediaRecorder(stream);&#xA;      mediaRecorder.start(0);&#xA;      mediaRecorder.onstop = function(e) {&#xA;        stream.stop();   &#xA;      }&#xA;      mediaRecorder.ondataavailable = async function(e) {&#xA;        chunks.push(e.data);&#xA;        await transcode(new Uint8Array(await (new Blob(chunks)).arrayBuffer()));&#xA;        &#xA;      }&#xA;    })&#xA;  }&#xA;&#xA;  useEffect(() => {&#xA;    requestMedia();&#xA;  }, [])&#xA;&#xA;  return (&#xA;    <div classname="App">&#xA;      <div>&#xA;          <video width="320px" height="180px"></video>&#xA;          <video width="320px" height="180px"></video>&#xA;      </div>&#xA;    </div>&#xA;  );&#xA;}&#xA;

    &#xA;

    I have tried messing around with the time slice on the media recorder start method argument but it didn't helped

    &#xA;