Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (25)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (5659)

  • I made this code, but the sound is too loud, how can I reduce it ?

    7 juillet 2021, par Luiz Torres

    I want to reduce the volume, but nothing I tried worked

    


    async def play1(guild : discord.Guild, url):
  guild = client.get_guild(guild)
  FFMPEG_OPTIONS = {'before_options' : '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options' : '-vn'} #youtube_dl options
  YDL_OPTIONS = {'format': 'bestaudio/best', 'extractaudio': True, 'audioformat': 'mp3', 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
  'restrictfilenames': True, 'noplaylist': True, 'nocheckcertificate': True, 'ignoreerrors': False, 'logtostderr': False, 'quiet': True,
  'no_warnings': True, 'default_search': 'auto', 'source_address': '0.0.0.0'}
  cn = guild.voice_client #guild
  with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl :
    info = ydl.extract_info(url, download = False)
    url2 = info['formats'][0]['url']
    source = discord.FFmpegOpusAudio(source=url2, executable="ffmpeg", **FFMPEG_OPTIONS)
    cn.play(source) #play in channel


    


  • FFMPEG overlay issue for 2 videos, sound missing from second input

    27 juin 2021, par Abhishek Singh

    I'm trying to achieve an overlay with ffmpeg which take the two flv files as input and make a output and both videos playing simultaneously. things are working fine with below ffmpeg command :

    


    ffmpeg -i input1.flv -vf "[in] scale=359:320, pad=2*iw+6:ih [left]; movie=input2.flv, scale=359:320 [right]; [left][right] overlay=365:0 [out]" -b:v 3600k -y output.flv


    


    But issue is with the sound of second video and that is missing from the output.flv, only input1 sound is available in the output.flv.

    


    Console output is :

    


    ffmpeg version N-47062-g26c531c Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 25 2012 12:23:20 with gcc 4.7.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3
 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libass --enable-lib`enter code here`opencore-amrnb --enable-libopencore-
amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut -
-enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enab
le-libxavs --enable-libxvid --enable-zlib
  libavutil      52.  9.100 / 52.  9.100
  libavcodec     54. 77.100 / 54. 77.100
  libavformat    54. 37.100 / 54. 37.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 23.102 /  3. 23.102
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 17.101 /  0. 17.101
  libpostproc    52.  2.100 / 52.  2.100
Input #0, flv, from 'input1.flv':
  Metadata:
    canSeekToEnd    : false
    createdby       : FMS 4.0
    creationdate    : Mon Jan 07 07:05:40 2013
    encoder         : Lavf54.37.100
  Duration: 00:03:04.81, start: 0.000000, bitrate: 314 kb/s
    Stream #0:0: Video: flv1, yuv420p, 160x120, 3600 kb/s, 1k tbr, 1k tbn, 1k tb
c
    Stream #0:1: Audio: mp3, 22050 Hz, mono, s16, 32 kb/s
Output #0, flv, to 'output.flv':
  Metadata:
    canSeekToEnd    : false
    createdby       : FMS 4.0
    creationdate    : Mon Jan 07 07:05:40 2013
    encoder         : Lavf54.37.100
    Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 724x320, q=2-31,
3600 kb/s, 1k tbn, 1k tbc
    Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 22050 Hz, mono, s16p
Stream mapping:
  Stream #0:0 -> #0:0 (flv -> flv)
  Stream #0:1 -> #0:1 (mp3 -> libmp3lame)
Press [q] to stop, [?] for help
frame=  120 fps=0.0 q=4.5 size=     550kB time=00:00:08.57 bitrate= 525.3kbits/s
frame=  225 fps=221 q=2.0 size=    1422kB time=00:00:18.26 bitrate= 637.6kbits/s
Buffer queue overflow, dropping.
[Parsed_overlay_4 @ 02259ae0] Buffer queue overflow, dropping.
    Last message repeated 1 times
frame=  338 fps=222 q=2.0 size=    2414kB time=00:00:26.97 bitrate= 733.0kbits/s
Buffer queue overflow, dropping.
[Parsed_overlay_4 @ 02259ae0] Buffer queue overflow, dropping.
    Last message repeated 12 times
frame=  452 fps=223 q=2.0 size=    3326kB time=00:00:35.38 bitrate= 770.1kbits/s
frame=  562 fps=223 q=2.0 size=    4246kB time=00:00:43.15 bitrate= 806.0kbits/s
Buffer queue overflow, dropping.
[Parsed_overlay_4 @ 02259ae0] Buffer queue overflow, dropping.
    Last message repeated 11 times
frame=  669 fps=221 q=2.0 size=    5237kB time=00:00:51.28 bitrate= 836.6kbits/s
frame=  777 fps=220 q=2.0 size=    6105kB time=00:00:58.75 bitrate= 851.2kbits/s
frame=  893 fps=222 q=2.0 size=    6897kB time=00:01:06.72 bitrate= 846.8kbits/s
frame= 1006 fps=222 q=2.0 size=    7701kB time=00:01:14.60 bitrate= 845.6kbits/s
frame= 1121 fps=223 q=2.0 size=    8539kB time=00:01:22.45 bitrate= 848.3kbits/s
frame= 1235 fps=223 q=2.0 size=    9316kB time=00:01:30.39 bitrate= 844.3kbits/s
frame= 1344 fps=223 q=2.0 size=   10135kB time=00:01:37.98 bitrate= 847.3kbits/s
Buffer queue overflow, dropping.
[Parsed_overlay_4 @ 02259ae0] Buffer queue overflow, dropping.
    Last message repeated 33 times
frame= 1437 fps=220 q=2.0 size=   10800kB time=00:01:46.67 bitrate= 829.3kbits/s
frame= 1540 fps=219 q=2.0 size=   11577kB time=00:01:54.16 bitrate= 830.7kbits/s
frame= 1651 fps=219 q=2.0 size=   12330kB time=00:02:01.64 bitrate= 830.3kbits/s
frame= 1756 fps=218 q=2.0 size=   13141kB time=00:02:09.06 bitrate= 834.1kbits/s
frame= 1859 fps=217 q=2.0 size=   13879kB time=00:02:16.28 bitrate= 834.3kbits/s
frame= 1962 fps=217 q=2.0 size=   14703kB time=00:02:23.69 bitrate= 838.2kbits/s
frame= 2070 fps=217 q=2.0 size=   15448kB time=00:02:30.98 bitrate= 838.2kbits/s
frame= 2176 fps=216 q=2.0 size=   16241kB time=00:02:38.46 bitrate= 839.6kbits/s
Buffer queue overflow, dropping.
[Parsed_overlay_4 @ 02259ae0] Buffer queue overflow, dropping.
    Last message repeated 20 times
frame= 2275 fps=215 q=2.0 size=   16990kB time=00:02:46.78 bitrate= 834.5kbits/s
frame= 2389 fps=216 q=1.6 size=   17784kB time=00:02:54.44 bitrate= 835.1kbits/s
frame= 2493 fps=216 q=2.0 size=   18555kB time=00:03:01.73 bitrate= 836.4kbits/s
frame= 2534 fps=216 q=2.0 Lsize=   18945kB time=00:03:04.81 bitrate= 839.7kbits/
s
video:18227kB audio:588kB subtitle:0 global headers:0kB muxing overhead 0.691204
%


    


    I think -map is filter that is for the audio handling of both video. see this link.

    


    Superimposing two videos onto a static image ?

    


  • no video above 360P with sound ytdl-core

    26 juin 2021, par Ashish

    I am able to download youtube separate videos and audios. but merging not working. 0 KB file is downloading

    


    let info = await ytdl.getInfo(req.body.videoId);
let formatVideo = ytdl.chooseFormat(info.formats, { quality: req.body.format.itag, filter: 'videoonly' });
let formatAudio = ytdl.chooseFormat(info.formats, { quality: req.body.audioTag });
// res.json({video: formatVideo, audio: formatAudio});
const tracker = {
  start: Date.now(),
  audio: { downloaded: 0, total: Infinity },
  video: { downloaded: 0, total: Infinity },
  merged: { frame: 0, speed: '0x', fps: 0 },
};
res.header('Content-Disposition', `attachment; filename=${fileName}`);

cp.exec(`ffmpeg -i ${videoStream} -i ${audioStream} -c copy ${fileName}`, (error, success) => {
  if (!error) {
    console.log(success);
  } else {
    console.log(error);
  }
});
// Prepare the progress bar
let progressbarHandle = null;
const progressbarInterval = 1000;
const showProgress = () => {
  console.log('test');
  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
  `${fileName}`,
], {
  windowsHide: true,
  stdio: [
    /* Standard: stdin, stdout, stderr */
    'inherit', 'inherit', 'inherit',
    /* Custom: pipe:3, pipe:4, pipe:5 */
    'pipe', 'pipe', 'pipe', 'pipe'
  ],
});
ffmpegProcess.on('close', () => {
  console.log('done');
  // Cleanup
  process.stdout.write('\n\n\n\n');
  clearInterval(progressbarHandle);
  console.log(tracker, '146');
});

// Link streams
// FFmpeg creates the transformer streams and we just have to insert / read data
ffmpegProcess.stdio[3].on('data', chunk => {
  console.log(chunk, '152');
  // 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 = {};
  for (const l of lines) {
    const [key, value] = l.split('=');
    args[key.trim()] = value.trim();
  }
  tracker.merged = args;
  // console.log(tracker.merged, '162');
});
// audio.pipe(ffmpegProcess.stdio[4]);
// video.pipe(ffmpegProcess.stdio[5]);
const audioStream = await requestObj.get(formatAudio.url);
const videoStream = await requestObj.get(formatVideo.url);
audioStream.pipe(ffmpegProcess.stdio[4]);
videoStream.pipe(ffmpegProcess.stdio[5]);
ffmpegProcess.stdio[6].pipe(res);


    


    here requestObj is a node js 'request' module