Recherche avancée

Médias (91)

Autres articles (31)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (2976)

  • How to Convert video into mp3 format using ffmpeg in nodejs and angular and then save converted audio into the database

    2 septembre 2021, par Amir Shahzad

    This is nodejs server side file

    


    const express = require('express');
const ffmpeg  = require('fluent-ffmpeg');
const fileUpload = require('express-fileupload');
const mongoose = require('mongoose');
const cors   = require('cors')
const app = express();
const Video = require('./models/video');
mongoose.connect('mongodb://localhost:27017/YoutubeApp', {
    useNewUrlParser: true,
    useUnifiedTopology: true,
});
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error'));
db.once('open', () => {
   console.log('Data Base Connected Successfully!');
});

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

app.post('/mp4tomp3', (req, res) => {
  convertdata = req.body;
  console.log('path of innput is', req.body);
  function convert(input, output, callback) {
     ffmpeg(input)
         .output(output)
         .on('end', function() {                    
             console.log('conversion ended');
             callback(null);
           }).on('error', function(err){
              console.log('error: ', err.code, err.msg);
              callback(err);
           }).run();
      }
     convert(convertdata, './temp/output.mp3', function(err){
        if(!err) {
          console.log('conversion complete');

 
     }
 })

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


    


    In Convert function i not know how i can get input by the user i'm new in angular Please anyone can solve this out thanks in advance

    


    This is video model file

    


    const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const videoSchema = new Schema({
    mp4: String,
});
module.exports = mongoose.model("Videos", videoSchema);


    


    **This is Typescript code in angular client side that handle user input and select video **

    


    import { ThrowStmt } from '@angular/compiler';
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { VideoConversionService } from 'src/services/video-conversion.service';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {

   submitted =false;
   form! : FormGroup
   data:any

   constructor(private formBuilder: FormBuilder,
       private videoService: VideoConversionService){}

   creatForm(){
    this.form = this.formBuilder.group({
    mp4: ['', Validators.required],
  });
  }
   ngOnInit(): void {
   this.creatForm();

  }


  convertVideo(){
    this.submitted = true
    this.videoService.conversion(this.form.value).subscribe(res => {
    this.data = res;
 })
 }

 }


    


    I do not know how to create logic to do that (convert video into audio using angular framework)

    


    This is app.component.html file where i want to get video from the user using input field

    


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

    But my code is not working and video is not converting into audio

    &#xA;

    This is my video service file where i calling nodejs api to perform the task

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

    Please anyone can solve my problem Thanks in advance

    &#xA;

  • FFMPEG not exporting audio OR exports audio with still video

    7 septembre 2021, par Zak44

    Trying to utilize ffmpeg to convert a mp4 to DNxHD, then wrap it in an MXF. The ultimate goal is to get this into Avid Media Composer. I've been having issues with this particular command, where no audio is ever exported :

    &#xA;

    ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -f rawvideo BLAH.mov&#xA;

    &#xA;

    If I tweak the above command by removing the force of the "rawvideo" option I get audio, however the video then sits on the first frame and never advances :

    &#xA;

    ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -r 24 BLAH.mov&#xA;

    &#xA;

    What exactly am I doing wrong ? Here is the output from running the second time :

    &#xA;

    ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -r 24 BLAH.mov&#xA;ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 12.0.0 (clang-1200.0.32.29)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;Test_fix.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41&#xA;    creation_time   : 2021-07-01T17:19:54.000000Z&#xA;  Duration: 00:01:05.75, start: 0.000000, bitrate: 6336 kb/s&#xA;  Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 6016 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-07-01T17:19:54.000000Z&#xA;      handler_name    : ?Mainconcept Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : AVC Coding&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-07-01T17:19:54.000000Z&#xA;      handler_name    : #Mainconcept MP4 Sound Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, mov, to &#x27;BLAH.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41&#xA;    encoder         : Lavf58.76.100&#xA;  Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 36000 kb/s, 24 fps, 12288 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-07-01T17:19:54.000000Z&#xA;      handler_name    : ?Mainconcept Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc58.134.100 dnxhd&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-07-01T17:19:54.000000Z&#xA;      handler_name    : #Mainconcept MP4 Sound Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc58.134.100 aac&#xA;[mov @ 0x7fd129013000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;[mov @ 0x7fd129013000] Encoder did not produce proper pts, making some up.&#xA;frame= 1577 fps=133 q=1.0 Lsize=  290993kB time=00:01:05.70 bitrate=36279.7kbits/s speed=5.54x&#xA;video:290168kB audio:809kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005816%&#xA;[aac @ 0x7fd129019000] Qavg: 22541.643&#xA;

    &#xA;

  • Convert video into mp3 format using ffmpeg in nodejs and angular and then save converted audio into the database(mongodb)

    6 septembre 2021, par Amir Shahzad

    This is nodejs server side file

    &#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 mongoose = require(&#x27;mongoose&#x27;);&#xA;const cors   = require(&#x27;cors&#x27;)&#xA;const app = express();&#xA;const Video = require(&#x27;./models/video&#x27;);&#xA;mongoose.connect(&#x27;mongodb://localhost:27017/YoutubeApp&#x27;, {&#xA;    useNewUrlParser: true,&#xA;    useUnifiedTopology: true,&#xA;});&#xA;const db = mongoose.connection;&#xA;db.on(&#x27;error&#x27;, console.error.bind(console, &#x27;connection error&#x27;));&#xA;db.once(&#x27;open&#x27;, () => {&#xA;   console.log(&#x27;Data Base Connected Successfully!&#x27;);&#xA;});&#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;&#xA;ffmpeg.setFfmpegPath(&#x27;/usr/bin/ffmpeg&#x27;);&#xA;&#xA;app.post(&#x27;/mp4tomp3&#x27;, (req, res) => {&#xA;  convertdata = req.body;&#xA;  console.log(&#x27;path of innput is&#x27;, req.body);&#xA;  function convert(input, output, callback) {&#xA;     ffmpeg(input)&#xA;         .output(output)&#xA;         .on(&#x27;end&#x27;, function() {                    &#xA;             console.log(&#x27;conversion ended&#x27;);&#xA;             callback(null);&#xA;           }).on(&#x27;error&#x27;, function(err){&#xA;              console.log(&#x27;error: &#x27;, err.code, err.msg);&#xA;              callback(err);&#xA;           }).run();&#xA;      }&#xA;     convert(convertdata, &#x27;./temp/output.mp3&#x27;, function(err){&#xA;        if(!err) {&#xA;          console.log(&#x27;conversion complete&#x27;);&#xA;&#xA; &#xA;     }&#xA; })&#xA;&#xA; app.listen(3000, () => {&#xA;    console.log(&#x27;Server Start On Port 3000&#x27;)&#xA; })&#xA;

    &#xA;

    In Convert function i not know how i can get input by the user i'm new in angular Please anyone can solve this out thanks in advance

    &#xA;

    This is video model file

    &#xA;

    const mongoose = require("mongoose");&#xA;const Schema = mongoose.Schema;&#xA;&#xA;const videoSchema = new Schema({&#xA;    mp4: String,&#xA;});&#xA;module.exports = mongoose.model("Videos", videoSchema);&#xA;

    &#xA;

    **This is Typescript code in angular client side that handle user input and select video **

    &#xA;

    import { ThrowStmt } from &#x27;@angular/compiler&#x27;;&#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;   constructor(private formBuilder: FormBuilder,&#xA;       private videoService: VideoConversionService){}&#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; })&#xA; }&#xA;&#xA; }&#xA;

    &#xA;

    I do not know how to create logic to do that (convert video into audio using angular framework)

    &#xA;

    This is app.component.html file where i want to get video from the user using input field

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

    But my code is not working and video is not converting into audio

    &#xA;

    This is my video service file where i calling nodejs api to perform the task

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

    Please anyone can solve my problem Thanks in advance

    &#xA;