Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (47)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (8562)

  • expected end of line but found unknown token

    17 juin 2017, par Denzil Williams

    Ok so after days of searching, here I am. I am new to ffmpeg, applescript, and terminal.

    I want to use ffmpeg to batch convert a group of selected files in any folder. I was successful in doing this by opening the terminal at the folder location and using this code :

    for f in *.flv; do ffmpeg -i "$f" -acodec libmp3lame -b:a 256k "${f%.flv}.mp3" && rm "$f"; done

    which finds all flv files, and converts it to 256 bit rate mp3, then deletes the original files.

    Now I want it to be more automated, so I looked into creating a service. I tried running an apple script through automator, which I want it to open the terminal at the folder location the file then run the code to convert the files. Here’s the code I attempted :

    tell application "Finder" to set currentFolder to target of front Finder window as text
    set theWin to currentFolder's POSIX path

    tell application "Terminal"
       if not (exists window 1) then reopen
       activate
       do script "cd " & quoted form of theWin & ";clear" in window 1
       tell application "Terminal"
           do script "for f in *.flv; do ffmpeg -i "$f" -acodec libmp3lame -b:a 256k "${f%.flv}.mp3" && rm "$f"; done"
       end tell
    end tell

    The first part of code opens up terminal at the folder location just fine. But when I add the part with the ffmpeg code it crashes. The error is apparently with the "$", those are what light up as the error, the error message says "Expected end of line, but found unknown token". Looking for some assistance please. I need the "$" because those are what make the loop work for renaming the files and such.

  • 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 jpeg stream to webm only creates a file .webm with 1 frame (snapshot) or empty .webm file (mjpeg)

    14 novembre 2016, par moeiscool

    my problem is that when i try to turn a series of jpegs into a webm video. I either get a webm file with a single frame or a webm file with nothing in it (0 kb).

    var fs = require('fs');
    var path = require('path');

    var outStream = fs.createWriteStream(__dirname+'/output.webm');
    var ffmpeg = require('fluent-ffmpeg');

    this one is a mjpeg stream URL. it produces a file with nothing.

    //var proc = new ffmpeg({source:'http://xxx.xxx.xxx.xxx/goform/stream?cmd=get&amp;channel=0',timeout:0})

    this one is a snapshot URL. it produces a file with a single frame.

    var proc = new ffmpeg({source:'http://xxx.xxx.xxx.xxx/snapshot/view0.jpg',timeout:0})

    .fromFormat('mjpeg')
    .size('2048x1536')
    .toFormat('webm')
    .withVideoBitrate('800k')
    .withFps(20)

    I have tried to use pipe instead but no dice :(

    //.pipe(outStream,{end:false});
    .writeToStream(outStream,{end:false})

    any help is appreciated.

    at this point i am up for using a basic shell command with exec but when i try that i just get errors also. Yes, it goes without saying I am a noob.

    Side note :

    I have tried things like zoneminder but it just breaks with our cameras and the number of cameras. so i am making a bare bones solution to record them. With our current cloud service we are missing very important moments and its costing more in energy and time.