
Recherche avancée
Autres articles (51)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (5310)
-
Converting an audio file from .oga format to .mp3 using ffmpeg package on nodeJs produces a max of 3 seconds output file no matter the input duration
15 janvier 2024, par JnrLouisI am downloading an audio file in
.oga
format and saving it. Then I am trying to convert the file to.mp3
format, but the issue is the output file is always truncated and a maximum of 3 seconds. I have gone through the fluent-ffmpeg library and I can't seem to find what I'm doing wrong.

I have ffmpeg installed and I'm using the fluent-ffmpeg library. The downloaded .oga file doesn't seem to have any issues, the issue is after it gets converted to .mp3.


I also tried converting to .wav, and I faced the same issue.


Below is my current code :


const fs = require("fs");
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
const axios = require("axios");

const inputPath = __dirname + '/audio/input.oga';
const outputPath = __dirname + '/audio/output.mp3';

const saveVoiceMessage = async (url) => {
 try {
 const response = await axios({
 method: 'GET',
 url: url,
 responseType: 'stream'
 });
 const inStream = fs.createWriteStream(inputPath);
 await response.data.pipe(inStream);
 } catch (error) {
 console.error(error);
 }
}

const convertToMp3 = async () => {
 try {
 const outStream = fs.createWriteStream(outputPath);
 const inStream = fs.createReadStream(inputPath);
 // I also tried using the inputPath directly, still didn't work
 ffmpeg(inStream)
 .toFormat("mp3")
 .on('error', error => console.log(`Encoding Error: ${error.message}`))
 .on('exit', () => console.log('Audio recorder exited'))
 .on('close', () => console.log('Audio recorder closed'))
 .on('end', () => console.log('Audio Transcoding succeeded !'))
 .pipe(outStream, { end: true })
 } catch (error) {
 console.error(error);
 }
}

const saveAndConvertToMp3 = async (url) => {
 try {
 await saveVoiceMessage(url);
 await convertToMp3();
 }

 } catch (error) {
 console.error(error);
 }
}



-
FFmpeg cannot extract correct first frame - always extract the second frame [closed]
21 octobre 2024, par Cai YuI am on macos Ventura 13.2.1, on Macbook Pro M1Max.


The video is number counting animation video. From 2 to 125. The number on first frame is 2. The number on last frame is 125. The number plus one on each frame. You can download the video here.


NOTE that :
First, you hit space bar to play it in Finder, you can see the first frame of the video is number 2.


Second, in professional Video editing software - davinci resolve, on the timeline, you can see the first frame is number 2.


Now I try to use FFmpeg to extract the first frame of the video.
First Try :


ffmpeg -i /Users/chris/Downloads/2to125.mov -vframes 1 /Users/chris/Downloads/1.png



The output png image is number 3. So it's actually the second frame.


Second try :


ffmpeg -i /Users/chris/Downloads/2to125.mov -frames:v 1 /Users/chris/Downloads/1.png



The output png image is still the second frame - the number 3.


Third try :


ffmpeg -i /Users/chris/Downloads/2to125.mov -vf "select=eq(n\,0)" -q:v 3 /Users/chris/Downloads/1.png



The output image is sitll the wrong second frame.


NOTE that :


first : all these three method are from internet. And a lot of people voted correct answer for this question.


second : all their output on my system is the incorrect second frame, not the first frame.


I cannot find what's wrong. Hope friend here help me.


-
speed up the video and audio 1.5 times ffmpeg [duplicate]
23 février 2021, par Mayank ThapliyalI have a video which I want to speed up 1.5 times. I gave a check on stackoverflow but I did not got the perfect answer for me (sometimes audio disappears,sometimes audio remains unaffected). I want to speed up my video(including audio) 1.5 times.


Also,if possible, can the command be combined with this command into a single command(I guess it would save my processing time)


ffmpeg -i video$.mp4 -filter_complex "[0]crop=iw:ih/2:0:0[top];[0]crop=iw:ih/2:0:oh[bottom];[top][bottom]hstack" -preset fast -c:a copy video.mp4


Thanks in advance