
Recherche avancée
Autres articles (89)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (6814)
-
How to detect added scenes in Director's Cut Edition of movie ?
17 juillet 2019, par B LoloI’ve got huge collection of .mkv files. In every movie folder there are two files : one original movie and one extended edition of that movie.
Two files can be different for example one is 480p and the second 1080p.
One can be 1 hour long, second one 40 minutes.
In those extended edition files scenes are added randomly, so it could be 2 minutes in beginning, 5 minutes after first 10 minutes of the film and so on.
Is there a way to use Python and ffmpeg to detect scenes from extended edition files that are absent in original movie file ?
I can also work with only audio if that is easier to do.
For now I got idea to use ffmpeg and scene detection, I can manually search for differences between files, but I would like some hints where to look changes.
This is python code with ffmpy library :
from ffmpy import FFmpeg
plik = "C:/special.mkv"
png = re.sub("\.mkv","_changes.png",plik)
ff = FFmpeg(executable='C:/ffmpeg.exe', global_options ='-v error', inputs={plik : ''}, outputs={png : "-vf select='gt(scene\,0.4)',scale=320:-1,tile=10x80 -frames:v 1 -y"})
result = ff.run(stdout=PIPE, stderr=PIPE) -
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 !
-
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