
Recherche avancée
Autres articles (82)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (8346)
-
How I can overlay video onto another video start from 2 second to 4 second ?
23 janvier 2023, par KoliKI need overlay video onto another video start from 2 second to 4 second.


I use ffmpeg for overlaying video onto another video for this command

ffmpeg -i tmp/test_screen_1672755242397.mp4 -vf "movie=tmp/test_camera_1672755249551.mp4, scale=250: -1 [inner]; [in][inner] overlay =10: 10 [out]" completed.mp4

But videotest_camera_1672755249551
must be to star from 2 second and end to 4 second. What I need to add in command for result ?

-
Cut a video in between key frames without re-encoding the full video using ffpmeg ? [closed]
13 juillet 2024, par bguizI would like to cut a video at the beginning at any particular timestamp, and it need to be precise, so the nearest key frame is not good enough.


Also, these videos are rather long - an hour or longer - so I would like to avoid re-encoding this altogether if possible, or otherwise only re-encode a minimal fraction of the total duration. Thus, would like to maximise the use of
-vcodec copy
.

How can I accomplish this using
ffmpeg
?

NOTE : See scenario, and my own rough idea for a possible solution below.



Scenario :


- 

- Original video

- 

- Length of 1:00:00
- Has a key frame every 10s






- Desired cut :

- 

- From 0:01:35 through till the end




- Attempt #1 :

- 

- Using
-ss 0:01:35 -i blah.mp4 -vcodec copy
, what results is a file where : - audio starts at 0:01:30
- video also starts at 0:01:30
- this starts both the audio and the video too early










- Using
- using
-i blah.mp4 -ss 0:01:35 -vcodec copy
, what results is a file where :
- 

- audio starts at 0:01:35,
- but the video is blank/ black for the first 5 seconds,

- 

- until 0:01:40, when the video starts




- this starts the audio on time,
but the video starts too late



















Rough idea


- 

- (1) cut 0:01:30 to 0:01:40

- 

- re-encode this to have new key frames,
including one at the target time of 0:01:35
- then cut this to get the 5 seconds from 0:01:35 through 0:01:40






- (2) cut 0:01:40 through till the end

- 

- without re-encoding, using
-vcodec copy




- without re-encoding, using
- (3)
ffmpeg concat
the first short clip (the 5 second one)
with the second long clip








I know/ can work out the commands for (2) and (3), but am unsure about what commands are needed for (1).


- Original video

-
ffmpeg black screen issue for video video generation from a list of frames
11 mai 2023, par arlaineI used a video to generate a list of frames from it, then I wanted to create multiple videos from this list of frames.
I've set starting and ending frames indexes for each "sub video", so for example,

indexes = [[0, 64], [64, 110], [110, 234], [234, 449]]
, and those indexes will help my code generate 4 videos of various durations. The idea is to decompose the original video into multiple sub videos. My code is working just fine, the video generated.

But every sub video start with multiple seconds of black screen, only the first generated video (so the one using
indexes[0]
for starting and ending frames) is generated without this black screen part. I've tried changing the frame rate for eachsub_video
, according to the number of frames and things like that, but I didn't work. You can find my code below

for i, (start_idx, end_idx) in enumerate(self.video_frames_indexes):
 if end_idx - start_idx > 10:
 shape = cv2.imread(f'output/video_reconstitution/{video_name}/final/frame_{start_idx}.jpg').shape
 os.system(f'ffmpeg -r 30 -s {shape[0]}x{shape[1]} -i output/video_reconstitution/{video_name}/final/frame_%d.JPG'
 f' -vf "select=between(n\,{start_idx}\,{end_idx})" -vcodec libx264 -crf 25'
 f' output/video_reconstitution/IMG_7303/sub_videos/serrage_{i}.mp4')



Just the ffmpeg command


ffmpeg -r 30 -s {shape[0]}x{shape[1]} -i output/video_reconstitution/{video_name}/final/frame_%d.JPG -vf "select=between(n\,{start_idx}\,{end_idx})" -vcodec libx264 -crf 25 output/video_reconstitution/IMG_7303/sub_videos/serrage_{i}.mp4