Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (37)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (6089)

  • ffmpeg trimming audio WAV files and setting timecode

    14 juillet 2022, par user19551045

    I am currently trying to cut an audio file to match the length of a video (without combining the two...just looking at timecodes) and produce a trimmed audio file that has a timecode that will match up with the video, the video is considered the absolute truth.

    


    Currently, the issue is that the timecodes from the original audio file do not get carried over into the new cropped audio file. So, the starting timecode is now 00:00:00:00 instead of say 07:20:02:14. Even using the -timecode commands and trying to hardcode the timecode that way doesn't seem to do the trick. I am wondering if there is any way around this ? I just want to do as minimal to the raw audio as possible...just change the audio file's length while setting the timecodes so the new audio will line up with the video. Any thoughts/suggestions welcome !

    


    Currently I have tried two options that don't seem to work :
using ffmpeg cmds :

    


    
        cmd2 = r'{} -ss "{}" -i "{}" -codec copy -timecode "{}" "{}"'.format(
            FFMPEG_PATH,
            abs(tc_diff_in_seconds),
            audio_path,
            "17074647",
            out_path
        )


    


    and also using pydub :

    


            current_audio = AudioSegment.from_wav("{}".format(audio_path))
        start_time_in_milli = abs(tc_diff_in_seconds*1000)
        end_time_in_milli = start_time_in_milli + video_dur_in_seconds * 1000
        trimmed_audio = current_audio[start_time_in_milli:end_time_in_milli]
        trimmed_audio.export('{}'.format(out_path), format='WAV', parameters=["-timecode", "17:07:46:47"])


    


    Any thoughts/suggestions welcome ! Thanks

    


  • Anomalie #2302 : Problème d’affichage des tableaux longs

    9 mai 2012, par cedric -

    Avec le tableau c’est la règle tableaux-middle : match : "/([^|])(\n[|].*[|]\n)([^|])/UmsS" replace : replace_tableaux is_callback : Y qui renvoie un null et vide tout le texte. Sans doute un problème de mémoire à investiguer.

  • ffmpeg crop detect python using subprocess

    12 mai 2015, par JRM

    I want to use python subprocess to call ffmpeg and use crop detect to find all black in a video. The crop detect return I want to put into a string variable and put in a database. At the moment I can get the process running in terminal and but I am unsure about how to grab the specific part of the terminal (stdout) output :

    the script :

    def cropDetect():
       p = subprocess.Popen(["ffmpeg", "-i", "/Desktop/ffprobe_instance/Crop_detect/video_file.mpg", "-vf", "cropdetect=24:16:0", "-vframes", "10", "dummy.mp4"], stdout=subprocess.PIPE)
       result = p.communicate()[0]
       print result


    # SCRIPT
    cropDetect()

    Result in terminal :
    [Parsed_cropdetect_0 @ 0x7fa1d840cb80] x1:719 x2:0 y1:575 y2:0 w :-704 h :-560 x:714 y:570 pos:432142 pts:44102 t:0.490022 crop=-704 :-560:714:570

    How do I take "crop=-704 :-560:714:570" and put it into a variable that I can store in a database ?

    As per update :

    def cropDetect1():
       p = subprocess.check_output(["ffmpeg", "-i", "/Desktop/ffprobe_instance/Crop_detect/video_file.mpg", "-vf", "cropdetect=24:16:0", "-vframes", "10", "dummy.mp4"])
       match = re.search("crop\S+", p)
       crop_result = None
       if match is not None:
           crop_result = match.group()
           print "hello %s" % crop_result

    I can’t seem to print out the "crop_result" - I am presuming that means that the variable is empty ?

    UPDATE : Found it :

    def detectCropFile(localPath):
       fpath = "/xxx/xx/Desktop/Crop_detect/videos/USUV.mp4"
       print "File to detect crop: %s " % fpath
       p = subprocess.Popen(["ffmpeg", "-i", fpath, "-vf", "cropdetect=24:16:0", "-vframes", "500", "-f", "rawvideo", "-y", "/dev/null"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
       infos = p.stderr.read()
       print infos
       allCrops = re.findall(CROP_DETECT_LINE + ".*", infos)
       print allCrops
       mostCommonCrop = Counter(allCrops).most_common(1)
       print "most common crop: %s" % mostCommonCrop
       print mostCommonCrop[0][0]
       global crop
       crop = mostCommonCrop[0][0]
       video_rename()

    Use : p = subprocess.Popen(["ffmpeg", "-i", fpath, "-vf", "cropdetect=24:16:0", "-vframes", "500", "-f", "rawvideo", "-y", "/dev/null"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) to pipe it out