Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (89)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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 (...)

Sur d’autres sites (13117)

  • Python subprocess or os.system not working with ffmpeg

    13 février 2024, par confused

    I've been trying to get this darn programming run since last night and cannot seem to get anything to work. I want to first trim the video and then resize the video. I'm reading which video and what to give the final name from a text file, over 780 lines long, quite a few videos.

    


    Thus far with every idea under the sun I have tried, subprocess and os.system, I can't get anything more than error statements or right now all I get is no file creation of any kind. How the heck do I get this to work correctly ?

    


    import ffmpeg
import subprocess
import os

os.chdir('/home/Downloads/SRs/')
a = open('SRt.txt', 'r')
b = a.readlines()
a.close()
for c in range(0, len(b)-1):
    words = list(b[c].split(" "))
    d = len(words)
    e = words[d-1]
    f = b[c].replace(e, 'FR' + str(c) + '.mp4')
    words[d-1] = 'FR' + str(c) + '.mp4'
    print(f)
    subprocess.call(f, shell=True)
    subprocess.call([
        'ffmpeg',
        '-i',
        "'FR' + str(c) + '.mp4'",
        '-vf scale=320:240',
        words[d-1],
        ])


    


    Here are some examples of what the original file would look like :

    


     ffmpeg -i SR.mp4 -ss 00:00:00 -to 00:01:22 -c:v copy -a copy CPH.mp4
 ffmpeg -i SR.mp4 -ss 00:01:24 -to 00:02:58 -c:v copy -a copy CG.mp4
 ffmpeg -i SR.mp4 -ss 00:02:59 -to 00:05:41 -c:v copy -a copy CSGP.mp4


    


    Nothing fancy just separating video in its own individual segments and then resaving it before resizing it.

    


    I tried :

    


    z=subprocess.call(f, shell=True, stdout=subprocess.PIPE)
print(z)


    


    But all I get is '1'.

    


    When I changed it to :

    


    z=subprocess.call(f, shell=True, stderr=subprocess.PIPE)
print(z)


    


    All I get is '1'.

    


    Maybe I'm doing something wrong.

    


  • lavf : Remove codec_tag from dashenc and smoothstreamingenc

    30 juin 2017, par Martin Storsjö
    lavf : Remove codec_tag from dashenc and smoothstreamingenc
    

    Skip the codec_tag altogether here, to let the user (try to) set
    whichever codec/tag is preferred ; the individual chained muxer will
    reject invalid codecs anyway.

    (cherry picked from commit 61f589e31e84ae02d7ac6837f30f19c437b1fc2e)
    Signed-off-by : Derek Buitenhuis <derek.buitenhuis@gmail.com>

    • [DH] libavformat/dashenc.c
    • [DH] libavformat/smoothstreamingenc.c
  • Linking PHP audio and video uploads to FFMPEG on a linux server

    20 décembre 2018, par user5399793

    I host a site on a Linux server that I built with php where I am able to upload audio files in one section and video files to another.

    Each section uses php to upload a single audio file and a single video file. Each upload is assigned a unique filename so they can be viewed separately on an individual page where the uploader can post comments about their audio or video.

    I want to be able to allow musicians and performers in the local area display their work. The site works, but large video files do not upload and my audio player only plays a few formats, and I like to convert them all to mp3’s.

    I installed ffmpeg on my linux server to help me with this and am able to connect to it with my terminal. My question is how do I get ffmpeg to interface with my uploaded php files.

    For example, as the user uploads an audio file, can I have ffmpeg convert it while it’s uploading, or do I need to set up a temporary folder for uploads, store it there, then have ffmpeg compress the file, convert it to a specific format and save it in another folder ?

    I would prefer to have it compress and change the format while it’s uploading so as not to use server space, but if this is not the way ffmpeg works, then I don’t have a choice. Any help would be appreciated.