Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (70)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • 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

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (13327)

  • Call ffmpeg via PHP but dont wait on it

    12 février 2014, par swg1cor14

    I have my upload script that handles the file upload and then calls exec(ffmpeg -i......

    I call ffmpeg 3 times. One to convert to mp4, one to convert to wemb and one to get thumbnail.

    Problem is that if an investigator uploads ALL his footage, he doesnt want to have to sit there and wait for it to convert before he can do anything else. So how can i send the 3 commands and then exit the script ?

    I also want to run exec(rm -r /path/to/original) so the original video is deleted but obviously I have to wait for conversions to be complete before it can be run

  • ffmpeg audio file cropping breaking on longer audio files

    5 août 2021, par connor449

    I have a bunch of audio files. I am trying to crop the first and last 10% of the files off, keeping only the middle 80%.

    


    Essentially what I am doing :

    


      

    • read file
    • 


    • get duration of audio file in seconds
    • 


    • use ffmpeg to crop the file from duration0.1 to duration0.9
    • 


    


    I am using this code :

    


    import wave
import contextlib
import subprocess
import glob

data = []
duration_L = []

for path in glob.glob('audio/*/*.wav'):
    name = str(path).split('/')[-1].split('.')[0]
    label = str(path).split('/')[-2]

    with contextlib.closing(wave.open(path,'r')) as f:
        frames = f.getnframes()
        rate = f.getframerate()
        duration = frames / float(rate)
        duration_L.append([duration, label])
        save_path = f"audio_edited/{label}/{name}.wav"
    if duration >= 3:
        command = f"ffmpeg -y -i {name_} -ss {duration*0.1} -to {duration*0.9} -c copy {save_path}"
        subprocess.call(command, shell=True)
        print('original length: ', duration)
        print("0.1 of duration:    ", duration*0.1)
        print("0.9 of duration:    ", duration*0.9)
        print(f"file should now be {(duration*0.9) - (duration*0.1)} long")
        with contextlib.closing(wave.open(save_path,'r')) as f:
            frames = f.getnframes()
            rate = f.getframerate()
            newduration = frames / float(rate)
        print('new length is:  ',newduration)
        print("\n")



    


    It appears to work okay on smaller duration files, but it breaks on larger ones. For example, here is a sample of the print out from a bunch of files :

    


    original length:  3.3436734693877552
0.1 of duration:     0.33436734693877557
0.9 of duration:     3.00930612244898
file should now be 2.6749387755102045 long
new length is:   2.647074829931973


original length:  4.365351473922902
0.1 of duration:     0.43653514739229027
0.9 of duration:     3.928816326530612
file should now be 3.492281179138322 long
new length is:   3.4829931972789114


original length:  8.080544217687075
0.1 of duration:     0.8080544217687076
0.9 of duration:     7.272489795918368
file should now be 6.4644353741496605 long
new length is:   6.315827664399093


original length:  12.167256235827665
0.1 of duration:     1.2167256235827666
0.9 of duration:     10.950530612244899
file should now be 9.733804988662133 long
new length is:   5.897868480725624


original length:  5.061950113378685
0.1 of duration:     0.5061950113378685
0.9 of duration:     4.555755102040816
file should now be 4.049560090702948 long
new length is:   4.08671201814059


original length:  3.3901133786848074
0.1 of duration:     0.33901133786848076
0.9 of duration:     3.051102040816327
file should now be 2.712090702947846 long
new length is:   2.693514739229025


original length:  9.195102040816327
0.1 of duration:     0.9195102040816328
0.9 of duration:     8.275591836734694
file should now be 7.356081632653062 long
new length is:   6.222947845804988


    


    Notice that on files over 7 seconds, the new length is not what the file length should be. Instead the file is cropped to be much shorter.

    


    What is going on ?

    


  • Blur MP4 video section for x seconds using FFmpeg

    23 mai 2021, par sigur7

    I am trying to blur out an account ID that is showing in the footer of my video for the first 47s.

    


    I have managed to do an entire page blur for 47 seconds and blurred out the desired section for the entire video, but not managed to be able mix the two to get the desired result ? Adding the between section to the original blurbox command keeps throwing errors.

    


    Blurs entire video for first 48 seconds
ffmpeg -i original.mp4 -vf "boxblur=enable='between(t,0,47)'" -codec:a copy blurred.mp4

    


    Blurs a certain segment, but for the whole video
ffmpeg -i original.mp4 -filter_complex "[0:v]crop=450:200:150:1000,boxblur=10[fg];   [0:v][fg]overlay=150:1000[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy -movflags +faststart blurredsection.mp4

    


    How can I blur the x/y section AND only do it in the first 48 seconds ?