Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (105)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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

Sur d’autres sites (8929)

  • How to add multiple audio to a video at specific time for specific duration

    14 février 2021, par Javed Saifi

    I have a video.mp4 file of 20 seconds without audio stream, and I have 2 audio files audio1.mp3 and audio2.mp3. What I want is audio1 should start playe at 3 seconds for 5 seconds, and audio 2 should start play at 10 seconds for 6 seconds.

    


    ffmpeg -y -i video1.mp4 -i audio1.mp3 -i audio2.mp3 -filter_complex "[1]adelay=3000|3000[aud1];[2]adelay=10000|10000[aud2];[aud1][aud2]amix=2,apad[a];
[0][a]amix=duration=first[a]" -map 0:v -map "[a]" -c:v copy -ac 2 output.mp4


    


    what I'm trying to achieve is the final output will be a 20 seconds video where audio1 will start palying at 3 seconds to 8 seconds and audio2 will start from 10 seconds to 16 seconds.

    


  • Ffmpeg 4 audio and 1 video input to 4 video outputs performance issue

    22 février 2021, par Yusufu

    I have create 4 null sink pulse monitor and it works fine.
When I publish 4 output to rtmp audio having noise and stopping. When works with 2 outputs it works fine.
If I decrease the resolution from 1920x1080 to 1280*720 it works fine too.
Using 4 different audio inputs and 1 video input

    


    
SCREEN_WIDTH=1920
SCREEN_HEIGHT=1080
SCREEN_RESOLUTION=${SCREEN_WIDTH}x${SCREEN_HEIGHT}
COLOR_DEPTH=24
X_SERVER_NUM=2
VIDEO_BITRATE=3000
VIDEO_FRAMERATE=30
VIDEO_GOP=$((VIDEO_FRAMERATE))
AUDIO_BITRATE=160k
AUDIO_SAMPLERATE=44100
AUDIO_CHANNELS=1
#some codes here

ffmpeg -y\
  -hide_banner -loglevel error \
  -nostdin \
  -s ${SCREEN_RESOLUTION} \
  -r ${VIDEO_FRAMERATE} \
  -draw_mouse 0 \
  -f x11grab \
    -i ${DISPLAY} \
  -f pulse -i MySink1.monitor \
  -f pulse -i MySink2.monitor \
  -f pulse -i MySink3.monitor \
  -f pulse -i MySink4.monitor \
  -c:v libx264 \
    -pix_fmt yuv420p \
    -profile:v main \
    -preset veryfast \
    -minrate ${VIDEO_BITRATE} \
    -maxrate ${VIDEO_BITRATE} \
    -g ${VIDEO_GOP} \
    -map 0 -f flv -map 1  ${RTMP_URL1} \
  -c:v libx264 \
    -pix_fmt yuv420p \
    -profile:v main \
    -preset veryfast \
    -minrate ${VIDEO_BITRATE} \
    -maxrate ${VIDEO_BITRATE} \
    -g ${VIDEO_GOP} \
    -map 0 -f flv -map 2  ${RTMP_URL2} \
  -c:v libx264 \
    -pix_fmt yuv420p \
    -profile:v main \
    -preset veryfast \
    -minrate ${VIDEO_BITRATE} \
    -maxrate ${VIDEO_BITRATE} \
    -g ${VIDEO_GOP} \
    -map 0 -f flv -map 3  ${RTMP_URL3} \
  -c:v libx264 \
    -pix_fmt yuv420p \
    -profile:v main \
    -preset veryfast \
    -minrate ${VIDEO_BITRATE} \
    -maxrate ${VIDEO_BITRATE} \
    -g ${VIDEO_GOP} \
    -map 0 -f flv -map 4  ${RTMP_URL4} \````
    
I guess I need some performance issue. How can I add **tee** or use one decoded video in all outputs. 


    


  • FFMPEG - how to transcode input stream while cutting off first few seconds of video and audio

    25 septembre 2020, par purplepear24

    I am using ffmpeg to transcode a screen-record (x11) input stream to MP4. I would like to cut off the first 10 seconds of the stream, which is just a blank screen (this is intentional).

    


    I understand how to trim video with ffmpeg when converting from mp4 to another mp4, but i can't find any working solution for processing an input stream while accounting for delay and audio/video syncing.

    


    Here is my current code :

    


    const { spawn } = require('child_process');
const { S3Uploader } = require('./utils/upload');

const MEETING_URL = process.env.MEETING_URL || 'Not present in environment';
console.log(`[recording process] MEETING_URL: ${MEETING_URL}`);

const args = process.argv.slice(2);
const BUCKET_NAME = args[0];
console.log(`[recording process] BUCKET_NAME: ${BUCKET_NAME}`);
const BROWSER_SCREEN_WIDTH = args[1];
const BROWSER_SCREEN_HEIGHT = args[2];
const MEETING_ID = args[3];
console.log(`[recording process] BROWSER_SCREEN_WIDTH: ${BROWSER_SCREEN_WIDTH}, BROWSER_SCREEN_HEIGHT: ${BROWSER_SCREEN_HEIGHT}, TASK_NUMBER: 43`);

const VIDEO_BITRATE = 3000;
const VIDEO_FRAMERATE = 30;
const VIDEO_GOP = VIDEO_FRAMERATE * 2;
const AUDIO_BITRATE = '160k';
const AUDIO_SAMPLERATE = 44100;
const AUDIO_CHANNELS = 2
const DISPLAY = process.env.DISPLAY;

const transcodeStreamToOutput = spawn('ffmpeg',[
    '-hide_banner',
    '-loglevel', 'error',
    // disable interaction via stdin
    '-nostdin',
    // screen image size
    // '-s', `${BROWSER_SCREEN_WIDTH}x${BROWSER_SCREEN_HEIGHT}`,
    '-s', '1140x720',
    // video frame rate
    '-r', `${VIDEO_FRAMERATE}`,
    // hides the mouse cursor from the resulting video
    '-draw_mouse', '0',
    // grab the x11 display as video input
    '-f', 'x11grab',
    '-i', ':1.0+372,8',
    // '-i', `${DISPLAY}`,
    // grab pulse as audio input
    '-f', 'pulse', 
        '-ac', '2',
        '-i', 'default',
    // codec video with libx264
    '-c:v', 'libx264',
        '-pix_fmt', 'yuv420p',
        '-profile:v', 'main',
        '-preset', 'veryfast',
        '-x264opts', 'nal-hrd=cbr:no-scenecut',
        '-minrate', `${VIDEO_BITRATE}`,
        '-maxrate', `${VIDEO_BITRATE}`,
        '-g', `${VIDEO_GOP}`,
    // apply a fixed delay to the audio stream in order to synchronize it with the video stream
    '-filter_complex', 'adelay=delays=1000|1000',
    // codec audio with aac
    '-c:a', 'aac',
        '-b:a', `${AUDIO_BITRATE}`,
        '-ac', `${AUDIO_CHANNELS}`,
        '-ar', `${AUDIO_SAMPLERATE}`,
    // adjust fragmentation to prevent seeking(resolve issue: muxer does not support non seekable output)
    '-movflags', 'frag_keyframe+empty_moov+faststart',
    // set output format to mp4 and output file to stdout
    '-f', 'mp4', '-'
    ]
);

transcodeStreamToOutput.stderr.on('data', data => {
    console.log(`[transcodeStreamToOutput process] stderr: ${(new Date()).toISOString()} ffmpeg: ${data}`);
});

const timestamp = new Date();
const year = timestamp.getFullYear();
const month = timestamp.getMonth() + 1;
const day = timestamp.getDate();
const hour = timestamp.getUTCHours();
console.log(MEETING_ID);
const fileName = `${year}/${month}/${day}/${hour}/${MEETING_ID}.mp4`;
new S3Uploader(BUCKET_NAME, fileName).uploadStream(transcodeStreamToOutput.stdout);

// event handler for docker stop, not exit until upload completes
process.on('SIGTERM', (code, signal) => {
    console.log(`[recording process] exited with code ${code} and signal ${signal}(SIGTERM)`);
    process.kill(transcodeStreamToOutput.pid, 'SIGTERM');
});

// debug use - event handler for ctrl + c
process.on('SIGINT', (code, signal) => {
    console.log(`[recording process] exited with code ${code} and signal ${signal}(SIGINT)`)
    process.kill('SIGTERM');
});

process.on('exit', function(code) {
    console.log('[recording process] exit code', code);
});


    


    Any help would be greatly appreciated !