
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (100)
-
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Soumettre bugs et patchs
10 avril 2011Un 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 (...)
Sur d’autres sites (12248)
-
Last subprocess call not working in concatenation code with FFMPEG. How should I go about fixing this ?
28 novembre 2019, par S1mpleclips = []
#generates a list of mp4 files in a folder
def clipFinder(CurrentDir, fileType):
clips.clear()
for r,d,f in os.walk(CurrentDir):
for file in f:
if fileType in file:
clips.append(r+file)
random.shuffle(clips)
#removes all files that have the string 'vod' in them as they cause problems during concatenation
def removeVods(r):
for f in clips:
if 'vod' in clips:
os.remove(r+f)
#generates a string using the clips list to insert into the ffmpeg command
def clipString():
string = 'intermediate'
clipList = []
clipNum = 1
for f in clips:
clipList.append(string+str(clipNum)+'.ts'+'|')
clipNum+=1
string1 = ''.join(clipList)
string2 = string1[0:len(string1)-1]
return string2
#concatenates the mp4 files in the clipString
def concatFiles():
clipFinder('***', '.mp4')
removeVods('***')
i = 0
intermediates = []
for f in clips:
subprocess.call(['***', '-i', clips[i], '-c', 'copy', '-bsf:v', 'h264_mp4toannexb', '-f', 'mpegts', 'intermediate'+ str(i+1) +'.ts'])
i += 1
clipsLength = len(clips)
subprocess.call['***', '-i', '"concat:' + clipString() + '"', '-c', 'copy', '-bsf:a
aac_adtstoasc', 'output.mp4']I am trying to make a clip concatenator, but the last subprocess call won’t run and gives me no error. When I run the script the first FFmpeg call works fine and gives me my intermediate mp4 files, however, the second command, which works when I run it in terminal, does not work when I run it from python using subprocess.call.
Problematic code :
subprocess.call(['***', '-i', '"concat:' + clipString() + '"', '-c', 'copy', '-bsf:a aac_adtstoasc', 'output.mp4'])
all places with * were paths such as : /davidscomputer/bin/ffmpeg/
-
Concatenate list of streams with ffmpeg
16 novembre 2019, par oioioiI’d like to write python code, automatically rearranging the scenes of a video. How do I use
ffmpeg-python
to concatenate a list of n streams/scenes ? What is the easiest way to merge those scenes with their audio counterpart ?
Unfortunately, I couldn’t figure out how to do it properly.The status quo :
import os
import scenedetect
from scenedetect.video_manager import VideoManager
from scenedetect.scene_manager import SceneManager
from scenedetect.frame_timecode import FrameTimecode
from scenedetect.stats_manager import StatsManager
from scenedetect.detectors import ContentDetector
import ffmpeg
STATS_FILE_PATH = 'stats.csv'
def main():
for root, dirs, files in os.walk('material'):
for file in files:
file = os.path.join(root, file)
print(file)
video_manager = VideoManager([file])
stats_manager = StatsManager()
scene_manager = SceneManager(stats_manager)
scene_manager.add_detector(ContentDetector())
base_timecode = video_manager.get_base_timecode()
end_timecode = video_manager.get_duration()
start_time = base_timecode
end_time = base_timecode + 100.0
#end_time = end_timecode[2]
video_manager.set_duration(start_time=start_time, end_time=end_time)
video_manager.set_downscale_factor()
video_manager.start()
scene_manager.detect_scenes(frame_source=video_manager)
scene_list = scene_manager.get_scene_list(base_timecode)
print('List of scenes obtained:')
for i, scene in enumerate(scene_list):
print(' Scene %2d: Start %s / Frame %d, End %s / Frame %d' % (
i+1,
scene[0].get_timecode(), scene[0].get_frames(),
scene[1].get_timecode(), scene[1].get_frames(),))
start = scene[0].get_frames()
end = scene[1].get_frames()
print(start)
print(end)
(
ffmpeg
.input(file)
.trim(start_frame=start, end_frame=end)
.setpts ('PTS-STARTPTS')
.output('scene %d.mp4' % (i+1))
.run()
)
if stats_manager.is_save_required():
with open(STATS_FILE_PATH, 'w') as stats_file:
stats_manager.save_to_csv(stats_file, base_timecode)
if __name__ == "__main__":
main() -
os.path.join () on firstargv and list [closed]
5 novembre 2019, par user243I am iterating through a directory and sorting the filenames based on time. These sorted filenames are then stored as a list. The directory is specified as
firstargv
I need to take each filename from the list and join it with the directory specified as
firstargv
creating an entire path so that I can pass it as file toffprobe
later for further process.Below is the code I am using but I am not getting desired result,
import subprocess, sys, os
firstarg=sys.argv[1]
a = str(firstarg)
time = sorted(os.listdir( a ), key=lambda s: s[9:])
filename = time
for y in filename:
new_path = os.path.join(firstarg, *y)
for z in new_path:
p1 = subprocess.Popen (['ffprobe', '-i', z, '-show_entries', 'format=duration', '-sexagesimal', '-v', 'error', '-of', 'csv=%s' % ("p=0")], stdout=subprocess.PIPE)
out = p1.communicate() [0]Any ideas here please ?