
Recherche avancée
Autres articles (81)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7267)
-
5 Key Benefits of Using a Tag Manager
12 décembre 2021, par erin — Analytics Tips, Marketing -
Handling an arbitrary number of start and stop time pairings to cut a movie file down
9 juin 2019, par KieranI am writing a function that takes a list of tuples and a file path string as arguments and outputs a cut down video that only includes the frames that fall inside the start/stop pairings provided.
I’m getting stuck because I am not sure whether the .trim() method of the ’infile’ object is altering the existing object or or creating a new one or doing something else entirely.
the list of start/stop frame pairings can be arbitrarily long, every example I have found has been for a specific number of start and stop pairings and I can’t find anything describing what data structure needs to be passed back to ffmpeg.concat().
My code is displayed below :
import ffmpeg
frameStamps = [(50,75),(120,700),(1250,1500)]
videoFilePath = 'C:/Users/Kieran/Videos/testMovie.mp4'
outputFolder = 'C:/Users/Kieran/Videos/'
def slice_video(frameStamps, videoFilePath, outputFolder):
originalFile = ffmpeg.input(videoFilePath)
for stamp in frameStamps:
ffmpeg.concat(originalFile.trim(start_frame=stamp[0], end_frame=stamp[1]))
ffmpeg.output(outputFolder + 'testoutput.mp4')
ffmpeg.run()
slice_video(frameStamps, videoFilePath, outputFolder)Now I am able to get the following when I individually print out originalFile.trim() which are getting recognised in the console as "FilterableStream" objects
trim(end_frame=75, start_frame=50)[None] <29b4fb0736ec>
trim(end_frame=700, start_frame=120)[None] <c66c4e1a48f5>
trim(end_frame=1500, start_frame=1250)[None] <13e0697a5288>
</c66c4e1a48f5>and I have tried passing them back as a list, dictionary and tuple and haven’t been able to get it working
Output Errors :
File "C:/Users/Kieran/Example.py", line 21, in slice_video
ffmpeg.output(outputFolder + 'testoutput.mp4')
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\_ffmpeg.py", line 94, in output
return OutputNode(streams, output.__name__, kwargs=kwargs).stream()
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 282, in __init__
kwargs=kwargs
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 170, in __init__
self.__check_input_len(stream_map, min_inputs, max_inputs)
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 149, in __check_input_len
raise ValueError('Expected at least {} input stream(s); got {}'.format(min_inputs, len(stream_map)))
ValueError: Expected at least 1 input stream(s); got 0 -
FFMPEG hold multiple frames and use as a movie
18 juin 2019, par ColeI have a video that I’m trying to create jump shots from. For example I want the output of my command to show frame 5 of the original clip for 30 frames, and frame 25 of the OG clip to show for 30 frames.
assuming the OG clip is 30 FPS
ffmpeg -t 1 -i og_clip.mp4 -filter_complex "
[0]select=eq(n\,5)[H1];[0][H1]overlay[O1];
[0]select=eq(n\,25)[H2];[0][H2]overlay[O2];
[O1][O2]concat=n=2[Merge]" -map "[Merge]" out.mp4The above doesnt work right.
What I’ve been doing up until now has been a two part command :
ffmpeg -i og_clip.mp4 -vf "select=eq(n\,5)" -vframes 1 -y out_0.png
ffmpeg -i og_clip.mp4 -vf "select=eq(n\,25)" -vframes 1 -y out_1.png
ffmpeg -t 1 -i og_clip.mp4 -i out_0.png -i out_1.png -filter_complex "
[0][1]overlay[H1];[0][2]overlay[H2];
[H1][H2]concat=n=2[Merge]" -map "[Merge]" out.mp4Which has been working for me. The only problem is that the process of converting to a png first for each frame I want to use, takes too long. I’m trying to condense it all into one command. I figure that the encoding of the png is what takes so long.
Any help would be much appreciated !