Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (18)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (4700)

  • Use ffmpeg to encode AUDIO+IMAGE into a VIDEO for YouTube

    2 février 2016, par pablosz

    I need to generate a video containing a single image throughout the duration of the audio comming from an audio file. This video should be compatible with the parameters supported by YouTube.

    I’m using ffmpeg.

    I was trying various configurations explained right here and in other forums but not all have worked well.

    I’m currently using these settings :

    ffmpeg -i a.mp3 -loop 1 -i a.jpg -vcodec libx264 -preset slow -crf 20 -threads 0 -acodec copy -shortest a.mkv

    Where a.mp3 containing audio, a.jpg contains the image and a.mkv is the name of the resulting video.

    Using these parameters a.mkv works well on YouTube and can be played with Media Player Classic ; but KMPlayer only recognizes the audio, showing a blank image as background.

    My questions are two :
    1 - There is something wrong that causes KMPlayer to fail ?
    2 - Is there any configuration that can deliver the video faster, of course losing some compression ?

    Muchas gracias !

  • Download youtube video as stream Readable object

    26 décembre 2023, par Abraam Emad

    in this function it download youtube video as a file out.mp4 on hard disk i need to download it as a Readable Object to upload it

    


    private async downloadVideo(videoId: string) {
// Buildin with nodejs
const cp = require('child_process');
const readline = require('readline');
// External modules
const ytdl = require('ytdl-core');
const ffmpeg = require('ffmpeg-static');
// Global constants
const ref = `https://www.youtube.com/watch?v=${videoId}`;
const tracker = {
  start: Date.now(),
  audio: { downloaded: 0, total: Infinity },
  video: { downloaded: 0, total: Infinity },
  merged: { frame: 0, speed: '0x', fps: 0 },
};

// Get audio and video streams
const audio = ytdl(ref, { quality: 'highestaudio' })
  .on('progress', (_, downloaded, total) => {
    tracker.audio = { downloaded, total };
  });
const video = ytdl(ref, { quality: 'highestvideo' })
  .on('progress', (_, downloaded, total) => {
    tracker.video = { downloaded, total };
  });

// Prepare the progress bar
let progressbarHandle = null;
const progressbarInterval = 1000;
const showProgress = () => {
  readline.cursorTo(process.stdout, 0);
  const toMB = i => (i / 1024 / 1024).toFixed(2);

  process.stdout.write(`Audio  | ${(tracker.audio.downloaded / tracker.audio.total * 100).toFixed(2)}% processed `);
  process.stdout.write(`(${toMB(tracker.audio.downloaded)}MB of ${toMB(tracker.audio.total)}MB).${' '.repeat(10)}\n`);

  process.stdout.write(`Video  | ${(tracker.video.downloaded / tracker.video.total * 100).toFixed(2)}% processed `);
  process.stdout.write(`(${toMB(tracker.video.downloaded)}MB of ${toMB(tracker.video.total)}MB).${' '.repeat(10)}\n`);

  process.stdout.write(`Merged | processing frame ${tracker.merged.frame} `);
  process.stdout.write(`(at ${tracker.merged.fps} fps => ${tracker.merged.speed}).${' '.repeat(10)}\n`);

  process.stdout.write(`running for: ${((Date.now() - tracker.start) / 1000 / 60).toFixed(2)} Minutes.`);
  readline.moveCursor(process.stdout, 0, -3);
};

// Start the ffmpeg child process
const ffmpegProcess = cp.spawn(ffmpeg, [
  // Remove ffmpeg's console spamming
  '-loglevel', '8', '-hide_banner',
  // Redirect/Enable progress messages
  '-progress', 'pipe:3',
  // Set inputs
  '-i', 'pipe:4',
  '-i', 'pipe:5',
  // Map audio & video from streams
  '-map', '0:a',
  '-map', '1:v',
  // Keep encoding
  '-c:v', 'copy',
  // Define output file
  '-f', 'mpegts', // Use MPEG-TS format for streaming
  'out.mp4'
], {
  windowsHide: true,
  stdio: [
    /* Standard: stdin, stdout, stderr */
    'inherit', 'inherit', 'inherit',
    /* Custom: pipe:3, pipe:4, pipe:5 */
    'pipe', 'pipe', 'pipe',
  ],
});
ffmpegProcess.on('close', () => {
  console.log('done');
  // Cleanup
  process.stdout.write('\n\n\n\n');
  clearInterval(progressbarHandle);
});
// Link streams
// FFmpeg creates the transformer streams and we just have to insert / read data
ffmpegProcess.stdio[3].on('data', chunk => {
  // Start the progress bar
  if (!progressbarHandle) progressbarHandle = setInterval(showProgress, progressbarInterval);
  // Parse the param=value list returned by ffmpeg
  const lines = chunk.toString().trim().split('\n');
  const args: any = {};
  for (const l of lines) {
    const [key, value] = l.split('=');
    args[key.trim()] = value.trim();
  }
  tracker.merged = args;
});
audio.pipe(ffmpegProcess.stdio[4]);
video.pipe(ffmpegProcess.stdio[5]);


    


    }`

    


  • c# pipe using youtube-dl to ffmpeg

    1er janvier 2017, par lilscarecrow

    I am trying to pipe the audio stream from youtube-dl into ffmpeg for a program using discord.NET. I am not sure exactly how to achieve this in c#, though. Currently, I can play ffmpeg with a url or path from this code on the docs for discord.NET :

    var process = Process.Start(new ProcessStartInfo
           {                                                      
               FileName = "ffmpeg",
               Arguments = $"-i {outLine.Data}" +                                              
                           " -f s16le -ar 48000 -ac 2 pipe:1",                                        
               UseShellExecute = false,
               RedirectStandardOutput = true                                                                                  
           });
           Thread.Sleep(2000);                                                                                                                    
           int blockSize = 3840;                                                                                                        
           byte[] buffer = new byte[blockSize];
           int byteCount;

           while (!playing)                                                                                                  
           {
               byteCount = process.StandardOutput.BaseStream                                                  
                       .Read(buffer, 0, blockSize);                                                                          

               if (byteCount == 0)                                                                                                            
                   break;                                                                                                                          

               _vClient.Send(buffer, 0, byteCount);                                                                    
           }
           _vClient.Wait();

    So, I am trying to pipe the youtube-dl audio to this I assume. I just have no idea how to achieve piping in this format and for the file while it is downloading. Also, the program works on async if that helps.