Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (45)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (5869)

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

    


    This is my nodejs code

    


      const express = require('express');
  const ffmpeg  = require('fluent-ffmpeg');
  const fileUpload = require('express-fileupload');
  const cors   = require('cors')
  const app = express();

  app.use(fileUpload({
     useTempFiles: true,
     tempFileDir: 'temp/'
  }));
  app.use(express.json());
  app.use(express.urlencoded({ extended: true }));
  app.use(cors({ origin: 'http://localhost:4200' }));

  ffmpeg.setFfmpegPath('/usr/bin/ffmpeg');

  // Converting mp4 to audio
  app.post('/mp4tomp3', (req, res) => {
     res.contentType('video/avi');
     res.attachment('output.mp3');
     req.files.mp4.mv("temp/" + req.files.mp4.name , function(err) {
      if(err){
        res.sendStatus(500).send(err)
    }else{
        console.log("Fiel Uploaded Successfully.!");
    }
   });
     ffmpeg('temp/' + req.files.mp4.name)
       .toFormat('mp3')
       .on('end', function() {
            console.log('Done');
    })
   .on('error', function(err){
         console.log('An Error Occured' + err.message)
    })
    .pipe(res, {end: true})
  })

  app.listen(3000, () => {
    console.log('Server Start On Port 3000')
  })


    


    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

    


    This is my app.component.html file

    


       <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;

  • RTSP Feed Screen Cutoff

    25 août 2021, par Jackson Medina

    Recently I have been trying to consume the RTSP stream from a Vivitar Folding Drone. By reverse-engineering the .apk file for the Vivitar Folding Drone app, I was able to find that the RTSP address for the drone is rtsp://192.168.1.1:7070/webcam however, whenever I consume this stream through VLC or FFPLAY, most of the feed gets cut off and replaced with a green screen or gray screen (depends on whether I save to a .mjpeg file or a .dump file). What is the cause of this problem and what steps can I take to fix it ?

    &#xA;

    enter image description here

    &#xA;

    When using FFPLAY, I use the following command :

    &#xA;

    ffplay -i -rtsp_flags rtsp://192.168.1.1:7070/webcam&#xA;

    &#xA;

    I also receive this error when I first start consuming the stream with ffplay :

    &#xA;

    [swscaler @ 00000240daeadf80] deprecated pixel format used, make sure you did set range correctly&#xA;

    &#xA;

    I receive this error message for about every frame of the stream :

    &#xA;

    [mjpeg @ 00000240d6226b00] mjpeg_decode_dc: bad vlc: 0:0 (00000240d6266050)&#xA;[mjpeg @ 00000240d6226b00] error dc&#xA;[mjpeg @ 00000240d6226b00] error y=1 x=0&#xA;

    &#xA;

    NOTE : I am unsure if this is relevant, but the Vivitar Drone creates its own wifi network that must be signed onto if you want to consume the RTSP stream

    &#xA;

    Also, the drone feed works perfectly fine when viewed through the Vivitar Folding Drone app. I just can't seem to get it to display properly through FFPLAY, FFMPEG, or VLC.

    &#xA;

    UPDATE :

    &#xA;

    Upon further inspection, it seems like the Vivitar Folding Drone may not be sending all of the jpg data for a single frame. Here is an image generated by unaltered byte data sent through the RTSP feed.&#xA;enter image description here

    &#xA;

    I noticed three things from this image :

    &#xA;

      &#xA;
    1. The image appears to be missing large chunks of data.
    2. &#xA;

    3. The image appears to be redshifted
    4. &#xA;

    5. The two visible portions of the image should be sequential (it looks as though the second visual portion lines up with the first). An example of this can be seen below.enter image description here
    6. &#xA;

    &#xA;

  • FFMPEG Screen Cutoff

    18 août 2021, par Jackson Medina

    Recently I have been trying to consume the RTSP stream from a Vivitar Folding Drone. By reverse-engineering the .apk file for the Vivitar Folding Drone app, I was able to find that the RTSP address for the drone is rtsp://192.168.1.1:7070/webcam however, whenever I consume this stream through VLC or FFPLAY, most of the feed gets cut off and replaced with a green screen or gray screen (depends on whether I save to a .mjpeg file or a .dump file). What is the cause of this problem and what steps can I take to fix it ?

    &#xA;

    enter image description here

    &#xA;

    When using FFPLAY, I use the following command :&#xA;ffplay -i -rtsp_flags rtsp://192.168.1.1:7070/webcam

    &#xA;

    I also receive this error when I first start consuming the stream with ffplay :

    &#xA;

    [swscaler @ 00000240daeadf80] deprecated pixel format used, make sure you did set range correctly&#xA;

    &#xA;

    I receive this error message for about every frame of the stream :

    &#xA;

    [mjpeg @ 00000240d6226b00] mjpeg_decode_dc: bad vlc: 0:0 (00000240d6266050)&#xA;[mjpeg @ 00000240d6226b00] error dc&#xA;[mjpeg @ 00000240d6226b00] error y=1 x=0&#xA;

    &#xA;

    NOTE : I am unsure if this is relevant, but the Vivitar Drone creates its own wifi network that must be signed onto if you want to consume the RTSP stream

    &#xA;