Recherche avancée

Médias (91)

Autres articles (91)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (3440)

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