
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (82)
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (4622)
-
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 ShahzadThis 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">
 <h1>Video Proccessing App</h1>
 <form>
 <input type="file" formcontrolname="mp4" />
 <input type="submit" value="Convert" />
 </form>
</div>





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


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


import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({
 providedIn: 'root'
})
export class VideoConversionService {

constructor(private httpClient: HttpClient) { }

conversion(data: any){
 return this.httpClient.post('http://localhost:3000/mp4tomp3', data)
}
}



Please anyone can solve my problem Thanks in advance


-
expected end of line but found unknown token
17 juin 2017, par Denzil WilliamsOk 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 tellThe 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.
-
Big question of Target size, or video bitrate must be specified when using two-pass
14 juillet 2022, par RojojunI tried to solve the error which is Target size, or video bitrate must be specified when using two-pass.


But I couldn't find how to solve it and how to find path of video exactly I attached my code below this post


Please give me some tips of solving the problem !


@Service
public class ThumbnailService {

 public HashMap exportThumbnail(File file) throws Exception {
 // file is from controller and form-data
 //String inputPath = "Users/hojunna/Download/my/";
 //String outputPath = "/usr/local/video/thumbnail/";

 String ffmpegBasePath = "/opt/homebrew/bin/";
 FFmpeg ffmpeg = new FFmpeg(ffmpegBasePath+"ffmpeg"); 
 FFprobe ffprobe = new FFprobe(ffmpegBasePath+"ffprobe"); 
 
 FFmpegBuilder builder = new FFmpegBuilder()
 .setInput("/Users/hojunna/Desktop/" + file) 
 //.overrideOutputFiles(true) 
 //.addExtraArgs("-ss", "00:00:01") 
 .addOutput("/Users/hojunna/Desktop/test.jpg") 
 .setFrames(1)
 .setVideoFilter("select='gte(n\\,10)',scale=200:-1")
 .done();

 FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe); 
 executor.createJob(builder).run(); 
 executor.createTwoPassJob(builder).run(); 

 HashMap resultMap = new HashMap();
 return resultMap;
 }
}