Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (53)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

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

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

  • FFmpeg avformat_open_input not working

    30 septembre 2016, par John_Sheares

    This is my first time using FFmpeg. Every type of media file that I try to open with avformat_open_input, returns "Invalid data found when processing input". I am using 32bit FFmpeg Build Version : 92de2c2. I setup my VS2015 project according to this answer : Use FFmpeg in Visual Studio. What could be going wrong with this code ?

    #include "stdafx.h"
    #include

    extern "C"
    {
       #include "libavcodec/avcodec.h"
       #include <libavformat></libavformat>avformat.h>
       #include <libavutil></libavutil>avutil.h>
    }

    int main(int argc, char *argv[])
    {
       AVFormatContext *pFormatCtx = NULL;
       avcodec_register_all();

       const char* filename = "d:\\a.mp4";
       int ret = avformat_open_input(&amp;pFormatCtx, filename, NULL, NULL);
       if (ret != 0) {
           char buff[256];
           av_strerror(ret, buff, 256);
           printf(buff);
           return -1;
       }
    }
  • How to use ffmpeg to convert video into the audio format with nodejs and angular in web app

    31 août 2021, par Amir Shahzad

    I want to convert the video into the audio format using ffmpeg in nodejs but I not know how I can implement it in the angular app with nodejs.

    &#xA;

    This is my nodejs code

    &#xA;

      const express = require(&#x27;express&#x27;);&#xA;  const ffmpeg  = require(&#x27;fluent-ffmpeg&#x27;);&#xA;  const fileUpload = require(&#x27;express-fileupload&#x27;);&#xA;  const cors   = require(&#x27;cors&#x27;)&#xA;  const app = express();&#xA;&#xA;  app.use(fileUpload({&#xA;     useTempFiles: true,&#xA;     tempFileDir: &#x27;temp/&#x27;&#xA;  }));&#xA;  app.use(express.json());&#xA;  app.use(express.urlencoded({ extended: true }));&#xA;  app.use(cors({ origin: &#x27;http://localhost:4200&#x27; }));&#xA;&#xA;  ffmpeg.setFfmpegPath(&#x27;/usr/bin/ffmpeg&#x27;);&#xA;&#xA;  // Converting mp4 to audio&#xA;  app.post(&#x27;/mp4tomp3&#x27;, (req, res) => {&#xA;     res.contentType(&#x27;video/avi&#x27;);&#xA;     res.attachment(&#x27;output.mp3&#x27;);&#xA;     req.files.mp4.mv("temp/" &#x2B; req.files.mp4.name , function(err) {&#xA;      if(err){&#xA;        res.sendStatus(500).send(err)&#xA;    }else{&#xA;        console.log("Fiel Uploaded Successfully.!");&#xA;    }&#xA;   });&#xA;     ffmpeg(&#x27;temp/&#x27; &#x2B; req.files.mp4.name)&#xA;       .toFormat(&#x27;mp3&#x27;)&#xA;       .on(&#x27;end&#x27;, function() {&#xA;            console.log(&#x27;Done&#x27;);&#xA;    })&#xA;   .on(&#x27;error&#x27;, function(err){&#xA;         console.log(&#x27;An Error Occured&#x27; &#x2B; err.message)&#xA;    })&#xA;    .pipe(res, {end: true})&#xA;  })&#xA;&#xA;  app.listen(3000, () => {&#xA;    console.log(&#x27;Server Start On Port 3000&#x27;)&#xA;  })&#xA;

    &#xA;

    This code is working good when I use index.html file in the nodejs app but its give an error while I remove index.html file and use angular app for frontend then it give error in nodejs mp4 not defined and name mv is not defined Please tell me how I can implement it using angular framework

    &#xA;

    This is my app.component.html file

    &#xA;

       <div class="container">&#xA;     <h1>Video Proccessing App</h1>&#xA;     <form>&#xA;        <input type="file" formcontrolname="mp4" />&#xA;         <input type="submit" value="Convert" />&#xA;     </form>&#xA;  </div>&#xA;  &#xA;

    &#xA;

    This is my app.component.ts file

    &#xA;

         import { Component, OnInit } from &#x27;@angular/core&#x27;;&#xA;     import { FormBuilder, FormGroup, Validators } from &#x27;@angular/forms&#x27;;&#xA;     import { VideoConversionService } from &#x27;src/services/video-conversion.service&#x27;;&#xA;&#xA;     @Component({&#xA;        selector: &#x27;app-root&#x27;,&#xA;        templateUrl: &#x27;./app.component.html&#x27;,&#xA;        styleUrls: [&#x27;./app.component.css&#x27;]&#xA;     })&#xA;     export class AppComponent implements OnInit {&#xA;&#xA;         submitted =false;&#xA;         form! : FormGroup&#xA;         data:any&#xA;&#xA;&#xA;        constructor(private formBuilder: FormBuilder,&#xA;        private videoService: VideoConversionService){}&#xA;&#xA;&#xA;       creatForm(){&#xA;          this.form = this.formBuilder.group({&#xA;          mp4: [&#x27;&#x27;, Validators.required],&#xA;       });&#xA;      }&#xA;      ngOnInit(): void {&#xA;         this.creatForm();&#xA;&#xA;      }&#xA;&#xA;&#xA;      convertVideo(){&#xA;          this.submitted = true&#xA;          this.videoService.conversion(this.form.value).subscribe(res => {&#xA;          this.data = res;&#xA;         // console.log(this.data)&#xA;         //console.log(this.form.value)&#xA;     })&#xA;     }&#xA;&#xA;     }&#xA;

    &#xA;

    This is my service file for handling the backend api in my angular app

    &#xA;

    import { Injectable } from &#x27;@angular/core&#x27;;&#xA;import { HttpClient  } from &#x27;@angular/common/http&#x27;;&#xA;@Injectable({&#xA;  providedIn: &#x27;root&#x27;&#xA;})&#xA;export class VideoConversionService {&#xA;&#xA;constructor(private httpClient: HttpClient) { }&#xA;&#xA;conversion(data: any){&#xA;   return this.httpClient.post(&#x27;http://localhost:3000/mp4tomp3&#x27;, data)&#xA;}&#xA;}&#xA;

    &#xA;

    This is Screenshot of chrome error

    &#xA;

    while i click on convert button then chrome give that error

    &#xA;

    This is the screenshot of the nodejs app error while I click on the convert button

    &#xA;

    enter image description here

    &#xA;

  • Node.JS Live Streaming Audio with FFMPEG

    20 avril 2021, par nicnacnic

    I'm trying to create an Express server to live stream audio captured from another application (Discord in this case). I'm able to get a server up and running, but there are a couple issues that need to be solved. Here's my server code so far.

    &#xA;

    const app = express();&#xA;app.get("/", function(req, res) {&#xA;    res.sendFile(__dirname &#x2B; "/index.html");&#xA;});&#xA;app.get("/audio", function(req, res) {&#xA;    const stream = ffmpeg(audio).inputOptions(["-f", "s16le", "-ar", "48k", "-ac", "2"]).format(&#x27;wav&#x27;);&#xA;    res.writeHead(200, { "Content-Type": "audio/wav" });&#xA;    stream.pipe(res);&#xA;});&#xA;app.listen(8080)&#xA;

    &#xA;

      &#xA;
    1. Silent sections of audio need to be added. When there's no activity on the input, there's no data written to the audio variable. This causes weird behavior, for example I can speak and the audio comes through a second later. Then, if I wait 10 seconds then speak again, the audio comes through 4-5 seconds later. I believe this is a problem with the way I'm using ffmpeg to transcode, but I have no idea how to fix it.
    2. &#xA;

    3. Refreshing the client crashes the program. Every time I refresh the client I get an ffmpeg error. Error: Output stream closed. This error doesn't happen if I close it, only on reload.
    4. &#xA;

    5. The audio is not synced between clients. Every time I open a new connection, the audio starts playing from the beginning instead of being synced with each other and playing the audio live.
    6. &#xA;

    &#xA;

    This is how it's supposed to work : it captures audio from my app in PCM, converts the audio to WAV with ffmpeg, and then streams the audio live to the clients. The audio needs to be synced with all the clients as best as possible to reduce delay. And I'm using fluent-ffmpeg instead of just regular ffmpeg for the transcoding.&#xA;Thanks !

    &#xA;