Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (29)

  • Ajout d’utilisateurs manuellement par un administrateur

    12 avril 2011, par

    L’administrateur d’un canal peut à tout moment ajouter un ou plusieurs autres utilisateurs depuis l’espace de configuration du site en choisissant le sous-menu "Gestion des utilisateurs".
    Sur cette page il est possible de :
    1. décider de l’inscription des utilisateurs via deux options : Accepter l’inscription de visiteurs du site public Refuser l’inscription des visiteurs
    2. d’ajouter ou modifier/supprimer un utilisateur
    Dans le second formulaire présent un administrateur peut ajouter, (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (4680)

  • 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]);


    


    }`

    


  • correct way to download a mp4 [Audio only] file as a mp3 file via php

    3 février 2018, par Kapil

    I am asking this question because i found it impossible as far my knowledge stands. However i believe here on stackoverflow a lot of genius persons visits so maybe someone can give a good advice / trick.

    My problem is, I am downloading a audio/mp4 file of youtube hosted on googlevideo.com’s server.

    My PHP code for this purpose :
    $mp3path is url of video

    header('Content-Description: File Transfer');
    if(strpos($mp3path, "https://") === false) {
       header('Content-length: ' . size($mp3path)); //size is custom function
    }
       header("Content-Type: audio/MP4A-LATM, audio/MP4A, audio/m4a, audio/mp4, audio/mp4a, audio/mp4-audio, audio/mpeg");
       header('Content-Type: application/force-download');
       header("Accept-Ranges: bytes");
       header('Content-Transfer-Encoding: binary');
       header('Content-disposition: attachment; filename="'.$title.'.mp3"');
       header('Connection: Keep-Alive');
       header('Expires: 0');
       header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
       header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
       header("Cache-Control: private", false);
       header('Pragma: no-cache');
       readfile($mp3path);
       exit;

    I can download this audio file but few mp3 players are not able to play it when i did some research on by using mp3val [mp3val.sourceforge.net]. I found this file do not contain sample-rate, bit-rate or some other required codecs inside the file.
    Error received from mp3val : Unknown file format

    I know one possible way of doing this which is ffmpeg but i am looking for a less time consuming option of doing this because first ffmpeg download the whole file and then convert it to mp3 and save it on server. It takes a lot of time.

    I am looking for a easiest solution in which, i dont want to save the whole file on my server. I want to call this file from remote server and want to add sample rate, bit-rate in the file and then just somehow with php i want to start download on browser.

    All i mean to say i need a faster solution. I have seen 2 yt to mp3 converter, They are doing the same thing, giving instant download. i dont know how ?

    Please if you think its a stupid question or not possible then dont report to stackoverflow. I am trying to figure it out that’s why i am asking this question here. I hope you’ll understand my curiosity.

    Thanks,

  • How to build latest ffmpeg for android-ffmpeg project on github

    9 février 2015, par user2927954

    I am working on https://github.com/guardianproject/android-ffmpeg project.
    In this project, it uses ffmpeg version 0.11.1.
    How can i build this project with the latest ffmpeg version ?

    I try to delete ffmpeg folder in this project. Checkout the latest ffmpeg version in url : [git ://git.videolan.org/ffmpeg.git]. After that, i ran command ./configure_make_everything.sh as normal but i got error :

       File to patch:
    Skip this patch? [y]
    Skipping patch.
    3 out of 3 hunks ignored
    patching file libavutil/arm/intmath.h
    Reversed (or previously applied) patch detected!  Skipping patch.
    3 out of 3 hunks ignored
    patching file configure
    Reversed (or previously applied) patch detected!  Skipping patch.
    1 out of 1 hunk ignored
    ~/workspace/android-ffmpeg/ffmpeg ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
    **ERROR: freetype2 not found**

    If you think configure made a mistake, make sure you are using the latest
    version from Git.  If the latest version fails, report the problem to the
    ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
    Include the log file "config.log" produced by configure as this will help
    solving the problem.
    ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
    ~/workspace/android-ffmpeg
    ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
    ~/workspace/android-ffmpeg/ffmpeg ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
    Makefile:2: config.mak: No such file or directory
    Makefile:53: /common.mak: No such file or directory
    Makefile:93: /libavutil/Makefile: No such file or directory
    Makefile:93: /library.mak: No such file or directory
    Makefile:95: /doc/Makefile: No such file or directory
    Makefile:178: /tests/Makefile: No such file or directory
    make: *** No rule to make target `/tests/Makefile'.  Stop.
    Makefile:2: config.mak: No such file or directory
    Makefile:53: /common.mak: No such file or directory
    Makefile:93: /libavutil/Makefile: No such file or directory
    Makefile:93: /library.mak: No such file or directory
    Makefile:95: /doc/Makefile: No such file or directory
    Makefile:178: /tests/Makefile: No such file or directory
    make: *** No rule to make target `/tests/Makefile'.  Stop.
    ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
    ~/workspace/android-ffmpeg
    admin@ubuntu:~/workspace/android-ffmpeg$

    I got error : Freetype2 not found but if i build with the original ffmpeg include in this project, this error is not occur.

    How can i fix it ? Please help