Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (10826)

  • Executing shell script on Google Cloud Functions

    9 juillet 2020, par João Abrantes

    I am trying to encode .mp4 videos into hls using FFmpeg.

    


    I am using subprocess to call FFmpeg :

    


    def transcoder(data, context):
    """Background Cloud Function to be triggered by Cloud Storage.
       This generic function logs relevant data when a file is changed.

    Args:
        data (dict): The Cloud Functions event payload.
        context (google.cloud.functions.Context): Metadata of triggering event.
    Returns:
        None; the output is written to Stackdriver Logging
    """
    try:
        input_filename = data['name'].split('/')[-1] #videos have no extension
        input_path = f'/tmp/{input_filename}'
        print(f'filename {input_filename}')
        print(f'input_path {input_path}')
        print(f"bucket {data['bucket']}")
        print(f"name {data['name']}")

        outdir_path = f'/tmp/output/{input_filename}'
        os.makedirs(outdir_path, exist_ok=True)

        bucket = client.get_bucket(data['bucket'])
        blob = bucket.get_blob(data['name'])
        blob.download_to_filename(input_path)

        cmd = f'''ffmpeg -y -i {input_path} \
              -preset ultrafast -g 60 -sc_threshold 0 \
              -map 0:0 -map 0:1 -map 0:0 -map 0:1 \
              -s:v:0 360x640 -c:v:0 libx264 -b:v:0 365k \
              -s:v:1 720x1280 -c:v:1 libx264 -b:v:1 3000k \
              -c:a copy \
              -var_stream_map "v:0,a:0 v:1,a:1" \
              -master_pl_name master.m3u8 \
              -f hls -hls_time 6 -hls_list_size 0 \
              -hls_segment_filename "{outdir_path}/%v_fileSequence%d.ts" \
              -hls_playlist_type vod \
               {outdir_path}/%v_prog_index.m3u8'''

        process = subprocess.Popen(cmd)
        stdout, stderr = process.communicate()
        upload_local_directory_to_gcs(outdir_path, upload_bucket, input_filename)
    except Exception as e:
        print(e)


    


    The problem is that I get an error :

    


    [Errno 2] No such file or directory: 'ffmpeg -y -i /tmp/video -preset ultrafast -g 60 -sc_threshold 0 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -s:v:0 360x640 -c:v:0 libx264 -b:v:0 365k -s:v:1 720x1280 -c:v:1 libx264 -b:v:1 3000k -c:a copy -var_stream_map "v:0,a:0 v:1,a:1" -master_pl_name master.m3u8 -f hls -hls_time 6 -hls_list_size 0 -hls_segment_filename "/tmp/output/video/%v_fileSequence%d.ts" -hls_playlist_type vod /tmp/output/video/%v_prog_index.m3u8': 'ffmpeg -y -i /tmp/video -preset ultrafast -g 60 -sc_threshold 0 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -s:v:0 360x640 -c:v:0 libx264 -b:v:0 365k -s:v:1 720x1280 -c:v:1 libx264 -b:v:1 3000k -c:a copy -var_stream_map "v:0,a:0 v:1,a:1" -master_pl_name master.m3u8 -f hls -hls_time 6 -hls_list_size 0 -hls_segment_filename "/tmp/output/video/%v_fileSequence%d.ts" -hls_playlist_type vod /tmp/output/video/%v_prog_index.m3u8'


    


    But I know that the input files and the output files do exist because I debugged that using print(os.listdir(path)) so now I am wondering if the FFmpeg I call with subprocess has access to the /tmp folder..?

    


    I know that there is a Python FFmpeg library I could use, but I don't know how to run my FFmpeg command using that library. Can you help ?

    


    p.s. I can run this locally with success.

    


  • How to get the video's duration or number of frames in ffmpeg filter

    1er juillet 2020, par Reasno

    I'm writing a filter in ffmpeg and I have to get the duration or number of frames in filter_frame function. But the parameters of "filter_frame" function only consist of AVFilterLink and AVFrame :

    


    static int filter_frame(AVFilterLink* link, AVFrame* in) {
    AVFilterContext* avctx = link->dst;
    ExtractContext* privCtx = (ExtractContext*)avctx->priv;
    AVFilterLink* outlink = avctx->outputs[0];
    //here I want to get the duration of total number of frames:
}


    


    I can't find attributes which is related to duration of frame numbers in either class. I have googles but all answers are about getting duration or frame numbers using ffmpeg.exe, which don't meet my requirements because I have to get them in self-written filter in FFMPEG. Thanks for your help !

    


  • Removed number stripping from stripHtml. Fixes #2

    28 avril 2012, par Max Lynch

    m additional-methods.js m test/methods.js Removed number stripping from stripHtml. Fixes #2