
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (35)
-
Publier sur MédiaSpip
13 juin 2013Puis-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, parMediaSPIP 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, parLes 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 (6890)
-
How to turn on/off synthesized sound sources during streaming distribution
28 mars 2022, par its-ogawaStreaming via ffmpeg.
The filter_complex option allows us to synthesize two sound sources, but is it possible to turn on/off the synthesized sound source at an arbitrary timing ?
One of the sound sources is audio from the microphone input, which will be on throughout the streaming. Other than that, we would like to turn on/off several sound sources at any given time.


For example, to turn on the microphone input and one sound source at all times, the following command is executed


ffmpeg -rtbufsize 100M -f dshow -video_device_number 0 -i video="my camera" -i my_audio.mp3 -filter_complex "[1:a]volume=0.05,apad[0];[0][1]amerge[out]" -map 0:v -map [out]:a -f hls -hls_segment_type fmp4 -hls_time 5 -hls_fmp4_init_filename init.mp4 hls.m3u8 -f mpegts -flush_packets 0 udp://XXX.XXX.XXX.XXX:XXX?pkt_size=1316



-
FFMPEG's xstack command results in out of sync sound, is it possible to mix the audio in a single encoding ?
24 septembre 2021, par jokoonFMPEG xstack command results in out of sync sound, is it possible mix the audio in xstack ?


I wrote a python script that generates a xstack complex filter command. The video inputs is a mixture of several formats described here :


I have 2 commands generated, one for the xstack filter, and one for the audio mixing.


Here is the stack command : (sorry the text doesn't wrap !)


'c:/ydl/ffmpeg.exe',
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-filter_complex',
'[0]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf0];[rsclbf0]fps=24[rscl0];[1]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf1];[rsclbf1]fps=24[rscl1];[2]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf2];[rsclbf2]fps=24[rscl2];[3]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf3];[rsclbf3]fps=24[rscl3];[4]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf4];[rsclbf4]fps=24[rscl4];[5]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf5];[rsclbf5]fps=24[rscl5];[6]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf6];[rsclbf6]fps=24[rscl6];[7]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf7];[rsclbf7]fps=24[rscl7];[8]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf8];[rsclbf8]fps=24[rscl8];[9]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf9];[rsclbf9]fps=24[rscl9];[10]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf10];[rsclbf10]fps=24[rscl10];[11]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf11];[rsclbf11]fps=24[rscl11];[12]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf12];[rsclbf12]fps=24[rscl12];[13]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf13];[rsclbf13]fps=24[rscl13];[14]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2, setsar=1[rsclbf14];[rsclbf14]fps=24[rscl14];[rscl0][rscl1][rscl2][rscl3][rscl4]concat=n=5[cct0];[rscl5][rscl6][rscl7]concat=n=3[cct1];[rscl8][rscl9][rscl10]concat=n=3[cct2];[rscl11][rscl12][rscl13][rscl14]concat=n=4[cct3];[cct0][cct1][cct2][cct3]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0',
'output.mp4',



Here is the mix_audio command :


'c:/ydl/ffmpeg.exe',
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-i', 'inputX.mp4'
'-filter_complex',
'[0:a][1:a][2:a][3:a][4:a]concat=n=5:v=0:a=1[cct_a0];[5:a][6:a][7:a]concat=n=3:v=0:a=1[cct_a1];[8:a][9:a][10:a]concat=n=3:v=0:a=1[cct_a2];[11:a][12:a][13:a][14:a]concat=n=4:v=0:a=1[cct_a3];[cct_a0][cct_a1][cct_a2][cct_a3]amix=inputs=4[all_aud]',
'-map',
'15:v',
'-map',
'[all_aud]',
'-c:v',
'copy',
'output.mp4',



Of course those are sample commands, I actually use many more videos as input, this sample is shorter for the sake or readability.


Here are the videos I use, with relevant ffprobe data, in some HTML table :




I'm getting this warning :


[swscaler @ 0000020bac5a19c0] Warning: data is not aligned! This can lead to a speed loss



I think this is unrelated to audio desyncing this unaligned data is about x264 resolutions being multiple of 16, but my filter takes this into account already.


There is a perceptible audio desyncing, which is the main problem I am having. FFMPEG doesn't seem to get other errors. Is it because I use 2 commands to mix the audio after ? How could I proceed to to the xstack stage and the audio mixing in a single stage ?


Here is a message from avidemux when I add some of the videos, which I changed the container from AVI to MP4 with ffmpeg :




-
Record web browser with sound as a service on linux server with puppeteer
12 septembre 2021, par NA GUYI'm trying to build a service on a linux server to record video a web browser with its sound.


The first step I did with the source code below (using xvfb, puppeteer and ffmpeg) to record successfully.


However when I do a recording with different processes at a same time (different websites) the audio gets mixed up between the processes.
I know this is happening because I used the same default audio output for all processes.


The question is : how can I record the browser with sound that doesn't get mixed up between different processes ?


My sample code below :


var Xvfb = require('xvfb');
var puppeteer = require('puppeteer');
const { spawn, spawnSync } = require('child_process');

async function record() {

 var xvfb = new Xvfb({
 displayNum: 99,
 reuse: false,
 xvfb_args: [
 "-screen", "0", "1920x1080x24",
 "-ac",
 "-nolisten", "tcp",
 "-dpi", "96",
 "+extension", "RANDR"
 ]
 });

 xvfb.startSync();

 var browser = await puppeteer.launch({
 headless: false,
 defaultViewport: null,
 ignoreDefaultArgs: [
 "--mute-audio",
 "--enable-automation"
 ],
 args: [
 "--use-fake-ui-for-media-stream",
 "--window-size=1920,1080",
 "--start-fullscreen"
 ]
 });
 const page = await browser.newPage();

 var url = "http://www.noiseaddicts.com/free-samples-mp3/?id=2544";
 await page.goto(url);
 await page.click('span.map_play');

 var time = new Date().getTime();

 var options = [
 "-video_size", "1920x1080",
 "-framerate", "30",
 "-f", "x11grab",
 "-draw_mouse", "0",
 "-i", ":99",

 "-f", "pulse",
 "-ac", "2",
 "-i", "1",
 "./output" + time + ".mkv"
 ];

 var cmd = 'ffmpeg';

 var proc = spawn(cmd, options);

 proc.stdout.on('data', function (data) {
 console.log(data);
 });

 proc.stderr.setEncoding("utf8")
 proc.stderr.on('data', function (data) {
 console.log(data);
 });

 proc.on('close', async function () {
 console.log('finished');
 xvfb.stopSync();
 });
}

record();