
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (75)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
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 (5668)
-
How to use ffmpeg to convert video into the audio format with nodejs and angular in web app
31 août 2021, par Amir ShahzadI want to convert the video into the audio format using ffmpeg in nodejs but I not know how I can implement it in the angular app with nodejs.


This is my nodejs code


const express = require('express');
 const ffmpeg = require('fluent-ffmpeg');
 const fileUpload = require('express-fileupload');
 const cors = require('cors')
 const app = express();

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

 // Converting mp4 to audio
 app.post('/mp4tomp3', (req, res) => {
 res.contentType('video/avi');
 res.attachment('output.mp3');
 req.files.mp4.mv("temp/" + req.files.mp4.name , function(err) {
 if(err){
 res.sendStatus(500).send(err)
 }else{
 console.log("Fiel Uploaded Successfully.!");
 }
 });
 ffmpeg('temp/' + req.files.mp4.name)
 .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')
 })



This code is working good when I use index.html file in the nodejs app but its give an error while I remove index.html file and use angular app for frontend then it give error in nodejs mp4 not defined and name mv is not defined Please tell me how I can implement it using angular framework


This is my app.component.html file


<div class="container">
 <h1>Video Proccessing App</h1>
 <form>
 <input type="file" formcontrolname="mp4" />
 <input type="submit" value="Convert" />
 </form>
 </div>
 



This is my app.component.ts file


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;
 // console.log(this.data)
 //console.log(this.form.value)
 })
 }

 }



This is my service file for handling the backend api in my angular app


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)
}
}



This is Screenshot of chrome error




This is the screenshot of the nodejs app error while I click on the convert button




-
ffmpeg Hardware acceleration (hw accel) has poor performance on Hololens 1
12 avril 2021, par DimitrisI am building a library in C++ (dll) for decoding video h264 format. The problem is that on CPU is faster than GPU (hw accel).


In the CPU, the execution time is about 1200 micro secs and the total time on dll is 2600 micro.


In the GPU, the execution time is less, about 200 micro secs but transfer from GPU to CPU (RAM) has extra time, about 1100-1300 micro secs and the total time is 4200 micro. I am using the d3d11va/cuda hw accel device. That's all is not a problem on a PC, but I need the dll for the Hololens app (with poor performance) and I need to decode video on 30 fps in 1080p.


My code is based on this tutorial from ffmpeg github repository.


Do you have any suggestions on how to avoid the command
av_hwframe_transfer_data(sw_frame, frame, 0)
cause the bottleneck in the Hololens is about the transfer from GPU to CPU ?

Thank you


-
Python Docker SDK long command to container [duplicate]
2 avril 2021, par Neil BernardI need to send a fairly long command using python docker SDK


ffmpeg -f lavfi -re -i smptebars=duration=60:size=1280x720:rate=30 -f lavfi -re -i sine=frequency=1000:duration=60:sample_rate=44100 -pix_fmt yuv420p -c:v libx264 -b:v 1000k -g 30 -keyint_min 120 -profile:v baseline -preset veryfast -f mpegts "srt://127.0.0.1:4200?pkt_size=1316"



I have an example where you ned to wrap each element in double quotes.


container1 = client.containers.run("alpine", ["echo", "hello", "world"],name='autotest', detach=True)



2 Questions


Is there an elegant way to do this ?
If not how do I handle the bits that already have quotes ?