Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (111)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (5935)

  • 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

    


  • dxva2_h264 : set the correct ref frame index in the long slice struct

    22 avril 2014, par Hendrik Leppkes
    dxva2_h264 : set the correct ref frame index in the long slice struct
    

    The latest H.264 DXVA specification states that the index in this
    structure should refer to a valid entry in the RefFrameList of the picture
    parameter structure, and not to the actual surface index.

    Fixes H.264 DXVA2 decoding on recent Intel GPUs (tested on Sandy and Ivy)

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DH] libavcodec/dxva2_h264.c
  • Merge remote-tracking branch ’ubitux/lavfi-mixed-short-long’

    11 avril 2013, par Michael Niedermayer

    Merge remote-tracking branch ’ubitux/lavfi-mixed-short-long’