Recherche avancée

Médias (91)

Autres articles (89)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (13372)

  • How to make ffmpeg follow a variable file path [closed]

    2 septembre 2023, par Wessie

    I have a little Python script. What it should do is to take the last file out a folder and convert it to another with the same filename.

    


    The Script :

    


    from moviepy.editor import *
import glob
import os.path

#Variabels
folder_path = r'/pathtofolder/Recordings'
file_type = r'/*h264'
file_type_conv = r'/*mp4'
files = glob.glob(folder_path + file_type)
files_conv = glob.glob(folder_path + file_type_conv)
clip_latest = max(files, key=os.path.getctime)
clip_conv = max(files_conv, key=os.path.getctime)

#print(clip_latest)
#print(clip_conv)

ffmpeg -i clip_latest -r 25 clip_conv 


    


    This gives me back :

    


    SyntaxError: invalid syntax


    


    When I 'print" the code it gives me the path I need. But I cannot get the path into the ffmpeg code.
What anm I doing wrong ?

    


    Thanks in advance !

    


    I tried to place the variables in "" and in {}.
When I give a full path it works good.

    


    UPDATE :

    


    Got it working ! Thaqnks to the advise of@Daviid I've used python-ffmpeg library.
Here's the code :

    


    import glob
import os.path
import subprocess

#Variabels
folder_path = r'/home/wessie/Halloween/Recordings'
file_type = r'/*h264'
file_type_conv = r'/*mp4'
files = glob.glob(folder_path + file_type)
files_conv = glob.glob(folder_path + file_type_conv)
clip_latest = max(files, key=os.path.getctime)
clip_conv = clip_latest + '.mp4'

print(clip_latest)
print(clip_conv)

subprocess.run(['ffmpeg', '-i', clip_latest, clip_conv])



    


    Thanks !

    


  • ffmpeg library does not work from path but directly

    19 juin 2020, par Ángel Barrios

    I want to add a watermark to a video.

    



    I'm trying with windows 10 and ffmpeg library

    



    The command I am using.

    



    ffmpeg -i example.mp4 -i watermark.png  -filter_complex "overlay=0-0+0:main_h-overlay_h-0+0" watermark.mp4


    



    When I use it this way accesing the path I get this error :

    



    enter image description here

    



    But when I execute it not from path but opening cmd right on the executable folder it works fine

    



    I did some research and couldn't find the answers I was looking for.

    



    Why does this happen ? I can´t understand really

    



    Thank you !

    


  • ffmpeg Video concat demuxer txt path

    19 avril 2013, par Steven Mills

    I'm making use of the ffmpeg command line process, specifically the demuxer (see here).

    I'm attempting to run the equivelent of this :

    ffmpeg -f concat -i C:\Users\Username\AppData\Local\mylist.txt -c copy output.avi

    I've tried it and it works fine in the console, however I can't figure out a way to get this to work through code. I've checked the path is right, I've checked the txt file is named correctly etc.

    ffmpeg.StartInfo.Arguments = "-f concat -y -i " + @"C:\Users\Username\AppData\Local\Temp\mylist.txt" + " -c copy output.avi";
    ffmpeg.StartInfo.FileName = "ffmpeg.exe";

    For the path I've tried with/without the @ before the path, I've tried \ and / instead of \, I've tried using System.IO.Path methods, but none of it seems to work. It always returns an error saying "file not found", and through debugging I can see that ffmpeg.StartInfo.Arguments always ends up having \ between folders, so I'm guessing that might be the issue.

    Does anyone have a clue how I'd go about circumventing this particular issue ?