Recherche avancée

Médias (91)

Autres articles (29)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (6107)

  • Feed output of one filter to the input of one filter multiple times with ffmpeg

    27 août 2021, par kentcdodds

    I have the following ffmpeg commands to create a podcast episode :

    


    # remove all silence at start and end of the audio files
ffmpeg -i call.mp3 -af silenceremove=1:0:-50dB call1.mp3
ffmpeg -i response.mp3 -af silenceremove=1:0:-50dB response1.mp3

# remove silence longer than 1 second anywhere within the audio files
ffmpeg -i call1.mp3 -af silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB call2.mp3
ffmpeg -i response1.mp3 -af silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB response2.mp3

# normalize audio files
ffmpeg -i call2.mp3 -af loudnorm=I=-16:LRA=11:TP=0.0 call3.mp3
ffmpeg -i response2.mp3 -af loudnorm=I=-16:LRA=11:TP=0.0 response3.mp3

# cross fade audio files with intro/interstitial/outro
ffmpeg -i intro.mp3 -i call3.mp3 -i interstitial.mp3 -i response3.mp3 -i outro.mp3
  -filter_complex "[0][1]acrossfade=d=1:c2=nofade[a01];
                   [a01][2]acrossfade=d=1:c1=nofade[a02];
                   [a02][3]acrossfade=d=1:c2=nofade[a03];
                   [a03][4]acrossfade=d=1:c1=nofade"
  output.mp3


    


    While this "works" fine, I can't help but feel like it would be more efficient to do this all in one ffmpeg command. Based on what I found online this should be possible, but I don't understand the syntax well enough to know how to make it work. Here's what I tried :

    


    ffmpeg -i intro.mp3 -i call.mp3 -i interstitial.mp3 -i response.mp3 -i outro.mp3
       -af [1]silenceremove=1:0:-50dB[trimmedCall]
       -af [3]silenceremove=1:0:-50dB[trimmedResponse]
       -af [trimmedCall]silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB[noSilenceCall]
       -af [trimmedResponse]silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB[noSilenceResponse]
       -af [noSilenceCall]loudnorm=I=-16:LRA=11:TP=0.0[call]
       -af [noSilenceResponse]loudnorm=I=-16:LRA=11:TP=0.0[response]
      -filter_complex "[0][call]acrossfade=d=1:c2=nofade[a01];
                       [a01][2]acrossfade=d=1:c1=nofade[a02];
                       [a02][response]acrossfade=d=1:c2=nofade[a03];
                       [a03][4]acrossfade=d=1:c1=nofade"
  output.mp3


    


    But I have a feeling I have a fundamental misunderstanding of this because I got this error which I don't understand :

    


    Stream specifier 'call' in filtergraph description 
[0][call]acrossfade=d=1:c2=nofade[a01];
[a01][2]acrossfade=d=1:c1=nofade[a02];
[a02][response]acrossfade=d=1:c2=nofade[a03];
[a03][4]acrossfade=d=1:c1=nofade
       matches no streams.


    


    For added context, I'm running all these commands through @ffmpeg/ffmpeg so that last command actually looks like this (in JavaScript) :

    


    await ffmpeg.run(
  '-i', 'intro.mp3',
  '-i', 'call.mp3',
  '-i', 'interstitial.mp3',
  '-i', 'response.mp3',
  '-i', 'outro.mp3',
  '-af', '[1]silenceremove=1:0:-50dB[trimmedCall]',
  '-af', '[3]silenceremove=1:0:-50dB[trimmedResponse]',
  '-af', '[trimmedCall]silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB[noSilenceCall]',
  '-af', '[trimmedResponse]silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB[noSilenceResponse]',
  '-af', '[noSilenceCall]loudnorm=I=-16:LRA=11:TP=0.0[call]',
  '-af', '[noSilenceResponse]loudnorm=I=-16:LRA=11:TP=0.0[response]',
  '-filter_complex', `
[0][call]acrossfade=d=1:c2=nofade[a01];
[a01][2]acrossfade=d=1:c1=nofade[a02];
[a02][response]acrossfade=d=1:c2=nofade[a03];
[a03][4]acrossfade=d=1:c1=nofade
  `,
  'output.mp3',
)


    


  • How can I stream very long H.264 videos over HTTP without long startup times ? (or : MOOV atom too large)

    5 octobre 2012, par michael

    I want to stream videos of public meetings that are often 10 hours long. Users will generally be starting at some point in the middle of the video and jumping around frequently.

    H.264 in an MP4 container seems like the current best option for encoding streaming video (right ?). But these are large files — about 1.3GB for one file — and the metadata (MOOV atom) at the beginning of the file is itself about 40MB. If I understand correctly, clients need to download the full metadata before they're able to seek within the remainder of the file. Obviously, having to download 40MB before you can start streaming is unacceptable.

    (My tests of streaming have been with VLC and the HTML5 tag in Chrome.)

    I'm encoding the file using avconv, and am currently providing no additional settings beyond telling it which encoders to use (x264 and libfaac). I then move the metadata to the beginning of the file using qt-faststart.

    Is there a way to make the MOOV atom smaller ?

    If not, are there other strategies to use (e.g. is splitting long videos into several files something that's frequently done ? it seems like a real pain in terms of users seeking around the whole day's video) ?

    Or should I be using a different codec or container ?

    thanks !

    Here's a breakdown of the file header structure, from AtomicParsley :

    Atom ftyp @ 0 of size: 32, ends @ 32
    Atom moov @ 32 of size: 40157673, ends @ 40157705
        Atom mvhd @ 40 of size: 108, ends @ 148
        Atom iods @ 148 of size: 24, ends @ 172
        Atom trak @ 172 of size: 20156304, ends @ 20156476
            Atom tkhd @ 180 of size: 92, ends @ 272
            Atom edts @ 272 of size: 36, ends @ 308
                Atom elst @ 280 of size: 28, ends @ 308
            Atom mdia @ 308 of size: 20156168, ends @ 20156476
                Atom mdhd @ 316 of size: 32, ends @ 348
                Atom hdlr @ 348 of size: 45, ends @ 393
                Atom minf @ 393 of size: 20156083, ends @ 20156476
                    Atom vmhd @ 401 of size: 20, ends @ 421
                    Atom dinf @ 421 of size: 36, ends @ 457
                        Atom dref @ 429 of size: 28, ends @ 457
                    Atom stbl @ 457 of size: 20156019, ends @ 20156476
                        Atom stsd @ 465 of size: 147, ends @ 612
                            Atom avc1 @ 481 of size: 131, ends @ 612
                                Atom avcC @ 567 of size: 45, ends @ 612
                        Atom stts @ 612 of size: 6115608, ends @ 6116220
                        Atom stss @ 6116220 of size: 16960, ends @ 6133180
                        Atom ctts @ 6133180 of size: 5683824, ends @ 11817004
                        Atom stsc @ 11817004 of size: 28, ends @ 11817032
                        Atom stsz @ 11817032 of size: 4169724, ends @ 15986756
                        Atom stco @ 15986756 of size: 4169720, ends @ 20156476
        Atom trak @ 20156476 of size: 20001133, ends @ 40157609
            Atom tkhd @ 20156484 of size: 92, ends @ 20156576
            Atom mdia @ 20156576 of size: 20001033, ends @ 40157609
                Atom mdhd @ 20156584 of size: 32, ends @ 20156616
                Atom hdlr @ 20156616 of size: 45, ends @ 20156661
                Atom minf @ 20156661 of size: 20000948, ends @ 40157609
                    Atom smhd @ 20156669 of size: 16, ends @ 20156685
                    Atom dinf @ 20156685 of size: 36, ends @ 20156721
                        Atom dref @ 20156693 of size: 28, ends @ 20156721
                    Atom stbl @ 20156721 of size: 20000888, ends @ 40157609
                        Atom stsd @ 20156729 of size: 96, ends @ 20156825
                            Atom mp4a @ 20156745 of size: 80, ends @ 20156825
                                Atom esds @ 20156781 of size: 44, ends @ 20156825
                        Atom stts @ 20156825 of size: 9348168, ends @ 29504993
                        Atom stsc @ 29504993 of size: 28, ends @ 29505021
                        Atom stsz @ 29505021 of size: 5326296, ends @ 34831317
                        Atom stco @ 34831317 of size: 5326292, ends @ 40157609
        Atom udta @ 40157609 of size: 96, ends @ 40157705
            Atom meta @ 40157617 of size: 88, ends @ 40157705
                Atom hdlr @ 40157629 of size: 33, ends @ 40157662
                Atom ilst @ 40157662 of size: 43, ends @ 40157705
                    Atom ©too @ 40157670 of size: 35, ends @ 40157705
                        Atom data @ 40157678 of size: 27, ends @ 40157705
    Atom free @ 40157705 of size: 8, ends @ 40157713
    Atom mdat @ 40157713 of size: 1320096566, ends @ 1360254279
  • I'm trying to merge videos using fluent-ffmpeg, but some times it merges videos , but whenever we tries to merge videos second time it shows error

    9 janvier 2024, par Asif Mujawar
    const express =require('express')
const app = express()
const ffmpeg = require('fluent-ffmpeg')
const ffmpegPath = require('@ffmpeg-installer/ffmpeg')
const ffprobe = require('@ffprobe-installer/ffprobe')

const first = './videos/first.mp4'
const second = './videos/second.mp4'
const third = './videos/third.mp4'
const fourth = './videos/fourth.mp4'

ffmpeg.setFfprobePath(ffprobe.path)
ffmpeg.setFfmpegPath(ffmpegPath.path)

app.use(express.json())

app.use("/",(req,res)=>{
    res.send("hello")

    ffmpeg()
    .input(first)
    .input(second)
 
    .on('end', function() {
      console.log('files have been merged succesfully');
    })
    .on('error', function(err) {
      console.log('an error happened: ' + err.message);
    })
    .mergeToFile("final.mp4")
  })
  

app.listen(8800,()=>{
    console.log("backend is running 8800")
})



    


    but it shows error whenever we try to merge videos second time

    


    an error happened : ffmpeg exited with code 1 : Cannot find a matching stream for unlabeled input pad 3 on filter Parsed_concat_0

    


    an error happened : ffmpeg exited with code 1 : Cannot find a matching stream for unlabeled input pad 3 on filter Parsed_concat_0