Advanced search

Medias (91)

Other articles (96)

  • MediaSPIP 0.1 Beta version

    25 April 2011, by

    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 (...)

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

    18 February 2011, by

    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.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 January 2010, by

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation; Oggz-tools : outils d’inspection de fichiers ogg; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores;
    Binaires complémentaires et facultatifs flvtool2 : extraction / (...)

On other websites (7531)

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

    2 September 2021, by Amir Shahzad

    This is nodejs server side code

    


    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) => {
const data = new Video({
     mp4: req.body.mp4
});
res.contentType('video/avi');
res.attachment('output.mp3');
req.files.mp4val.mv("temp/" + req.body, function(err) {
    if(err){
        res.sendStatus(500).send(err)
    }else{
        console.log("Fiel Uploaded Successfully.!");
    }
});
// Convertin Mp4 To Avi
ffmpeg('temp/' + req.files.mp4val.mp4)
.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')
 })


    


    Here i want to get input from the user with input tag and then want to convert video into audio and save into the database but i not know how i can do this

    


    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;

  • Using command line find to encode files and save to same directory

    15 January 2017, by Ali Samii

    I am trying to execute a find bash command to process hundreds of video files that are all named video-original.mp4 but are in subdirectories of a parent directory.

    Here’s an example of the directory structure:

    videos
    ├── 01a
    │   └── video-original.mp4
    ├── 01b
    │   └── video-original.mp4
    ├── 02a
    │   └── video-original.mp4
    ├── 02b
    │   └── video-original.mp4
    ├── 03a
    │   └── video-original.mp4
    └── 03b
       └── video-original.mp4

    I am using the following command:

    find ./ -name 'video-original.mp4' -exec bash -c 'ffmpeg -i "$0" -f mp4 -vcodec libx264 -preset veryslow -profile:v high -acodec aac -movflags faststart video.mp4 -hide_banner' {} \;

    The problem I am having is that it is saving the file video.mp4 in the parent videos directory, instead of in the subdirectory next to the original video-original.mp4

    Afterwards, I want to delete the file video-original.mp4. Currently, my process entails waiting for all the videos to be reencoded, and then once complete, issuing a separate command to delete the file video-original.mp4:

    find ./ -name 'video-original.mp4' -exec bash -c 'rm -rf "$0"' {} \;

    And my final step would be to extract a screenshot of the new video.mp4 at 10 seconds and save it as thumbnail.jpg. Again, I am currently doing that as a separate step that I execute after the previous two steps are completed.

    find ./ -name 'video.mp4' -exec bash -c 'ffmpeg -i "$0" -ss 00:00:10 -vframes 1 thumbnail.jpg' {} \;

    What I would like to do is combine these three steps into a single command so the end result will be:

    videos
    ├── 01a
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 01b
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 02a
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 02b
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 03a
    │   ├── thumbnail.jpg
    │   └── video.mp4
    └── 03b
       ├── thumbnail.jpg
       └── video.mp4

    Finally, it would be great to save that as a bash script and include it in my path in /usr/local/bin or ~/bin as an executable so I could just issue the command reencode and it would run. Would be even better if the input file could have any video file, for example, random_name.mp4 or random_name.mov or random_name.webm, basically any video file (but skipping video.mp4 at the encoding step).

  • Revision dcacce6dd9: Merge "Save pixels instead of coefficients in intra4x4 RD loop."

    27 July 2013, by Ronald S. Bultje

    Changed Paths:
     Modify /vp9/encoder/vp9_rdopt.c



    Merge "Save pixels instead of coefficients in intra4x4 RD loop."