Recherche avancée

Médias (91)

Autres articles (94)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • 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 ) (...)

Sur d’autres sites (10951)

  • ffmpeg trailing options with colon on windows

    26 juillet 2021, par user2929452

    I've just switched to Windows 10 Pro.

    


    When I open a shell to use ffmpeg, any time I use an option with a colon I get an error.

    


    for example :

    


    ffmpeg -thread_queue_size 4096 -r 24 -i uncompressed.mov -c:v libx264 -b:v 40m -profile:v main -crf 31 -pix_fmt yuv420p -c:a aac -b:a 192K -strict -2 -vf eq=saturation=1.3 compressed_31.mp4


    


    gives :

    


    [NULL @ 0000023184ac8c40] Unable to find a suitable output format for 'libx264'
libx264: Invalid argument


    


    if I get rid of -c:v libx264, then I get the same error with '40m', or with 'main' etc... so it's always trying to read the argument after an option with a colon as the output file.

    


    Is this a windows thing ? All my commands work fine in a mac terminal.

    


    I assume the answer is simple. Apologies for my ignorance. Feels like I'm misunderstanding the windows shell or ffmpeg on windows.

    


  • How to mux *only* TTML subtitles into fmp4 file(s)

    25 juin 2021, par Chris

    As of WWDC 2017, HLS on Apple devices has supported TTML (specifically IMSC1)

    


    Subtitles are made available to me in a single XML file, which I wish to slice/package so that it can be distributed alongside the video assets, i.e. as fmp4 fragments containing only the subtitle stream.

    


    (slicing is not strictly required - correct muxing into a single file would be acceptable)

    


    While it feels like something that ffmpeg or mp4box should be capable of doing, documentation for correctly achieving that is proving elusive. Examples, including this one which would perform slicing and m3u8 generation, all assume subtitles are being added to a video asset, rather than packaged to be delivered in parallel.

    


    Any attempt to approximate that, having removed video-specific options only results in errors :

    


    ffmpeg -i subitles.ttml \
    -hls_time 60 \
    -hls_playlist_type vod \
    -hls_segment_type fmp4 \
    -hls_segment_filename "segment%d.m4s" \
    index.m3u8
    
subtitles.ttml: Invalid data found when processing input


    


    Whether this is because the TTML is invalid (although I don't believe that's likely), or because FFmpeg is trying to read it as if it was video, I cannot say.

    


  • Python get audio data from rtsp stream

    22 avril 2021, par smashedbotatos

    I am trying to get audio data from an rstp stream that is in the format of mlaw with Python 3.7. I want to be able to place it in a numpy array like I can do with pyaudio. Then when there is sound, record it. It isn't something that always has audio noise.

    


    This is how I coded it for Pyaudio using a physical input. Basically I want to do the same, but instead use an RTSP stream from a URL.

    


    p = pyaudio.PyAudio()
stream = self.p.open(format=FORMAT,
                     channels=CHANNELS,
                     rate=RATE,
                     input=True,
                     output=True,
                     frames_per_buffer=chunk)

def listen(self):
  print('Listening beginning')
  while True:
      input = self.stream.read(chunk)
      rms_val = self.rms(input)
      if rms_val > Threshold:
          record()

def record():
    print('Noise detected, recording beginning')
    rec = []
    rec_start = time.time()
    current = time.time()
    end = time.time() + TIMEOUT_LENGTH

    while current <= end:

        data = self.stream.read(chunk)
        if rms(data) >= Threshold: end = time.time() + 2

        current = time.time()
        rec.append(data)

def rms(frame):
    count = len(frame) / swidth
    format = "%dh" % (count)
    shorts = struct.unpack(format, frame)
    sum_squares = 0.0
    for sample in shorts:
        n = sample * SHORT_NORMALIZE
        sum_squares += n * n
    rms = math.pow(sum_squares / count, 0.5)
    return rms * 1000


    


    Here is what I have tried for ffmpeg, but it just freezes with no error and doesn't print any data. It even actually crashes the IoT device with the rtsp stream on it. Is there a way i can do this with urllib or requests or even an ffmpeg command opened with subprocess ?

    


    import ffmpeg

packet_size = 4096

process = ffmpeg.input('rtsp://192.168.1.122:554/au:scanner.au').output('-', format='mulaw').run_async(pipe_stdout=True)
packet = process.stdout.read(packet_size)

while process.poll() is None:
    packet = process.stdout.read(packet_size)
    print(packet)


    


    My end result is doing two things. One recording a wav when there is audio, Two, converting from the recorded wav and uploading that audio to SFTP as opus and mp3.