Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (34)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (3921)

  • Using ffmpeg to chunk a long audio file

    3 novembre 2020, par Boris Adaev

    I have the following code here to split a long audio file (15 hours long) into shorter chunks (each a little over an hour long, except the last 16th one, which is whatever remains).

    


    import subprocess
import os, math

def get_length(input_video):
    result = subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration',
                             '-of', 'default=noprint_wrappers=1:nokey=1', input_video],
                             stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    return float(result.stdout)

def chunk(fname, title, split_by=3600):
    head_dir = title + ' (split)'
    if head_dir not in os.listdir():
        os.mkdir(head_dir)

    dur_seconds = get_length(fname)
    iters = math.ceil(dur_seconds / split_by)

    left_off = 0

    print(dur_seconds)

    for i in range(1, iters+1):
        last_iter = i == iters
        if not last_iter:
            go_till = left_off + 3630
        else:
            go_till = int(dur_seconds)

        print(f'from {left_off} to {go_till} for {i:02d}.mp3')
        subprocess.call(['ffmpeg', '-i', fname, '-ss', str(left_off), '-to', str(go_till),
                         '-c', 'copy', f'{head_dir}/{i:02d}.mp3'])
        left_off += 3600

fname = 'Brian C. Muraresku - The Immortality Key The Secret History of the Religion with No Name.mp3'
title = 'The Immortality Key'

chunk(fname, title)


    


    The code makes perfect sense, and when I run it with the subprocess.call line commented out, what it prints also makes sense.

    


    54681.353625
from 0 to 3630 for 01.mp3
from 3600 to 7230 for 02.mp3
from 7200 to 10830 for 03.mp3
from 10800 to 14430 for 04.mp3
from 14400 to 18030 for 05.mp3
from 18000 to 21630 for 06.mp3
from 21600 to 25230 for 07.mp3
from 25200 to 28830 for 08.mp3
from 28800 to 32430 for 09.mp3
from 32400 to 36030 for 10.mp3
from 36000 to 39630 for 11.mp3
from 39600 to 43230 for 12.mp3
from 43200 to 46830 for 13.mp3
from 46800 to 50430 for 14.mp3
from 50400 to 54030 for 15.mp3
from 54000 to 54681 for 16.mp3


    


    But with the subprocess.call line, it creates these audios (01.mp3, 02.mp3, 03.mp3, etc.), but the timestamps are wrong. When the code is done running, they all start from the same place for some odd reason.

    


    UPDATE : I also tried placing the -i part after the -ss part, as well as the following

    


    subprocess.call(['ffmpeg', '-ss', str(left_off), '-i', fname, '-t', '3630',
                 '-c', 'copy',  f'{head_dir}/{i:02d}.mp3'])


    


    But still the same problem. 15 identical audios, of which only the 15th is the way it's supposed to be, and then the last 16th ten minute remainder. When I run them separately, it goes as follows :

    


    01.mp3 is right,

    


    02.mp3 is right but 01.mp3 is now wrong, because it's identical to 02.mp3

    


    03.mp3 is right, but the previous two are identical to it

    


    04.mp3 is right, but the previous three are identical to it

    


    ... and so on

    


  • modifying a bit of code to ffmpeg / concat different audio formats into 1 long WAV file

    31 octobre 2020, par djturbojp7

    I have this script that I don't fully understand. It allows me to take a few different files (M4A and WEBM) and join them together with FFMPEG and create a long WAV of all of the audio.

    


    I need to change this to add a third format (OPUS)

    


    basically I want it to take all OPUS, m4A and WEBM audio files in a directory and joint them as one long WAV.

    


    can anyone help me here

    


    #!/bin/bash

for f in *\ *; do mv "$f" "${f// /_}"; done


INP="ffmpeg -hide_banner"
FCT=-1
FIL="-filter_complex "
for f in /media/jnono/sata_500gb_dump/working_dir_for_yt_grinding/*.{webm,m4a}; do
  INP+=" -i ${f}"
  ((FCT+=1))
  FIL+="[${FCT}:a:0]"
done
((FCT+=1))
INP+=" ${FIL}concat=n=${FCT}:v=0:a=1[a] -map [a] waveoutput.wav"
echo $INP
$INP


    


  • How can I use variables in long PowerShell command without breaking the command

    15 octobre 2020, par AFouquet

    I want to use ffmpeg to convert .m4a files in to .mp3 files.

    


    I can do it for each single file, but that takes a lot of effort to type in.

    


    ffmpeg -i '.\song.m4a' -ac 2 -b:a 192k '.\song.mp3'


    


    Is there a way to do this with powershell using variables ?
ex :

    


    ffmpeg -i $v -ac 2 -b:a 192k $v.mp3


    


    The problem with this is that then the -ac flag is taken as part of the path and not of ffmpeg anymore.

    


    Is there a way around this in powershell ?
    
Or could this be done with an array ? If I use $v=Get-ChildItem -Name and iterate over the array with a foreach loop in to the ffmpeg command.

    


    I am very new to PowerShell and don't have a lot of experience but it seems to me that should be possible to do.

    


    I would appreciate any help I can get.