Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (51)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (4471)

  • pyav - cannot save stream as mono

    3 août 2022, par Zvika

    I'm trying to use pyav to convert arbitrary audio file to a low quality, mono, wave file.

    


    I almost managed to do it, but it's stereo, and I couldn't find how to make it mono. Furthermore, I think I made some mistake here, as I had to repeat the rate in the output_container.add_stream and in the AudioResampler - it seems redundant, and I can't understand what would happen if those numbers won't match.

    


    My code is :

    


        import av
    
    input_file = 'some.mp3'
    output_file = 'new.wav'
    
    rate = 22000
    
    output_container = av.open(output_file, 'w')

    # can I tell `output_stream` to just use `resampler`'s info?
    # or, if not, how can I tell it to have only 1 channel?
    output_stream = output_container.add_stream('pcm_u8', rate)  
    
    resampler = av.audio.resampler.AudioResampler('u8p', 'mono', rate)
    
    input_container = av.open(input_file)
    for frame in input_container.decode(audio=0):
        out_frames = resampler.resample(frame)
        for out_frame in out_frames:
            for packet in output_stream.encode(out_frame):
                output_container.mux(packet)
    output_container.close()


    


    And not related to my main question, but any comments regarding my code, or pointing out mistakes, are welcomed. I hardly could find usage examples to use a reference, and PyAV API documentation isn't very detailed...

    


  • ffmpeg save highly quality video by using rtsp link [closed]

    22 août 2023, par Shivam Singh

    I'm trying to download good quality of video from the camera stream by using ffmpeg

    


    ffmpeg -i rtsp://admin:admin@123@117.216.143.251:556 -r 15 /home/Documents/Yolo/yolo/251.avi


    


    How to download good quality of video by using ffmpeg ?

    


  • Convert video into mp3 format using ffmpeg in nodejs and angular and then save converted audio into the database(mongodb)

    6 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;