
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (81)
-
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (4507)
-
How to plot animated time series in R ?
28 août 2016, par pOrlandoI am trying use the ’animation’ package in R to plot an animated time series.
My dataset consists of a time vector and a value vector, each with 1800 rows.
I keep getting an error message after running the loop which reads :
Error in jpeg(gname[i]) : unable to start jpeg() device
In addition: Warning messages:
1: In jpeg(gname[i]) : unable to open file 'g11:30:00.jpg' for writing
2: In jpeg(gname[i]) : opening device failedHere’s the source code
timemax<-1800
setwd("~/Documents/Animation/")
graphdata<-read.csv("filling_line_data_construction_v2.csv")
attach(graphdata)
gname<-paste("g",time, ".jpg", sep="")
for (i in 1:timemax){
jpeg(gname[i])
plot(time[1],value[1],type="l",ylim=c(0,35), xlim=c(0,100),
ylim = c(0, 35),ylab = "", xlab="time")
lines(time[1:i],value[1:i])
dev.off(dev.cur())
}The end goal is to string together these 1800 plots as a stop animation video by calling the ffmpeg shell :
shell("C:/ffmpeg/bin/ffmpeg.exe -report -i g%d.jpg -b:v 2048k fillin_lineR.mpg",mustWork=FALSE)
This is code that I’ve been trying to adapt from http://www.animatedgraphs.co.uk/LondonR.html#slide-30, but this example uses a .tif file instead of .jpg, and my computer gives me 1800 error messages when trying to make a video from .tif files...
Thanks in advance !
-
I want to reduce my PYTHON code and also make proper
7 mai 2022, par Anuj SaxenaI have a CSV file From the client.
In my code, first, read the CSV file and create folders based on the CSV Column Heading name
and, convert the video into jpeg and also compress the video and apply a watermark on the compressed video.
hi below is my code example. Is there a way to reduce the number of lines of code and save time ?
example.. using function or loops. I need any other method. please help




CODE BEGIN


#import library
import csv
import os
import subprocess
import shutil

path = r'/home/anuj/FIle_server/from_client/shots_data.csv' #path of client CSV File
root = r"/home/anuj/FIle_server/production/"# path where i want create folders 
list = ['JPG', 'LOW', 'RAW'] #also add these folders in the last directory


def read_csv(path): #create function to read csv file 
 with open(path, 'r') as csv_file:
 csv_reader = csv.DictReader(csv_file)
 for line in csv_reader:
 print(line)
 new_path = f"{root}/{line['Project']}/{line['Sequence']}/{line['Shot']}/{line['task']}/{line['software']}/{line['artist']}"
 print(new_path)
 os.makedirs(new_path) #create folders.
 for items in list:
 path = os.path.join(new_path, items)
 os.mkdir(path) #create jpeg, low ,raw folders in the last directory


read_csv(path)

def convert_1mov_to_seq():# Declare function to convert video into jpeg and also compress the video,and apply watermark on the compressed video
 # input = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_001/SH001/ROTO/NUKE/VISHAL/RAW/SH001.MOV"
 input = r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH001.MOV"
 output = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_001/SH001/ROTO/NUKE/VISHAL/JPG/frm_seq_v001.%3d.jpeg"
 output2 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_001/SH001/ROTO/NUKE/VISHAL/LOW/SH001.mp4"
 output3 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_001/SH001/ROTO/NUKE/VISHAL/LOW/Compress_SH001.mp4"

 cmd = f'ffmpeg -i "{input}" "{output}"'
 cmd2 = f"ffmpeg -i {input} -vcodec libx264 -acodec aac {output2}"
 cmd3 = f"ffmpeg -i {output2} -i watermark.png -filter_complex 'overlay=1660:970' {output3}"
 print(cmd)
 print(cmd2)
 print(cmd3)
 subprocess.call(cmd, shell=True)
 subprocess.call(cmd2, shell=True)
 subprocess.call(cmd3, shell=True)

def convert_2mov_to_seq():
 # input = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_002/SH002/MM/MAYA/ANUJ/RAW/SH002.MOV"
 input = r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH002.MOV"
 output = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_002/SH002/MM/MAYA/ANUJ/JPG/frm_seq_v001.%3d.jpeg"
 output2 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_002/SH002/MM/MAYA/ANUJ/LOW/SH002.mp4"
 output3 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_002/SH002/MM/MAYA/ANUJ/LOW/Compress_SH002.mp4"

 cmd = f'ffmpeg -i "{input}" "{output}"'
 cmd2 = f"ffmpeg -i {input} -vcodec libx264 -acodec aac {output2}"
 cmd3 = f"ffmpeg -i {output2} -i watermark.png -filter_complex 'overlay=1660:970' {output3}"
 print(cmd)
 print(cmd2)
 print(cmd3)
 subprocess.call(cmd, shell=True)
 subprocess.call(cmd2, shell=True)
 subprocess.call(cmd3, shell=True)

def convert_3mov_to_seq():
 # input = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_003/SH003/VFX/HOUDINI/KESHV/RAW/SH003.MOV"
 input = r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH003.MOV"
 output = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_003/SH003/VFX/HOUDINI/KESHV/JPG/frm_seq_v001.%3d.jpeg"
 output2 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_003/SH003/VFX/HOUDINI/KESHV/LOW/SH003.mp4"
 output3 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_003/SH003/VFX/HOUDINI/KESHV/LOW/compress_SH003.mp4"

 cmd = f'ffmpeg -i "{input}" "{output}"'
 cmd2 = f"ffmpeg -i {input} -vcodec libx264 -acodec aac {output2}"
 cmd3 = f"ffmpeg -i {output2} -i watermark.png -filter_complex 'overlay=1660:970' {output3}"
 print(cmd)
 print(cmd2)
 print(cmd3)
 subprocess.call(cmd, shell=True)
 subprocess.call(cmd2, shell=True)
 subprocess.call(cmd3, shell=True)

def convert_4mov_to_seq():# i want only one compressed video with watermark, but here i create two compressed video one with watermark and another without watermark.
 # input = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_004/SH004/CLEANUP/BLENDER/VARSHA/RAW/SH004.MOV"
 input = r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH004.MOV"
 output = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_004/SH004/CLEANUP/BLENDER/VARSHA/JPG/frm_seq_v001.%3d.jpeg"
 output2 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_004/SH004/CLEANUP/BLENDER/VARSHA/LOW/SH004.mp4"
 output3 = r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_004/SH004/CLEANUP/BLENDER/VARSHA/LOW/Compress_SH004.mp4"

 cmd = f'ffmpeg -i "{input}" "{output}"'
 cmd2 = f"ffmpeg -i {input} -vcodec libx264 -acodec aac {output2}"
 cmd3 = f"ffmpeg -i {output2} -i watermark.png -filter_complex 'overlay=1660:970' {output3}"
 print(cmd)
 print(cmd2)
 print(cmd3)
 subprocess.call(cmd, shell=True)
 subprocess.call(cmd2, shell=True)
 subprocess.call(cmd3, shell=True)

 convert_1mov_to_seq()
 convert_2mov_to_seq()
 convert_3mov_to_seq()
 convert_4mov_to_seq()

def copy_mov(): #copy videos from client folder to RAW folders
 shutil.copy2(r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH001.MOV", r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_001/SH001/ROTO/NUKE/VISHAL/RAW/SH001.mp4")
 shutil.copy2(r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH002.MOV", r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_002/SH002/MM/MAYA/ANUJ/RAW/SH002.mp4")
 shutil.copy2(r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH003.MOV", r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_003/SH003/VFX/HOUDINI/KESHV/RAW/SH003.mp4")
 shutil.copy2(r"/home/anuj/FIle_server/from_client/AI_PROJECT/SEQ_001/SH004.MOV", r"/home/anuj/FIle_server/production/AI_PROJECT/SEQ_004/SH004/CLEANUP/BLENDER/VARSHA/RAW/SH004.mp4")


copy_mov()



-
Python + ffmpeg TypeError : not all arguments converted during string formatting
21 mars 2017, par Sonic MotionI’m sending a file to a function in python, and trying to save the results to a variable, but I keep getting that error.
I’ve looked over the other answers but nothing seems to fit. Any help is appreciated :
def ffmpegLUFS(fileName):
subprocess.Popen("ffmpeg -i %s -filter_complex ebur128 -f null - 2>&1 | grep -n '.*' | grep -A 5 'size' | grep 'I:' | cut -d ':' -f3-" % tuple(map(pipes.quote, sys.argv[1])),stdout=subprocess.PIPE,shell=True).communicate()[0]
returnTraceback (most recent call last):
File "/Volumes/videos/videos/DROP_BIN/CHRIS/POD_Workflow_Files/WebContent_Audio.py", line 30, in <module>
sourceLUFS = ffmpegLUFS(sys.argv[1])
File "/Volumes/videos/videos/DROP_BIN/CHRIS/POD_Workflow_Files/WebContent_Audio.py", line 18, in ffmpegLUFS
subprocess.Popen("ffmpeg -i %s -filter_complex ebur128 -f null - 2>&1 | grep -n '.*' | grep -A 5 'size' | grep 'I:' | cut -d ':' -f3-" % tuple(map(pipes.quote, fileName)),stdout=subprocess.PIPE,shell=True).communicate()[0]
TypeError: not all arguments converted during string formatting
</module>